GitHub Trending API

Read-only JSON API for daily, weekly and monthly snapshots. No API key required.

Available archives

These dates and counts are queried from the current database each time this page is opened. All archive dates use UTC.

PeriodEarliest dateLatest dateDates available
daily2026-09-232026-10-1826
weekly2026-10-112026-10-188
monthly2026-10-112026-10-188

Dates between the earliest and latest snapshot may be missing. A missing snapshot does not mean a repository never appeared on the live list.

Quick start

Base URL: https://gitstock.org/api/v1/github. Use HTTP GET. Responses are JSON. No authentication is required. Public responses support cross-origin browser GET requests.

curl 'https://gitstock.org/api/v1/github/trending?period=daily'
const response = await fetch('https://gitstock.org/api/v1/github/trending?period=weekly');
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const snapshot = await response.json();
console.log(snapshot.date, snapshot.items);

GET /trending/coverage

Check the available archive range before making historical requests. No parameters are required.

curl 'https://gitstock.org/api/v1/github/trending/coverage'

Returns timezone and a periods array. Each entry contains period, earliest_date, latest_date, and snapshot_count (the number of distinct saved dates). Empty periods return empty date strings and a count of zero.

Errors

Error responses use an integer code matching the HTTP status, a msg string and data: null.

HTTP statusJSON code (integer)Meaning
400400Unsupported period, invalid calendar date, unsupported description language, or an explicitly empty date.
404404No saved snapshot for the requested date and period, or no snapshots collected yet.
503503Database temporarily unavailable. Retry later.
{"code":404,"msg":"No snapshot is available for this date and period.","data":null}

Data notes

  • GitStock captures GitHub's all-language repository Trending lists at startup and hourly while the service is running.
  • Each UTC date retains the last successful capture for each period. Earlier hourly captures on that date are replaced.
  • Historical coverage starts with collected data. Missing dates are not reconstructed.
  • This API covers the all-language list. Language-specific GitHub rankings and developer rankings are not included.
  • There is no full commit-history dataset in these responses. GitStock is an independent service, not an official GitHub API.

For integrations, keep requests modest, avoid tight polling loops, and link to the relevant GitStock archive or project page when citing the data. Need help? Contact us.