How to get GitHub repositories
GET request to /v1/github/repositories with your input. You get clean JSON back in seconds for ~12 credits (0.4/result) per call — no OAuth, scraping or platform SDKs. List GitHub repositories with full metadata per item and cursor pagination (nextCursor + hasMore).How to get GitHub repositories (step by step)
- 1
Get a free API key
Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.
- 2
Call the GitHub Repositories API
Send an authenticated GET request to /v1/github/repositories with your input. No OAuth, no scraping setup.
- 3
Read the JSON response
Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.
Code example
curl "https://api.captapi.com/v1/github/repositories?username=vercel" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."What the response looks like
{
"success": true,
"data": {
"username": "torvalds",
"totalReturned": 5,
"nextCursor": "2",
"hasMore": true,
"repositories": [
{
"platform": "github",
"type": "repository",
"name": "linux",
"fullName": "torvalds/linux",
"url": "https://github.com/torvalds/linux",
"description": "Linux kernel source tree",
"owner": "torvalds",
"ownerUrl": "https://github.com/torvalds",
"language": "C",
"stars": 239734,
"forks": 63487,
"watchers": 239734,
"openIssues": 3,
"defaultBranch": "master",
"homepage": null,
"license": "NOASSERTION",
"topics": [],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/1024025?v=4",
"pushedAt": "2026-07-18T04:53:39Z",
"createdAt": "2011-09-04T22:48:12Z",
"updatedAt": "2026-07-18T18:40:38Z"
},
{
"platform": "github",
"type": "repository",
"name": "libgit2",
"fullName": "torvalds/libgit2",
"url": "https://github.com/torvalds/libgit2",
"description": "A cross-platform, linkable library implementation of Git that you can use in your application.",
"owner": "torvalds",
"ownerUrl": "https://github.com/torvalds",
"language": "C",
"stars": 370,
"forks": 28,
"watchers": 370,
"openIssues": 1,
"defaultBranch": "main",
"homepage": "https://libgit2.org/",
"license": "NOASSERTION",
"topics": [],
"isFork": true,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/1024025?v=4",
"pushedAt": "2023-12-19T11:45:42Z",
"createdAt": "2022-07-30T03:30:56Z",
"updatedAt": "2026-07-18T17:03:41Z"
},
{
"platform": "github",
"type": "repository",
"name": "uemacs",
"fullName": "torvalds/uemacs",
"url": "https://github.com/torvalds/uemacs",
"description": "Random version of microemacs with my private modificatons",
"owner": "torvalds",
"ownerUrl": "https://github.com/torvalds",
"language": "C",
"stars": 2089,
"forks": 313,
"watchers": 2089,
"openIssues": 15,
"defaultBranch": "master",
"homepage": null,
"license": null,
"topics": [],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/1024025?v=4",
"pushedAt": "2026-02-25T19:15:47Z",
"createdAt": "2018-01-17T22:32:21Z",
"updatedAt": "2026-07-18T17:00:55Z"
},
{
"platform": "github",
"type": "repository",
"name": "AudioNoise",
"fullName": "torvalds/AudioNoise",
"url": "https://github.com/torvalds/AudioNoise",
"description": "Random digital audio effects",
"owner": "torvalds",
"ownerUrl": "https://github.com/torvalds",
"language": "C",
"stars": 4439,
"forks": 210,
"watchers": 4439,
"openIssues": 33,
"defaultBranch": "main",
"homepage": null,
"license": "GPL-2.0",
"topics": [],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/1024025?v=4",
"pushedAt": "2026-05-08T17:20:22Z",
"createdAt": "2026-01-09T02:33:29Z",
"updatedAt": "2026-07-18T13:26:30Z"
},
{
"platform": "github",
"type": "repository",
"name": "HunspellColorize",
"fullName": "torvalds/HunspellColorize",
"url": "https://github.com/torvalds/HunspellColorize",
"description": "Wrapper around 'less' to colorize spelling mistakes using Hunspell",
"owner": "torvalds",
"ownerUrl": "https://github.com/torvalds",
"language": "C",
"stars": 355,
"forks": 15,
"watchers": 355,
"openIssues": 2,
"defaultBranch": "main",
"homepage": null,
"license": "GPL-2.0",
"topics": [],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/1024025?v=4",
"pushedAt": "2026-01-19T20:23:09Z",
"createdAt": "2026-01-18T19:57:03Z",
"updatedAt": "2026-07-18T13:22:31Z"
}
]
}
}Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | GitHub username or profile URL. |
| limit | integer | No | Max items to return (default 30, max 100). Billed per result. |
| cursor | string | No | Pagination cursor. Leave empty for the first page; then pass the nextCursor value returned in the previous response. |
| cache | boolean | No | Set true to serve from the 24h response cache. Default false — always fetch fresh data. |
Frequently asked questions
What does the GitHub Repositories API do?
The GitHub Repositories API lets you list items in bulk with metadata from a public GitHub GitHub resource using one GET request to /v1/github/repositories. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the GitHub Repositories API cost?
At the default limit this endpoint costs 12 credits (0.4 per result). Billing scales with how many results you request. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Failed or empty results are never charged.
Do I need a GitHub API key or OAuth?
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
Is the GitHub Repositories API suitable for production use?
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Use it for analytics, monitoring, and content automation.
Ready to get GitHub repositories?
Start free with 100 credits — no credit card required.
Get your free API key