SFOLN

Catalogue / Data utilities

GitHub Repository Stats Scraper

sfoln/github-repo-stats · Developer tools, AI, Automation On request

GitHub repository stats as clean JSON: stars, forks, watchers, open issues and pull requests, licence, topics, language breakdown, latest release, contributors count and 52 weeks of commit activity, for repositories or every public repo of a user or organization. $1 per 1,000 repos.

About

What it does

GitHub Repository Stats Scraper turns GitHub repositories into one clean JSON record each: stars, forks, watchers, open issues and open pull requests (counted separately), licence, topics, default branch, language breakdown, created / updated / last-push dates, the latest release, the number of contributors and 52 weeks of commit activity. Give it repositories (owner/name or URLs) or users and organizations (their public repositories, best first). Built for developer-tool market research, open-source due diligence, dependency health checks and AI agents; $0.001 per repository.

Price

Price per delivered record

EventPricePer 1,000Charged for
GitHub repository
repo
$0.001$1 / 1,000Charged once per repository record delivered: a repository you listed, or each repository listed for a user or organization.

Apify free plan: up to 10 items per run. Paid plans have no per-run cap; set maxTotalChargeUsd to cap spend.

Run

Call it from code, an agent or the Console

This API is private on Apify for now. Email us and we will publish it for you, usually within two working days. The calls below work once it is public. contact@sfoln.com

curl · synchronous run, rows in the response
curl -X POST "https://api.apify.com/v2/actors/sfoln~github-repo-stats/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"repositories":["apify/crawlee"]}'
mcp.json · hosted Apify MCP server
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=sfoln/github-repo-stats"
    }
  }
}
asynchronous run · for large batches
POST https://api.apify.com/v2/actors/sfoln~github-repo-stats/runs?maxTotalChargeUsd=1
GET  https://api.apify.com/v2/actor-runs/{runId}            # until status is SUCCEEDED
GET  https://api.apify.com/v2/datasets/{defaultDatasetId}/items?format=json

Authenticate with an Apify API token. MCP clients can instead sign in with OAuth when prompted. Example prompt for an agent: Compare the GitHub repositories apify/crawlee and microsoft/playwright: stars, forks, open issues and pull requests, latest release and commits in the last 12 weeks.

Input

Input fields

List repositories, or users and organizations whose public repositories you want. Each repository becomes one dataset record with a status field; each account also gets one free summary record.

FieldTypeDefaultMeaning
repositoriesarray—Repositories
Repositories as owner/name or GitHub URLs (https://github.com/owner/name, .git and /tree/… URLs work too). Accounts on the Apify free plan can process up to 10 inputs per run.
ownersarray—Users or organizations
GitHub users or organizations (login or profile URL): their public repositories are listed (see Max repositories per account) and each one becomes a charged record.
maxReposPerOwnerinteger20Max repositories per account
Repositories returned (and charged) per user or organization, best first. Accounts on the Apify free plan get up to 20 per account. Range 1–1000.
ownerReposSortstring"stars"Account repositories order
Which repositories of an account come first: most stars, most forks, or most recently updated. One of "stars", "forks", "updated".
includeForksbooleanfalseInclude forks
Account listings: also list repositories that are forks.
includeArchivedbooleanfalseInclude archived repositories
Account listings: also list archived (read-only) repositories.
includeLanguagesbooleantrueLanguages breakdown
Bytes and percent per language (1 request per repository).
includeLatestReleasebooleantrueLatest release
Tag, name and date of the latest published release (1 request per repository).
includeContributorsbooleantrueContributors count
Contributors including anonymous commit authors (1 request per repository; GitHub does not count them for the very largest repositories).
includePullRequestsbooleantrueOpen pull requests
Open pull requests, which also splits GitHub's open issue count into issues and pull requests (1 request per repository).
includeCommitActivitybooleantrueCommit activity (52 weeks)
Commits per week over the last 52 weeks, plus 4-, 12- and 52-week totals (1 request per repository, best effort: GitHub computes them on demand).
githubTokenstring—GitHub token (optional)
Your own GitHub personal access token (no scopes needed for public data) for your own quota of 5,000 requests per hour. Without it the Actor uses its shared token, or GitHub's 60 requests per hour when none is configured. Only ever sent to api.github.com.
maxItemsinteger500Max inputs
Safety cap on repositories plus accounts processed in this run; further inputs are ignored and counted in the OUTPUT record. Range 1–10000.
concurrencyinteger4Concurrency
Inputs processed in parallel. Range 1–8.
itemTimeoutSecsinteger600Timeout per input (seconds)
An input still running after this long is stopped (repositories of an account already delivered are kept). Range 60–3600.
includeRawbooleanfalseInclude raw GitHub data
Attach GitHub's repository, languages and release objects to each record (larger output).
Example input
{
  "repositories": [
    "apify/crawlee"
  ]
}

Output

One record per input item

Records land in the run's dataset; a synchronous call returns them directly. Each has a status (ok is charged; everything else is free) and a charged flag. The run's OUTPUT record totals items and charges.

FieldTypeMeaning
inputstring | objectInput
The input item this record corresponds to.
statusstringStatus
ok | not_found | error | skipped_invalid | skipped_budget | skipped_free_plan | skipped_unmetered e.g. "ok"
chargedbooleanCharged
Whether this record incurred a pay-per-event charge.
chargedEventstringCharged event
Pay-per-event event charged for this record (present only when charged).
chargedCountintegerEvents charged
Events actually charged when the charge came back short of the requested count (present only then; a warning explains it).
sourcestringSource
Upstream data source (github = GitHub REST API).
fetchedAtstringFetched at
ISO timestamp.
errorobjectError
{ code, message, provider?, status? } when status is not ok: not_found (no such public repository or account), rate_limit (GitHub quota spent; the message has the reset time), invalid_input, http_error, timeout, network. Runtime codes: budget_exhausted, free_plan_limit, unmetered, aborted, charge_failed, record_too_large, invalid_record, dataset_push_failed.
warningsarrayWarnings
Notes, e.g. a section GitHub could not answer (its fields are null) or commit statistics still being computed.
recordTypestringRow type
repo (one per repository, charged) | summary (one per account input, free)
positionintegerPosition
Repositories of an account: rank in the chosen order.
foundbooleanFound
false when the repository or account does not exist (or is not public).
repoIdinteger | nullRepository id
GitHub repository id.
fullNamestring | nullRepository
owner/name (canonical, after renames).
ownerstring | nullOwner
Owner login (repositories and account summaries).
ownerTypestring | nullOwner type
User or Organization.
namestring | nullName
Repository name.
urlstring | nullURL
github.com page of the repository.
descriptionstring | nullDescription
Repository description.
homepagestring | nullHomepage
Website set on the repository.
topicsarrayTopics
Repository topics.
starsinteger | nullStars
Stargazers.
forksinteger | nullForks
Forks.
watchersinteger | nullWatchers
Accounts watching the repository (subscribers).
openIssuesinteger | nullOpen issues
Open issues without pull requests (null when pull requests were not counted).
openPullRequestsinteger | nullOpen pull requests
Open pull requests.
openIssuesAndPullRequestsinteger | nullOpen issues + PRs
GitHub's open_issues_count (issues and pull requests).
licensestring | nullLicence
SPDX id (NOASSERTION when GitHub cannot classify it); null when there is none.
licenseNamestring | nullLicence name
Licence name.
defaultBranchstring | nullDefault branch
Default branch.
primaryLanguagestring | nullPrimary language
GitHub's main language.
languagesarray | nullLanguages
[{ language, bytes, percent }], largest first.
createdAtstring | nullCreated
ISO timestamp.
updatedAtstring | nullUpdated
ISO timestamp (any change, incl. stars).
pushedAtstring | nullLast push
ISO timestamp of the last push.
daysSinceLastPushinteger | nullDays since last push
Whole days between the last push and the fetch.
latestReleaseTagstring | nullLatest release
Tag of the latest published release (not a draft or prerelease).
latestReleaseNamestring | nullRelease name
Name of the latest release.
latestReleaseAtstring | nullReleased at
ISO publish time of the latest release.
latestReleaseUrlstring | nullRelease URL
github.com page of the latest release.
contributorsCountinteger | nullContributors
Contributors including anonymous commit authors (null for repositories GitHub will not count).
commitActivityStatusstringCommit activity
ok | pending (GitHub still computing; run again) | empty (no commits) | skipped | unavailable
commitsLast52Weeksinteger | nullCommits (52 weeks)
Commits in the last 52 weeks (default branch).
commitsLast12Weeksinteger | nullCommits (12 weeks)
Commits in the last 12 weeks.
commitsLast4Weeksinteger | nullCommits (4 weeks)
Commits in the last 4 weeks.
weeklyCommitsarray | nullWeekly commits
[{ weekStart (YYYY-MM-DD, Sunday), commits }], oldest first, 52 weeks.
isArchivedboolean | nullArchived
Read-only archived repository.
isForkboolean | nullFork
The repository is a fork.
forkedFromstring | nullForked from
Parent repository of a fork.
isTemplateboolean | nullTemplate
Template repository.
isDisabledboolean | nullDisabled
Disabled by GitHub.
visibilitystring | nullVisibility
public.
sizeKbinteger | nullSize (KB)
Repository size in KB.
hasIssuesboolean | nullIssues enabled
Issues enabled.
hasWikiboolean | nullWiki enabled
Wiki enabled.
hasPagesboolean | nullPages enabled
Pages enabled.
hasDiscussionsboolean | nullDiscussions enabled
Discussions enabled.
ownerNamestring | nullAccount name
Summary records: display name of the account.
ownerUrlstring | nullAccount URL
Summary records.
publicReposinteger | nullPublic repositories
Summary records: public repositories of the account.
followersinteger | nullFollowers
Summary records.
blogstring | nullWebsite
Summary records: website of the account.
locationstring | nullLocation
Summary records.
twitterUsernamestring | nullX handle
Summary records.
reposFoundinteger | nullRepositories found
Summary records: repositories matching the account listing (forks and archived as configured).
resultsDeliveredintegerRepositories delivered
Summary records: repository records delivered (and charged) for the account.
stopReasonstringStop reason
Summary records: limit | free_plan | end | budget | aborted | deadline.
rateLimitedbooleanStopped by rate limit
Summary records: the GitHub quota ran out before every repository was fetched.
rawobjectRaw
GitHub's repository, languages and release objects (includeRaw).
Example record
{
  "input": {
    "repository": "octo-org/rocket"
  },
  "recordType": "repo",
  "repoId": 812345678,
  "fullName": "octo-org/rocket",
  "owner": "octo-org",
  "ownerType": "Organization",
  "name": "rocket",
  "url": "https://github.com/octo-org/rocket",
  "description": "A fast, typed web crawling and scraping toolkit.",
  "homepage": "https://rocket.example.dev",
  "topics": [
    "crawler",
    "scraping",
    "typescript",
    "web-scraping"
  ],
  "stars": 18234,
  "forks": 1003,
  "watchers": 121,
  "openIssues": 117,
  "openPullRequests": 40,
  "openIssuesAndPullRequests": 157,
  "license": "Apache-2.0",
  "licenseName": "Apache License 2.0",
  "defaultBranch": "master",
  "primaryLanguage": "TypeScript",
  "languages": [
    {
      "language": "TypeScript",
      "bytes": 6123456,
      "percent": 92.24
    },
    {
      "language": "JavaScript",
      "bytes": 512345,
      "percent": 7.72
    }
  ],
  "createdAt": "2019-03-04T10:12:31.000Z",
  "updatedAt": "2026-10-14T08:01:22.000Z",
  "pushedAt": "2026-10-13T17:44:09.000Z",
  "daysSinceLastPush": 1,
  "latestReleaseTag": "v3.15.1",
  "latestReleaseName": "v3.15.1",
  "latestReleaseAt": "2026-10-01T12:30:05.000Z",
  "latestReleaseUrl": "https://github.com/octo-org/rocket/releases/tag/v3.15.1",
  "contributorsCount": 315,
  "commitActivityStatus": "ok",
  "commitsLast52Weeks": 1092,
  "commitsLast12Weeks": 252,
  "commitsLast4Weeks": 84,
  "weeklyCommits": [
    {
      "weekStart": "2025-10-19",
      "commits": 21
    },
    {
      "weekStart": "2025-10-26",
      "commits": 21
    }
  ],
  "isArchived": false,
  "isFork": false,
  "forkedFrom": null,
  "isTemplate": false,
  "isDisabled": false,
  "visibility": "public",
  "sizeKb": 48213,
  "hasIssues": true,
  "hasWiki": false,
  "hasPages": true,
  "hasDiscussions": true,
  "status": "ok",
  "charged": true,
  "chargedEvent": "repo",
  "source": "github",
  "fetchedAt": "2026-10-14T22:00:00.000Z"
}

FAQ

Questions

Do I need a GitHub token?
No. The Actor uses its own token when one is configured (5,000 requests per hour, shared by all runs); without any token GitHub allows only 60 requests per hour, about 10 repositories. For large or frequent runs, add your own personal access token (no scopes needed) in githubToken: it is stored as a secret input and only sent to api.github.com.
What happens when the GitHub rate limit is reached?
The Actor reserves the requests a repository needs before it starts it, so it stops between repositories: the remaining inputs get an unbilled error record with code rate_limit and the time the limit resets. Repositories already delivered are kept.
Why is commit activity sometimes missing?
GitHub computes commit statistics on demand. When they are not ready, the Actor polls twice, then delivers the record with commitActivityStatus pending and empty commit counts; running it again a minute later returns them.

Machine-readable

This page for agents