# Github — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Look up GitHub repositories and users: search repositories, fetch repository metadata, releases, issues and issue threads, browse repository files/trees, and retrieve user profiles and starred repositories.

**Category:** Developer Tools | **Website:** [github.com/](https://github.com/) | **Docs:** [parse.bot/marketplace/12c98c7f-483d-4bf3-955d-c4ce8218aedf/github-com-api](https://parse.bot/marketplace/12c98c7f-483d-4bf3-955d-c4ce8218aedf/github-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_file_content

Retrieves file content (decoded text) or a directory listing from a repository path. Files return decoded UTF-8 text; directories return a listing of child items with their types and sizes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner |
| `path` | string | No | File or directory path within the repo. Empty string returns root directory. |
| `ref` | string | No | Git ref (branch, tag, or commit SHA) |
| `repo` | string | Yes | Repository name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_file_content \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","path":"<string>","ref":"<string>","repo":"<string>"}'
```

### get_file_tree

Fetches the full Git tree structure of a repository with a summary counting files by extension. Useful for understanding project layout. Large repos may be truncated by the upstream API (indicated by the truncated flag).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `branch` | string | No | Branch name. Defaults to the repo's default branch. |
| `owner` | string | Yes | Repository owner |
| `recursive` | boolean | No | Whether to fetch tree recursively |
| `repo` | string | Yes | Repository name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_file_tree \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"branch":"<string>","owner":"<string>","recursive":"<boolean>","repo":"<string>"}'
```

### get_issue_detail

Fetches a single issue with the full body, all metadata, and optionally the complete conversation thread (comments). Each comment includes its author, body text, timestamps, and reactions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `comments_per_page` | integer | No | Max comments to fetch (max 100) |
| `include_comments` | boolean | No | Whether to include comments |
| `issue_number` | string | Yes | Issue number |
| `owner` | string | Yes | Repository owner |
| `repo` | string | Yes | Repository name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_issue_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comments_per_page":"<integer>","include_comments":"<boolean>","issue_number":"<string>","owner":"<string>","repo":"<string>"}'
```

### get_repo_info

Fetches detailed repository metadata: name, description, languages, size, dates, star/fork/issue counts, contributors count, recent commit activity, topics, and license. Requires one round-trip per sub-resource (languages, contributors, commits) so is heavier than search_repos for bulk discovery.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner (user or organization), e.g. 'facebook' |
| `repo` | string | Yes | Repository name, e.g. 'react' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_repo_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","repo":"<string>"}'
```

### get_repo_issues

Lists issues for a repository with titles, statuses, labels, dates, assignees, and comment counts. Pull requests are filtered out automatically. Supports filtering by state (open/closed/all) and labels.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `direction` | string | No | Sort direction: asc or desc |
| `labels` | string | No | Comma-separated list of label names to filter by |
| `owner` | string | Yes | Repository owner |
| `page` | integer | No | Page number |
| `per_page` | integer | No | Results per page (max 100) |
| `repo` | string | Yes | Repository name |
| `sort` | string | No | Sort by: created, updated, comments |
| `state` | string | No | Filter by state: open, closed, or all |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_repo_issues \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"direction":"<string>","labels":"<string>","owner":"<string>","page":"<integer>","per_page":"<integer>","repo":"<string>","sort":"<string>","state":"<string>"}'
```

### get_repo_readme

Fetches the README file for a repository, base64-decoded into plain text. Useful for AI processing of project documentation. Returns 404 (input_not_found) when no README exists.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner |
| `ref` | string | No | Git ref (branch, tag, or commit SHA). Defaults to the repo's default branch. |
| `repo` | string | Yes | Repository name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_repo_readme \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","ref":"<string>","repo":"<string>"}'
```

### get_repo_releases

Lists release metadata for a repository: version tags, release dates, pre-release status, release notes (body), and asset download links. Paginated; returns newest releases first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner |
| `page` | integer | No | Page number |
| `per_page` | integer | No | Results per page (max 100) |
| `repo` | string | Yes | Repository name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_repo_releases \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","page":"<integer>","per_page":"<integer>","repo":"<string>"}'
```

### get_user_profile

Fetches a public user profile including bio, location, social links, follower/following counts, total stars received across all owned repos, and a list of owned repositories. Only works for individual user accounts, not organization accounts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | GitHub username (individual user account, not an organization), e.g. 'torvalds' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_user_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```

### get_user_starred

Lists repositories starred by a user, revealing their interests and bookmarked projects. Paginated; returns an empty array when the requested page exceeds available results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number |
| `per_page` | integer | No | Results per page (max 100) |
| `username` | string | Yes | GitHub username |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/get_user_starred \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","per_page":"<integer>","username":"<string>"}'
```

### search_repos

Full-text search over all public GitHub repositories. Supports GitHub's search syntax including qualifiers like 'language:python', 'topic:machine-learning', 'stars:>1000'. Rate-limited to 10 requests/minute. Returns paginated results sorted by the chosen field.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `order` | string | No | Sort order: asc or desc |
| `page` | integer | No | Page number for pagination |
| `per_page` | integer | No | Results per page (max 100) |
| `query` | string | Yes | Search query. Supports GitHub search syntax (e.g., 'machine learning', 'topic:python', 'language:terraform') |
| `sort` | string | No | Sort field: stars, forks, help-wanted-issues, updated |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-github-com-api-12c98c7f/search_repos \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order":"<string>","page":"<integer>","per_page":"<integer>","query":"<string>","sort":"<string>"}'
```
