# Search GitHub Repositories API

> Search repositories across GitHub with GitHub's search syntax (language, stars, topics, pushed dates). Returns parsed rows plus the rate-limit headers. Works without a token; pass your own for the higher limit.

Category: [Developer Tools APIs](https://upapi.io/apis/developer-tools) · Last updated 2026-09-07

## How to call it

- Endpoint: `POST https://api.upapi.io/github-search-repos.get`, key in the `X-Api-Key` header, JSON body.
- Cost: 6 weighted units per call.
- Timeout: 30 seconds.
- Cache: identical requests are served from cache for 120 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/github-search-repos.get

```bash
curl -X POST https://api.upapi.io/github-search-repos.get \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "q": "example", "page": 1, "perPage": 30 }'
```

## Request parameters

- `q` (string, required) — GitHub search syntax, e.g. 'note taking language:typescript stars:>100'
- `page` (integer)
- `sort` (string) — stars | forks | help-wanted-issues | updated
- `order` (string) — asc | desc
- `token` (string) — Optional GitHub token (30 searches/min)
- `perPage` (integer)
- `proxyUrl` (string) — Optional exit to send from; a datacenter exit is leased when omitted

## Response fields

- `items` (array, required)
- `items[].id` (integer, required)
- `items[].forks` (integer, required)
- `items[].owner` (string, required)
- `items[].stars` (integer, required)
- `items[].isFork` (boolean, required)
- `items[].topics` (array, required)
- `items[].htmlUrl` (string, required)
- `items[].license` (string, required)
- `items[].fullName` (string, required)
- `items[].homepage` (string, required)
- `items[].language` (string, required)
- `items[].pushedAt` (string, required)
- `items[].createdAt` (string, required)
- `items[].updatedAt` (string, required)
- `items[].isArchived` (boolean, required)
- `items[].openIssues` (integer, required)
- `items[].description` (string, required)
- `fetchedAt` (string, required)
- `rateLimit` (object, required) — The rate-limit headers GitHub returned on THIS response, surfaced so the caller
can pace itself instead of the operation sleeping on its behalf.
- `rateLimit.limit` (integer, required) — X-RateLimit-Limit: requests allowed per window
- `rateLimit.resetAt` (string, required) — X-RateLimit-Reset as an ISO-8601 UTC timestamp
- `rateLimit.resource` (string, required) — X-RateLimit-Resource: which bucket (core, search, graphql, ...)
- `rateLimit.remaining` (integer, required) — X-RateLimit-Remaining: requests left
- `rateLimit.resetEpoch` (integer, required) — X-RateLimit-Reset as unix seconds
- `totalCount` (integer, required)
- `incompleteResults` (boolean, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "q": "example",
  "page": 1,
  "perPage": 30
}
```

```json
{
  "items": [
    {
      "id": 1,
      "forks": 1,
      "owner": "microsoft",
      "stars": 1,
      "isFork": false,
      "topics": [
        "example"
      ],
      "htmlUrl": "example",
      "license": "example",
      "fullName": "example",
      "homepage": "example",
      "language": "en",
      "pushedAt": "example",
      "createdAt": "example",
      "updatedAt": "example",
      "isArchived": false,
      "openIssues": 1,
      "description": "example"
    }
  ],
  "fetchedAt": "example",
  "rateLimit": {
    "limit": 5,
    "resetAt": "example",
    "resource": "example",
    "remaining": 1,
    "resetEpoch": 1
  },
  "totalCount": 1,
  "incompleteResults": false
}
```

## Frequently asked questions

### How much does the Search GitHub Repositories API cost per call?

Each call spends 6 weighted units of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Search GitHub Repositories API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Search GitHub Repositories API responses cached?

Yes — identical requests are served from cache for 120 seconds, and a cache hit is not billed.

## More Developer Tools APIs

- [Search GitHub Users](https://upapi.io/apis/developer-tools/github-search-users)
- [Search GitHub Discussions](https://upapi.io/apis/developer-tools/github-search-discussions)
- [Search GitHub Issues](https://upapi.io/apis/developer-tools/github-search-issues)
- [Get GitHub Trending Repositories](https://upapi.io/apis/developer-tools/github-trending)
- [Get GitHub User Commit Emails](https://upapi.io/apis/developer-tools/github-user-emails)
- [List GitHub Issue Comments](https://upapi.io/apis/developer-tools/github-issue-comments)
- [List GitHub Repository Contributors](https://upapi.io/apis/developer-tools/github-repo-contributors)
- [List GitHub Repository Issues](https://upapi.io/apis/developer-tools/github-repo-issues)
