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 per call — no OAuth, scraping or platform SDKs. Search GitHub programmatically and get structured, ranked results.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. Results are cached for 24 hours, so repeat calls are free.
Code example
curl "https://api.captapi.com/v1/github/trending-repositories?q=skincare" \
-H "Authorization: Bearer capt_live_..."What the response looks like
{
"success": true,
"cached": false,
"creditsUsed": 12,
"data": {
"query": "stars:>1000",
"totalReturned": 5,
"repositories": [
{
"platform": "github",
"type": "repository",
"name": "build-your-own-x",
"fullName": "codecrafters-io/build-your-own-x",
"url": "https://github.com/codecrafters-io/build-your-own-x",
"description": "Master programming by recreating your favorite technologies from scratch.",
"owner": "codecrafters-io",
"ownerUrl": "https://github.com/codecrafters-io",
"language": "Markdown",
"stars": 522278,
"forks": 49409,
"watchers": 522278,
"openIssues": 518,
"defaultBranch": "master",
"homepage": "https://codecrafters.io",
"license": null,
"topics": [
"awesome-list",
"free",
"programming",
"tutorial-code",
"tutorial-exercises"
],
"isFork": null,
"isArchived": null,
"ownerAvatar": "https://avatars.githubusercontent.com/u/58904235?v=4",
"pushedAt": "2026-06-25T14:41:09Z",
"createdAt": "2018-05-09T12:03:18Z",
"updatedAt": "2026-07-04T10:25:06Z"
},
{
"platform": "github",
"type": "repository",
"name": "awesome",
"fullName": "sindresorhus/awesome",
"url": "https://github.com/sindresorhus/awesome",
"description": "😎 Awesome lists about all kinds of interesting topics",
"owner": "sindresorhus",
"ownerUrl": "https://github.com/sindresorhus",
"language": null,
"stars": 481337,
"forks": 35667,
"watchers": 481337,
"openIssues": 89,
"defaultBranch": "main",
"homepage": null,
"license": "CC0-1.0",
"topics": [
"awesome",
"awesome-list",
"lists",
"resources",
"unicorns"
],
"isFork": null,
"isArchived": null,
"ownerAvatar": "https://avatars.githubusercontent.com/u/170270?v=4",
"pushedAt": "2026-06-30T18:21:16Z",
"createdAt": "2014-07-11T13:42:37Z",
"updatedAt": "2026-07-04T10:23:28Z"
},
{
"platform": "github",
"type": "repository",
"name": "freeCodeCamp",
"fullName": "freeCodeCamp/freeCodeCamp",
"url": "https://github.com/freeCodeCamp/freeCodeCamp",
"description": "freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.",
"owner": "freeCodeCamp",
"ownerUrl": "https://github.com/freeCodeCamp",
"language": "TypeScript",
"stars": 451026,
"forks": 45351,
"watchers": 451026,
"openIssues": 208,
"defaultBranch": "main",
"homepage": "https://contribute.freecodecamp.org",
"license": "BSD-3-Clause",
"topics": [
"careers",
"certification",
"community",
"curriculum",
"d3"
],
"isFork": null,
"isArchived": null,
"ownerAvatar": "https://avatars.githubusercontent.com/u/9892522?v=4",
"pushedAt": "2026-07-04T09:56:40Z",
"createdAt": "2014-12-24T17:49:19Z",
"updatedAt": "2026-07-04T10:11:39Z"
},
{
"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": 446424,
"forks": 49005,
"watchers": 446424,
"openIssues": 1495,
"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": null,
"isArchived": null,
"ownerAvatar": "https://avatars.githubusercontent.com/u/51121562?v=4",
"pushedAt": "2026-06-30T20:55:54Z",
"createdAt": "2016-03-20T23:49:42Z",
"updatedAt": "2026-07-04T10:23:40Z"
},
{
"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": 391245,
"forks": 66474,
"watchers": 391245,
"openIssues": 81,
"defaultBranch": "main",
"homepage": "https://ebookfoundation.github.io/free-programming-books/",
"license": "CC-BY-4.0",
"topics": [
"books",
"education",
"hacktoberfest",
"list",
"resource"
],
"isFork": null,
"isArchived": null,
"ownerAvatar": "https://avatars.githubusercontent.com/u/14127308?v=4",
"pushedAt": "2026-07-03T21:24:08Z",
"createdAt": "2013-10-11T06:50:37Z",
"updatedAt": "2026-07-04T10:17:12Z"
}
]
}
}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. |
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 scraping setup required.
How many credits does the GitHub Trending Repositories API cost?
Each successful call costs 12 credits. Responses are cached for 24 hours, and cached results cost 0 credits. 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, and Rumble. 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, automatic retries, and a shared 24-hour cache. Use it for RAG pipelines, 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