GitHub Trending Repositories API
Pull the public GitHub trending repositories list — optional language and time-window filters — as ranked JSON in Social Fetch's shared envelope.
GET /v1/github/trending/repositories1 credit per successful request.
About this endpoint
Developer tools, open-source scouts, and research agents watch GitHub trending to catch repos that are gaining stars right now, not just all-time popular projects. Scraping github.com/trending yourself means brittle HTML, locale quirks, and a page that was never an API. Official GitHub REST/GraphQL also does not expose the trending page as a first-class list endpoint.
`GET /v1/github/trending/repositories` returns the trending repositories list for the selected filters. Optional `language` narrows by programming language. Optional `since` is `daily`, `weekly`, or `monthly` (defaults to daily when omitted). Optional `spokenLanguageCode` filters the spoken-language control on the trending page. The response echoes the applied `since`, `language`, and `spokenLanguageCode` (null when unfiltered), then `repositories` in rank order and `totalResults` matching that array length. Each row includes rank, owner, repo, fullName, url, description, language, stars and forks when present, `starsToday` / `starsTodayText` for stars gained in the window, and `builtBy` when GitHub shows contributors.
Credit pricing for this operation comes from the API registry and appears on this page; `meta.creditsCharged` is the billing source of truth. This route is repositories only. For trending people, use `GET /v1/github/trending/developers`. For a known login's repos, use the profile repositories path under `/v1/github/profiles/{handle}`.
GitHub Trending Repositories API FAQ
How do I list GitHub trending repositories via API?
Call GET /v1/github/trending/repositories with your Social Fetch API key in the x-api-key header. Optionally pass language, since (daily, weekly, or monthly), and spokenLanguageCode. Full parameters and examples are in the API docs linked from this page.
What does the trending repositories response include?
data.since, data.language, and data.spokenLanguageCode echo the filters applied (null when unfiltered). data.repositories is the ranked list; data.totalResults matches that array length. Each repository row includes rank, owner, repo, fullName, url, description, language fields, star and fork counts when available, stars gained in the window (starsToday / starsTodayText), and builtBy contributors when shown. The shared envelope also carries meta.requestId and meta.creditsCharged.
How do since, language, and spokenLanguageCode work?
since selects the trending window: daily, weekly, or monthly. Omitting since uses daily. language is an optional programming-language filter. spokenLanguageCode is an optional spoken-language filter matching GitHub's trending controls. Keep the same filters when you compare successive snapshots.
How many credits does GitHub trending repositories cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.
Is this the same as trending developers?
No. This endpoint lists trending repositories. GET /v1/github/trending/developers lists trending developers (with an optional popularRepository on each person). Use the route that matches the entity you need.
Does this endpoint paginate with a cursor?
No. The trending repositories response returns one ranked list for the selected filters. There is no cursor or hasMore page object on this operation. If you need another window or language, call again with different query params.
Do I need a GitHub personal access token for trending?
No. Authenticate to Social Fetch with an API key only. You do not create a GitHub OAuth app or pass a personal access token for this public trending list.
Other GitHub endpoints
- ProfileGET /v1/github/profiles/{handle}
- RepositoriesGET /v1/github/profiles/{handle}/repositories
- RepositoryGET /v1/github/repositories
- ActivityGET /v1/github/profiles/{handle}/activity
- FollowersGET /v1/github/profiles/{handle}/followers
- FollowingGET /v1/github/profiles/{handle}/following
- ContributionsGET /v1/github/profiles/{handle}/contributions
- Trending developersGET /v1/github/trending/developers