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.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 1 day
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/github/trending/repositories" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'language=python' \
--data-urlencode 'since=weekly'import os
import requests
params = {
"language": "python",
"since": "weekly",
}
res = requests.get(
"https://api.socialscrape.io/v1/github/trending/repositories",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/github/trending/repositories");
url.search = new URLSearchParams({
language: "python",
since: "weekly",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape GitHub trending repositories",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/github/trending/repositories",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "language",
"value": "python"
},
{
"name": "since",
"value": "weekly"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
language | string | Coding language, e.g. javascript, python, go. | |
since | string | Trending range. | |
spoken_language_code | string | Spoken language filter, e.g. en. | |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_c4fc774b21d57135067b1418",
"data": {
"object": "list",
"items": [
{
"object": "repo",
"platform": "github",
"id": null,
"full_name": "AgriciDaniel/claude-seo",
"name": "claude-seo",
"url": "https://github.com/AgriciDaniel/claude-seo",
"owner": {
"id": null,
"handle": "AgriciDaniel",
"name": null,
"url": "https://github.com/AgriciDaniel",
"avatar_url": null,
"verified": null
},
"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 Brow...",
"language": "Python",
"topics": null,
"license": null,
"stars": 24017,
"forks": 3224,
"watchers": null,
"open_issues": null,
"is_fork": null,
"is_archived": null,
"default_branch": null,
"created_at": null,
"updated_at": null,
"pushed_at": null,
"extra": {
"built_by": [
{
"avatar_url": "https://avatars.githubusercontent.com/u/223140489?s=40&v=4",
"username": "AgriciDaniel"
},
{
"avatar_url": "https://avatars.githubusercontent.com/u/81847?s=40&v=4",
"username": "claude"
},
{
"avatar_url": "https://avatars.githubusercontent.com/u/129338099?s=40&v=4",
"username": "Nordalux"
}
],
"language_color": "#3572A5",
"language_filter": "python",
"rank": 1,
"since": "weekly",
"stars_in_range": 4110
}
},
{
"object": "repo",
"platform": "github",
"id": null,
"full_name": "TauricResearch/TradingAgents",
"name": "TradingAgents",
"url": "https://github.com/TauricResearch/TradingAgents",
"owner": {
"id": null,
"handle": "TauricResearch",
"name": null,
"url": "https://github.com/TauricResearch",
"avatar_url": null,
"verified": null
},
"description": "TradingAgents: Multi-Agents LLM Financial Trading Framework",
"language": "Python",
"topics": null,
"license": null,
"stars": 118339,
"forks": 22634,
"watchers": null,
"open_issues": null,
"is_fork": null,
"is_archived": null,
"default_branch": null,
"created_at": null,
"updated_at": null,
"pushed_at": null,
"extra": {
"built_by": [
{
"avatar_url": "https://avatars.githubusercontent.com/u/48253104?s=40&v=4",
"username": "Yijia-Xiao"
},
{
"avatar_url": "https://avatars.githubusercontent.com/u/68405458?s=40&v=4",
"username": "EdwardoSunny"
},
{
"avatar_url": "https://avatars.githubusercontent.com/u/91041827?s=40&v=4",
"username": "CadeYu"
}
],
"language_color": "#3572A5",
"language_filter": "python",
"rank": 2,
"since": "weekly",
"stars_in_range": 5557
}
}
],
"cursor": null,
"has_more": false,
"parent": null
},
"cursor": null,
"has_more": false
}Fields
A page of results. Each entry in items is a Repo. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "repo" | ||
platform | Platform | yes | |
id | string or null | ||
full_name | string | yes | "owner/name" |
name | string or null | ||
url | string or null | ||
owner | Author or null | ||
description | string or null | ||
language | string or null | ||
topics | string[] or null | ||
license | string or null | ||
stars | integer or null | ||
forks | integer or null | ||
watchers | integer or null |
Show the other 8 fields
| Field | Type | Always | Notes |
|---|---|---|---|
open_issues | integer or null | ||
is_fork | boolean or null | ||
is_archived | boolean or null | ||
default_branch | string or null | ||
created_at | string (ISO 8601 date-time) or null | ||
updated_at | string (ISO 8601 date-time) or null | ||
pushed_at | string (ISO 8601 date-time) or null | ||
extra | object or null |
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.github.trending_repositories(...) and the TypeScript client client.github.trendingRepositories(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.