---
title: "Github Read"
method: POST
path: "/github/read"
tags: ["Search"]
---

# Github Read

`POST /github/read`

Read a file from a GitHub repository with optional line range.

## Request body

- GitHubReadRequest
  - `repository` string, required — Repository in owner/repo format
  - `path` string, required — File path within the repository
  - `ref` string — Branch, tag, or commit SHA
  - `start_line` integer, nullable — 1-based start line
  - `end_line` integer, nullable — 1-based end line (inclusive)

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-02-28** `7e426dce5dda` — 2 info
  - api tag `Search` added
  - api tag `GitHub Search` removed
- **2026-02-19** `c41dcb6ac8f7` — 2 info
  - api tag `GitHub Search` added
  - api tag `GitHub & Tracer` removed
- **2026-02-14** `5b3db391b9ea` — 3 info
  - api tag `GitHub & Tracer` added
  - api tag `github-search` removed
  - api tag `v2-api` removed

[Change history](https://skmtc.dev/nozomio-labs/apis/nia-ai-api/changes/github/read/post.md)

---

[API](https://skmtc.dev/nozomio-labs/apis/nia-ai-api.md) · [All operations](https://skmtc.dev/nozomio-labs/apis/nia-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nozomio-labs/nia-ai-api/revisions/dbb602a3ef17/schema)
