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_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
language | string | no | Coding language, e.g. javascript, python, go. |
since | string | no | Trending range. One of daily, weekly, monthly. Default daily. |
spoken_language_code | string | no | Spoken language filter, e.g. en. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.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"1import os2import requests34params = {5 "language": "python",6 "since": "weekly",7}8res = requests.get(9 "https://api.socialscrape.dev/v1/github/trending/repositories",10 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},11 params=params,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/github/trending/repositories");2url.search = new URLSearchParams({3 "language": "python",4 "since": "weekly"5}).toString();6const res = await fetch(url, {7 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },8});9const body = await res.json();1011if (body.ok) {12 console.log(body.data);13} else {14 console.error(body.error.code, body.error.message);15}1{2 "nodes": [3 {4 "name": "SocialScrape GitHub trending repositories",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/github/trending/repositories",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "language",19 "value": "python"20 },21 {22 "name": "since",23 "value": "weekly"24 }25 ]26 },27 "sendHeaders": true,28 "headerParameters": {29 "parameters": [30 {31 "name": "x-api-key",32 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"33 }34 ]35 }36 }37 }38 ],39 "connections": {}40}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
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.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The 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.
Related endpoints#
- GitHub user (
GET /v1/github/user) - GitHub user repositories (
GET /v1/github/user/repositories) - GitHub repository (
GET /v1/github/repository) - GitHub followers (
GET /v1/github/user/followers) - GitHub following (
GET /v1/github/user/following) - GitHub contribution calendar (
GET /v1/github/user/contributions) - GitHub public activity (
GET /v1/github/user/activity) - GitHub pull requests by a user (
GET /v1/github/user/pull-requests)