Introducing the Instagram APIRead more →

GitHub Trending Repositories API. Trending repositories, on request.

Repos ranked by stars gained, by language. We handle the proxies, blocks and platform changes.

In your agent: GitHub MCP server →

GitHub Trending Repositories API at a glance

Returns GitHub's trending repositories in GitHub's order, for today, this week or this month, optionally for one programming language and one spoken language. Each repository has its ID, name, owner, description, language, exact star and fork counts, the stars it gained in the window and the contributors GitHub shows for it.

GET /v1/github/trending_repositories

Read the API reference
  • 1 credit per page, $0.75–$1.97 per 1,000 pages
  • 24 typed fields null when unknown
  • 25 repos ranked per page, GitHub's trending rank: the most stars gained in the period first
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get up to 25 repos ranked back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
GET /v1/github/trending_repositoriesTry in
const params = new URLSearchParams({
  period: "30",
});
const res = await fetch(`https://socialtap.dev/v1/github/trending_repositories?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/github/trending_repositoriesLong arrays and strings are shortened here. Real responses are complete.Docs

What you send and what comes back.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field GitHub doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • No input needed

    Every parameter is optional: the plain request returns the default list.

  • What comes back

    Code repositories with their owner, description, language, topics, license, stars, forks, watchers, open issues and when they were last pushed to.

platformstring
Platform ID (github, …).
idstring
Platform-native repository ID (string): GitHub's number, which stays the same when the repository is renamed or moves to another owner.
full_namestring
Owner and name as in its link (torvalds/linux): what people call it, though it changes when the repository is renamed or transferred.
namestring
The repository's name without its owner (linux), as its link spells it.
urlstring
Canonical repository page URL.
avatar_urlstring
The repository's own icon, apart from its owner's avatar; null when it has none. Platform CDN URLs can expire.
descriptionstring
The repository's short description (GitHub's About), as plain text; null when it has none.
ownerobject
The account that owns it: a person or an organization (owner_type).

What teams build with the GitHub Trending Repositories API.

  • Spot rising open source projects every day

  • Track what's trending in one programming language

  • Find developer tools before they go mainstream

  • Follow trending projects written in Chinese or Japanese

Good to know before you build.

  • The board is one page, in GitHub's ranking: the order of data is the rank. GitHub shows up to twenty-five repositories, often fewer, so page.end_reason is platform_limit.
  • platform_specific.github.period_star_count is the stars gained in the window you asked for, and built_by the contributors GitHub shows (up to five).
  • Topics, license, dates and watcher counts aren't on the board: send the repository's link to the GitHub Repository API for them.
  • A programming_language or spoken_language GitHub doesn't list returns invalid_input. A real one with nothing trending returns an empty page.

1 credit per page. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful pagePer 1,000 pages
Public page page1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the GitHub Trending Repositories API.

More in the API reference.

How does GitHub rank trending repositories?
By the stars a repository gained in the window, today, this week or this month. period chooses the window, and period_star_count is that number.
How do I name a language with spaces or symbols?
As GitHub writes it, in any case: Jupyter Notebook, C++, C#, Objective-C. The language part of a github.com/trending link works too.
How much does the GitHub Trending Repositories API cost?
A page of up to 25 repos ranked costs 1 credit. Every successful page is charged, empty pages included. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.
How do I get the next page?
Repeat the same request with cursor set to page.next_cursor from the previous response, keeping the other parameters. When page.has_more is false there are no more pages. Cursors expire after 24 hours.

See what's on the list right now.

Run it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 276 endpoints
Start for free Read the docs