GitHub trending repositories
Beta 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
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- 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).
curl
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"Python
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,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])TypeScript
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);
}n8n
{
"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": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"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 Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Googl...",
"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,
"stars_in_range_text": "4,110 stars this week"
}
},
{
"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,
"stars_in_range_text": "5,557 stars this week"
}
}
],
"cursor": null,
"has_more": false,
"parent": null
},
"cursor": null,
"has_more": false
}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)