# GitHub Public Repositories API

> Search GitHub repositories and read public repo and user profiles: stars, forks, language, topics

- Vendor: `githubpublicrepositoriesapi` · version 1.0 · category Developer Tools · tags github api, repository search api, open source api, github stars api, developer profiles api, code repos api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/githubpublicrepositoriesapi
- This document: https://apiclay.com/docs/githubpublicrepositoriesapi.md
- OpenAPI 3.1: https://apiclay.com/api/githubpublicrepositoriesapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `githubpublicrepositoriesapi`
- Updated: 2026-11-18

## About

## GitHub Public Repositories API

Search public GitHub repositories by keyword, language, stars or topic, and read a repository's details (description, stars, forks, open issues, language, license, topics, dates) or a user's or organization's public profile.

Data comes from **github.com** (https://github.com). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/search?q=language:python stars:&gt;10000&amp;sort=stars`, then `/repo?owner=psf&amp;repo=requests`.

### Routes

#### GET `/search` - Search repositories
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | yes | GitHub search syntax, e.g. `fastapi language:python`. |
| sort | query | string | no | `stars`, `forks`, `updated`. |
| order | query | string | no | `desc` or `asc`. |
| per_page | query | number | no | Up to 100. |
| page | query | number | no | Page. |

Returns: `total_count`, `items[]` with `full_name`, `description`, `stargazers_count`, `forks_count`, `language`, `topics`, `license`, `html_url`.

#### GET `/repo` - Repository
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| owner | path | string | yes | Owner. |
| repo | path | string | yes | Repo name. |

Returns: repository object.

#### GET `/user` - User or organization
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| username | path | string | yes | Login. |

Returns: `login`, `name`, `company`, `location`, `public_repos`, `followers`, `created_at`.

### Caveats

- Unauthenticated GitHub limits apply (search: 10 calls a minute per IP).
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by github.com.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /search — Search repositories
- Gateway: `GET https://api.apiclay.com/v1/api/githubpublicrepositoriesapi/search`
- Public query params: `q` (string, required), `sort` (string), `order` (string), `per_page` (number), `page` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /repo — Repository
- Gateway: `GET https://api.apiclay.com/v1/api/githubpublicrepositoriesapi/repo`
- Public query params: `owner` (string, required), `repo` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /user — User or organization
- Gateway: `GET https://api.apiclay.com/v1/api/githubpublicrepositoriesapi/user`
- Public query params: `username` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/githubpublicrepositoriesapi/search?q=<q>" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
