← All site APIs · updated 2026-09-21

GitHub API

github.com · 1 credit when fetched live, 0 from the shared store · needs an API key

Repository facts (stars, forks, topics, license, description) scraped from the public page — no token, no API rate limit.

Counts come from the page, so they are as fresh as GitHub renders them. Private repositories are not reachable. The primary language is no longer in the server-rendered page, so `language` is usually null.

GET /v1/structured/github/repo

Repository. Public repository overview.

ParameterTypeRequiredDescription
ownerstringyesOwner login. e.g. withastro
repostringyesRepository name. e.g. astro
max_agenumbernoAccept a stored copy up to this many seconds old (credits: 0). Defaults to 3600 s (1 h); 0 forces a fresh fetch.
Example
curl "https://api.webscrapingapi.dev/v1/structured/github/repo?owner=withastro&repo=astro" -H "X-API-Key: wsa_your_key"
Response
{
  "site": "github",
  "action": "repo",
  "data": {
    "owner": "withastro",
    "repo": "astro",
    "description": "The web framework for content-driven websites.",
    "stars": 62720,
    "forks": 3798,
    "watchers": 221,
    "topics": [ "astro", "blog", "islands", … ],
    "license": "Other",
    "defaultBranch": "main",
    "releaseCount": 3251,
    "homepage": "https://astro.build"
  },
  "source": "live", "age": 0, "credits": 1
}

Returns data shaped like: { owner, repo, url, description, homepage, stars, forks, watchers, topics[], license, defaultBranch, archived, fork, releaseCount, language (null on the current GitHub layout) }. The envelope also carries site, action, params, source (live or cache), age in seconds, fetchedAt, elapsedMs and credits.

Caching. Results are stored and shared for 1 h by default. A response served from the store costs 0 credits and says "source": "cache"; pass max_age=0 to force a fresh fetch, or a smaller max_age when you need something newer.


Layout changes on github.com can break parsing; the API then returns SITE_PARSE_FAILED. If you see it, tell us on the board and it will be fixed.