How to run a GitHub trending repositories
GET request to /v1/github/trending-repositories with your input. You get clean JSON back in seconds for ~12 credits (0.6/result) per call — no OAuth, scraping or platform SDKs. Run a GitHub trending repositories and get structured, ranked results as clean JSON.How to run a GitHub trending 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 Trending Repositories API
Send an authenticated GET request to /v1/github/trending-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/trending-repositories?q=stars%3A%3E1000%20language%3Apython" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."What the response looks like
{
"success": true,
"data": {
"query": "stars:>1000 language:python",
"totalReturned": 5,
"repositories": [
{
"platform": "github",
"type": "repository",
"name": "public-apis",
"fullName": "public-apis/public-apis",
"url": "https://github.com/public-apis/public-apis",
"description": "A collective list of free APIs",
"owner": "public-apis",
"ownerUrl": "https://github.com/public-apis",
"language": "Python",
"stars": 451178,
"forks": 49637,
"watchers": 451178,
"openIssues": 1569,
"defaultBranch": "master",
"homepage": "https://APILayer.com/?utm_source=Github&utm_medium=Referral&utm_campaign=Public-apis-repo",
"license": "MIT",
"topics": [
"api",
"apis",
"dataset",
"development",
"free"
],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/51121562?v=4",
"pushedAt": "2026-07-13T15:58:22Z",
"createdAt": "2016-03-20T23:49:42Z",
"updatedAt": "2026-07-18T18:42:31Z"
},
{
"platform": "github",
"type": "repository",
"name": "free-programming-books",
"fullName": "EbookFoundation/free-programming-books",
"url": "https://github.com/EbookFoundation/free-programming-books",
"description": ":books: Freely available programming books",
"owner": "EbookFoundation",
"ownerUrl": "https://github.com/EbookFoundation",
"language": "Python",
"stars": 392415,
"forks": 66541,
"watchers": 392415,
"openIssues": 75,
"defaultBranch": "main",
"homepage": "https://ebookfoundation.github.io/free-programming-books/",
"license": "CC-BY-4.0",
"topics": [
"books",
"education",
"hacktoberfest",
"list",
"resource"
],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/14127308?v=4",
"pushedAt": "2026-07-18T10:02:18Z",
"createdAt": "2013-10-11T06:50:37Z",
"updatedAt": "2026-07-18T18:39:42Z"
},
{
"platform": "github",
"type": "repository",
"name": "system-design-primer",
"fullName": "donnemartin/system-design-primer",
"url": "https://github.com/donnemartin/system-design-primer",
"description": "Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.",
"owner": "donnemartin",
"ownerUrl": "https://github.com/donnemartin",
"language": "Python",
"stars": 358093,
"forks": 57258,
"watchers": 358093,
"openIssues": 572,
"defaultBranch": "master",
"homepage": null,
"license": "NOASSERTION",
"topics": [
"design",
"design-patterns",
"design-system",
"development",
"interview"
],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/5458997?v=4",
"pushedAt": "2026-03-20T01:52:19Z",
"createdAt": "2017-02-26T16:15:28Z",
"updatedAt": "2026-07-18T18:38:41Z"
},
{
"platform": "github",
"type": "repository",
"name": "awesome-python",
"fullName": "vinta/awesome-python",
"url": "https://github.com/vinta/awesome-python",
"description": "An opinionated list of Python frameworks, libraries, tools, and resources",
"owner": "vinta",
"ownerUrl": "https://github.com/vinta",
"language": "Python",
"stars": 308902,
"forks": 28346,
"watchers": 308902,
"openIssues": 19,
"defaultBranch": "master",
"homepage": "https://awesome-python.com/",
"license": "NOASSERTION",
"topics": [
"awesome",
"collections",
"python",
"python-frameworks",
"python-libraries"
],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/652070?v=4",
"pushedAt": "2026-07-17T06:08:49Z",
"createdAt": "2014-06-27T21:00:06Z",
"updatedAt": "2026-07-18T18:34:53Z"
},
{
"platform": "github",
"type": "repository",
"name": "project-based-learning",
"fullName": "practical-tutorials/project-based-learning",
"url": "https://github.com/practical-tutorials/project-based-learning",
"description": "Curated list of project-based tutorials",
"owner": "practical-tutorials",
"ownerUrl": "https://github.com/practical-tutorials",
"language": "Python",
"stars": 273888,
"forks": 35314,
"watchers": 273888,
"openIssues": 290,
"defaultBranch": "master",
"homepage": null,
"license": "MIT",
"topics": [
"beginner-project",
"cpp",
"golang",
"javascript",
"project"
],
"isFork": false,
"isArchived": false,
"ownerAvatar": "https://avatars.githubusercontent.com/u/89421154?v=4",
"pushedAt": "2026-07-13T10:06:14Z",
"createdAt": "2017-04-12T05:07:46Z",
"updatedAt": "2026-07-18T18:42:23Z"
}
]
}
}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 |
|---|---|---|---|
| q | string | No | GitHub search query. Default stars:>1000. |
| limit | integer | No | Max items to return (default 20, max 100). Billed per result. |
| 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 Trending Repositories API do?
The GitHub Trending Repositories API lets you search and return matching results from a public GitHub query using one GET request to /v1/github/trending-repositories. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the GitHub Trending Repositories API cost?
At the default limit this endpoint costs 12 credits (0.6 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 Trending 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 run a GitHub trending repositories?
Start free with 100 credits — no credit card required.
Get your free API key