GitHub
GET /v1/github/trending-repositories

GitHub Trending Repositories API

Run a GitHub trending repositories and get structured, ranked results as clean JSON.

~12 credits (0.6/result) per request
TL;DR
Run a GitHub trending repositories and get structured, ranked results as clean JSON. The GitHub Trending Repositories API (GitHub) is a single authenticated GET request to /v1/github/trending-repositories that responds with clean JSON and costs ~12 credits (0.6/result). Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the GitHub Trending Repositories API?

The GitHub Trending Repositories API lets you search and return matching results for GitHub trending repositories with a single REST call. No OAuth, no infrastructure to maintain, and no platform SDKs — send the request, get clean structured JSON back. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh.

What you get

  • Ranked, structured result list
  • Title, URL, author, and thumbnail per result when available
  • Engagement metrics where the platform exposes them
  • Configurable result limit

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
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_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "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 is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success, cached, creditsUsed, and a data object with the following fields:

Top-level fields

  • queryThe search query you sent.
  • totalReturnedNumber of items returned in this response.

Repositories

Each item in repositories contains:

  • platformPlatform identifier (e.g. youtube, instagram).
  • typeContent type of the item.
  • nameName of the item or account.
  • fullNameFull display name.
  • urlCanonical URL of the item.
  • descriptionDescription text.
  • ownerOwner of the repository.
  • ownerUrlOwner url URL.
  • languageDetected or requested language code.
  • starsStar count.
  • forksFork count.
  • watchersWatcher count.
  • openIssuesOpen issue count.
  • defaultBranchDefault branch name.
  • homepageProject homepage URL.
  • licenseLicense identifier.
  • topicsDetected topics and themes.
  • isForkWhether the repository is a fork.
  • isArchivedWhether the repository is archived.
  • ownerAvatarOwner avatar URL.
  • pushedAtLast push date (ISO 8601).
  • createdAtCreation date (ISO 8601).
  • updatedAtLast update date (ISO 8601).

Parameters

NameTypeRequiredDescription
qstringNoGitHub search query. Default stars:>1000.
limitintegerNoMax items to return (default 20, max 100). Billed per result.
cachebooleanNoSet true to serve from the 24h response cache. Default false — always fetch fresh data.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs ~12 credits (0.6/result) — billed per result, so the exact amount scales with how many items you request. Pass cache=true for a free 24h cache hit; default is always fresh (metrics refresh within ~1 hour).

Using an AI agent? This endpoint is the MCP tool github_trending_repositories via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/github/trending-repositories and parse the JSON response.

Use cases

Trend Discovery

Find trending content by keyword or hashtag.

Content Sourcing

Build feeds and playlists programmatically.

Monitoring

Track topics, brands, and competitors.

Research

Sample large sets of content for analysis.

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.

More GitHub APIs

Ready to use the GitHub Trending Repositories API?

Sign up, grab your key, and make your first call in 60 seconds.