GitHub trending repositories API
  1. Docs
  2. GitHub
  3. GitHub trending repositories API

GitHub trending repositories API

GitHub's public Trending page: ranked repositories with description, language, stars, forks, stars gained in the range and the users who built them.

GET /v1/github/trending/repositories

GET /v1/github/trending/repositories

GitHub's public Trending page: ranked repositories with description, language, stars, forks, stars gained in the range and the users who built them.

  • Cost: 1 credit
  • Cache: Results are kept up to 1 day; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
languagestringnoCoding language, e.g. javascript, python, go.
sincestringnoTrending range. One of daily, weekly, monthly. Default daily.
spoken_language_codestringnoSpoken language filter, e.g. en.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

1curl -G "https://api.socialscrape.dev/v1/github/trending/repositories" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "language=python" \4  --data-urlencode "since=weekly"

Example response#

This is a sample from a recorded response, lists and long text are shortened. Status 200.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_c4fc774b21d57135067b1418",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "repo",13        "platform": "github",14        "id": null,15        "full_name": "AgriciDaniel/claude-seo",16        "name": "claude-seo",17        "url": "https://github.com/AgriciDaniel/claude-seo",18        "owner": {19          "id": null,20          "handle": "AgriciDaniel",21          "name": null,22          "url": "https://github.com/AgriciDaniel",23          "avatar_url": null,24          "verified": null25        },26        "description": "Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Googl...",27        "language": "Python",28        "topics": null,29        "license": null,30        "stars": 24017,31        "forks": 3224,32        "watchers": null,33        "open_issues": null,34        "is_fork": null,35        "is_archived": null,36        "default_branch": null,37        "created_at": null,38        "updated_at": null,39        "pushed_at": null,40        "extra": {41          "built_by": [42            {43              "avatar_url": "https://avatars.githubusercontent.com/u/223140489?s=40&v=4",44              "username": "AgriciDaniel"45            },46            {47              "avatar_url": "https://avatars.githubusercontent.com/u/81847?s=40&v=4",48              "username": "claude"49            },50            {51              "avatar_url": "https://avatars.githubusercontent.com/u/129338099?s=40&v=4",52              "username": "Nordalux"53            }54          ],55          "language_color": "#3572A5",56          "language_filter": "python",57          "rank": 1,58          "since": "weekly",59          "stars_in_range": 4110,60          "stars_in_range_text": "4,110 stars this week"61        }62      },63      {64        "object": "repo",65        "platform": "github",66        "id": null,67        "full_name": "TauricResearch/TradingAgents",68        "name": "TradingAgents",69        "url": "https://github.com/TauricResearch/TradingAgents",70        "owner": {71          "id": null,72          "handle": "TauricResearch",73          "name": null,74          "url": "https://github.com/TauricResearch",75          "avatar_url": null,76          "verified": null77        },78        "description": "TradingAgents: Multi-Agents LLM Financial Trading Framework",79        "language": "Python",80        "topics": null,81        "license": null,82        "stars": 118339,83        "forks": 22634,84        "watchers": null,85        "open_issues": null,86        "is_fork": null,87        "is_archived": null,88        "default_branch": null,89        "created_at": null,90        "updated_at": null,91        "pushed_at": null,92        "extra": {93          "built_by": [94            {95              "avatar_url": "https://avatars.githubusercontent.com/u/48253104?s=40&v=4",96              "username": "Yijia-Xiao"97            },98            {99              "avatar_url": "https://avatars.githubusercontent.com/u/68405458?s=40&v=4",100              "username": "EdwardoSunny"101            },102            {103              "avatar_url": "https://avatars.githubusercontent.com/u/91041827?s=40&v=4",104              "username": "CadeYu"105            }106          ],107          "language_color": "#3572A5",108          "language_filter": "python",109          "rank": 2,110          "since": "weekly",111          "stars_in_range": 5557,112          "stars_in_range_text": "5,557 stars this week"113        }114      }115    ],116    "cursor": null,117    "has_more": false,118    "parent": null119  },120  "cursor": null,121  "has_more": false122}

Response#

A list of Repo objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.