Get public GitHub profile and repository data as JSON without a GitHub token. The GitHub Scraper API returns a user's or organization's public profile with pinned or popular repositories, the profile README and the contribution calendar, the full repository list of a profile, a user's starred repositories, and a repository's details: stars, forks, topics, license, README, root files and latest commit. This repo has a runnable Python, Node.js and cURL example for both endpoints and the real response each one returned.
A GitHub scraper collects public data from GitHub, such as profiles, pinned repositories, contribution activity, stars and repository statistics, and returns it as structured data. Recruiters use it to review a developer's public work, developer-tool companies to track open-source projects and their maintainers, and analysts to follow an organization's activity. With this API you send a username or an owner and repository name and get JSON back.
- Quick start
- Endpoints
- Examples by endpoint
- Example output
- Use it with AI agents (MCP)
- Use cases
- Pricing
- Errors
- FAQ
- Other languages
- Learn more
-
Create a free ScrapeBadger account. You get 1,000 free credits, no card needed.
-
Copy your API key from the dashboard and export it:
export SCRAPEBADGER_API_KEY="your_api_key"
-
Make your first request: get a user profile.
cURL
curl -sS --max-time 120 -G "https://scrapebadger.com/v1/github/profiles/torvalds" \
-H "X-API-Key: $SCRAPEBADGER_API_KEY"Python (pip install requests)
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
username = "torvalds"
response = requests.get(
f"https://scrapebadger.com/v1/github/profiles/{username}",
headers={"X-API-Key": API_KEY},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js (18+, no dependencies)
const username = 'torvalds';
const response = await fetch(`https://scrapebadger.com/v1/github/profiles/${encodeURIComponent(username)}`, {
headers: { 'X-API-Key': process.env.SCRAPEBADGER_API_KEY },
signal: AbortSignal.timeout(120000),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(JSON.stringify(await response.json(), null, 2));Every endpoint below has the same three versions in examples/, and the real response it returned is in output-samples/.
Base URL: https://scrapebadger.com. Authenticate with the X-API-Key header. Credits are charged only for successful requests.
| Endpoint | What it returns | Credits per request | Docs |
|---|---|---|---|
GET /v1/github/repositories/{owner}/{repo} |
Get repository | 10 | Docs |
GET /v1/github/profiles/{username} |
Get profile | 10 | Docs |
Each example prints the JSON response. The Python versions are below; Node.js and cURL versions are linked under each one.
A user's public profile with follower counts, company and location, pinned or popular repositories, the contribution calendar and activity, and the profile README, achievements and organizations when the user has them. Set year for a past year's calendar.
GET /v1/github/profiles/{username} · Credits: 10 · Docs
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
username |
Yes | string | GitHub login of a user or organization, e.g. torvalds or microsoft (a leading @ is fine, a URL is not) |
|
year |
integer | Overview only: 1970 through the current UTC year; activity is December or current month |
Plus 3 more parameters in the docs.
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
username = "torvalds"
response = requests.get(
f"https://scrapebadger.com/v1/github/profiles/{username}",
headers={"X-API-Key": API_KEY},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js · cURL · Output sample (37 KB)
The same endpoint for an organization returns its profile, verified domains, pinned and recent repositories, top languages, public people and the organization README.
GET /v1/github/profiles/{username} · Credits: 10 · Docs
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
username |
Yes | string | GitHub login of a user or organization, e.g. torvalds or microsoft (a leading @ is fine, a URL is not) |
|
tab |
enum | overview |
overview (default): profile, pinned or popular repositories, README and contributions. repositories: the profile's repositories, 30 per page. stars: a user's starred repositories, 30 per page. |
Plus 3 more parameters in the docs.
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
username = "microsoft"
response = requests.get(
f"https://scrapebadger.com/v1/github/profiles/{username}",
headers={"X-API-Key": API_KEY},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js · cURL · Output sample (17 KB)
With tab=repositories, the profile's repositories, 30 per page, with description, language, stars, forks and last update. Follow pagination.next_page while has_next is true.
GET /v1/github/profiles/{username} · Credits: 10 · Docs
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
username |
Yes | string | GitHub login of a user or organization, e.g. torvalds or microsoft (a leading @ is fine, a URL is not) |
|
tab |
enum | overview |
overview (default): profile, pinned or popular repositories, README and contributions. repositories: the profile's repositories, 30 per page. stars: a user's starred repositories, 30 per page. |
|
page |
integer | Repositories only: page number, 30 rows per page |
Plus 2 more parameters in the docs.
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
username = "microsoft"
response = requests.get(
f"https://scrapebadger.com/v1/github/profiles/{username}",
headers={"X-API-Key": API_KEY},
params={
"tab": "repositories",
"page": 1,
},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js · cURL · Output sample (36 KB)
With tab=stars, the repositories a user has starred and their star lists, 30 per page. Pass pagination.next_page_token to get the next page. Users only.
GET /v1/github/profiles/{username} · Credits: 10 · Docs
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
username |
Yes | string | GitHub login of a user or organization, e.g. torvalds or microsoft (a leading @ is fine, a URL is not) |
|
tab |
enum | overview |
overview (default): profile, pinned or popular repositories, README and contributions. repositories: the profile's repositories, 30 per page. stars: a user's starred repositories, 30 per page. |
|
next_page_token |
string | Stars only: previous pagination.next_page_token |
Plus 2 more parameters in the docs.
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
username = "sindresorhus"
response = requests.get(
f"https://scrapebadger.com/v1/github/profiles/{username}",
headers={"X-API-Key": API_KEY},
params={
"tab": "stars",
},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js · cURL · Output sample (16 KB)
A public repository's details on its default branch, such as stars, forks, watchers, open issues and pull requests, topics, license, languages, README, root files, latest commit and latest release.
GET /v1/github/repositories/{owner}/{repo} · Credits: 10 · Docs
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
owner |
Yes | string | Owner login (user or organization), e.g. react |
|
repo |
Yes | string | Repository name, e.g. react |
import json
import os
import requests
API_KEY = os.environ["SCRAPEBADGER_API_KEY"]
owner = "react"
repo = "react"
response = requests.get(
f"https://scrapebadger.com/v1/github/repositories/{owner}/{repo}",
headers={"X-API-Key": API_KEY},
timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))Node.js · cURL · Output sample (157 KB)
A real response from GET /v1/github/profiles/{username}, trimmed to the first items of each list. The full response is in output-samples/profile.json.
{
"profile": {
"avatar_url": "https://avatars.githubusercontent.com/u/1024025?s=64&v=4",
"bio": null,
"company": "Linux Foundation",
"created_at": "2011-09-03T15:26:22Z",
"created_utc": 1315063582,
"email": null,
"followers": 334017,
"followers_display_count": 334000,
"following": 0,
"following_display_count": 0,
"hireable": null,
"id": 1024025,
"is_organization": false,
"is_sponsorable": false,
"link": "https://github.com/torvalds",
"location": "Portland, OR",
"login": "torvalds",
"name": "Linus Torvalds",
"node_id": "MDQ6VXNlcjEwMjQwMjU=",
"packages_count": 0,
"projects_count": 0,
"public_gists": 1,
"public_repos": 13,
"repos": 13,
"repos_display_count": 13,
"site_admin": false,
"starred_count": 2,
"twitter_username": null,
"type": "User",
"updated_at": "2026-11-01T20:12:14Z",
"updated_utc": 1793563934,
"user_view_type": "public"
},
"pinned_repositories": [
{
"description": "Linux kernel source tree",
"forks": 66900,
"forks_approximate": true,
"full_name": "torvalds/linux",
"id": 2325298,
"language": "C",
"language_color": "#555555",
"link": "https://github.com/torvalds/linux",
"name": "linux",
"owner": {
"login": "torvalds"
},
"position": 1,
"stars": 257000,
"stars_approximate": true,
"visibility": "Public"
}
]
}ScrapeBadger runs a hosted MCP server, so Claude, Cursor, ChatGPT and other agents can call the GitHub endpoints as tools, with no code.
- Claude (claude.ai or Claude Desktop): Settings → Connectors → Add custom connector →
https://mcp.scrapebadger.com/mcp, then sign in. No API key needed. - Cursor, VS Code, Windsurf and other clients: add this server to your MCP config:
{
"mcpServers": {
"scrapebadger": {
"url": "https://mcp.scrapebadger.com/mcp?apis=github",
"headers": { "Authorization": "Bearer YOUR_SCRAPEBADGER_API_KEY" }
}
}
}Then ask:
Look up the GitHub repository react/react and tell me its stars, forks, license and when the last commit was made.
Setup guides for each client are in the MCP docs.
| Use case | What you collect | Endpoints |
|---|---|---|
| Developer research for recruiting | A developer's pinned projects, languages, contribution activity and organizations | Get a user profile |
| Open-source project tracking | Stars, forks, topics, license and latest commit of the repositories you follow | Get a repository |
| Organization monitoring | An organization's public repositories, top languages and people | Get an organization profile, List a profile's repositories |
| Interest and community mapping | What a developer stars, to find related projects and communities | List a user's starred repositories |
- Each endpoint's credit cost is listed in the endpoints table.
- Only successful requests are billed. Blocked, empty and failed results cost nothing.
- New accounts get 1,000 free credits. After that, pay as you go or pick a monthly plan. Credits on pay-as-you-go never expire.
See ScrapeBadger pricing for the price per credit on each plan.
Errors come back as JSON with a detail field (and an error code on some).
| Status | Meaning | What to do |
|---|---|---|
400 / 422 |
A parameter is missing or invalid | Check the parameter table for the endpoint |
401 |
Missing, invalid or expired API key | Send the key in the X-API-Key header |
402 |
Out of credits | Top up or upgrade in the dashboard |
403 |
The key can't call this API, or the request came from an IP the key doesn't allow | Check the key's scopes and IP allowlist |
404 |
The item, page or profile doesn't exist (or is no longer public) | Check the ID; not billed |
429 |
Over your account's max concurrency | Wait Retry-After (1 s) and retry; run fewer calls in parallel (concurrency) |
502 / 503 / 504 |
The target site failed or timed out on this attempt | Not billed. Retry with backoff |
Long calls can run asynchronously: send Prefer: respond-async and poll the returned request_id (async requests).
Is it legal to scrape GitHub?
This API only returns data GitHub shows publicly on profiles and repositories. Collecting public data is generally lawful in most jurisdictions, but profiles contain personal data, so check the rules that apply to how you store and use them (for example GDPR), and ask a lawyer if you're unsure. Private repositories and member-only organization views are not available.
Do I need a GitHub token?
No. You only need a ScrapeBadger API key. There's no GitHub app, OAuth token or GitHub rate limit to manage.
How much does it cost?
Every successful request costs 10 credits, on every profile tab and for repository details, and failed requests are free. You get 1,000 free credits when you sign up, then pay as you go or pick a plan on the pricing page.
What can't it do?
It reads one profile or one repository per request. General GitHub search, trending, private repositories and member-only organization views are not part of this API.
How fast is it, and are there rate limits?
Calls usually answer in about 5 seconds. There's no per-minute cap: you can run as many requests in parallel as your plan's max concurrency allows, and a request over it gets 429 without being billed.
These examples use plain HTTP. Official SDKs wrap every endpoint with types and retries:
| Language | Repository | Install |
|---|---|---|
| Python | scrape-badger/scrapebadger-python | pip install scrapebadger |
| Node.js / TypeScript | scrape-badger/scrapebadger-node | npm install scrapebadger |
| Go | scrape-badger/scrapebadger-go | |
| Java | scrape-badger/scrapebadger-java | |
| C# | scrape-badger/scrapebadger-csharp | |
| PHP | scrape-badger/scrapebadger-php | |
| Ruby | scrape-badger/scrapebadger-ruby | |
| Rust | scrape-badger/scrapebadger-rust | |
| Kotlin | scrape-badger/scrapebadger-kotlin | |
| Swift | scrape-badger/scrapebadger-swift | |
| Dart | scrape-badger/scrapebadger-dart | |
| C++ | scrape-badger/scrapebadger-cpp |
There is also a CLI (pip install scrapebadger-cli) and an n8n node.
- GitHub Scraper API: features, pricing and a live playground
- GitHub API documentation
ScrapeBadger is an independent tool and is not affiliated with, endorsed by, or sponsored by GitHub, Inc. "GitHub" is a trademark of GitHub, Inc., used here only to describe the platform this scraper works with. This repository only covers publicly available data. You are responsible for how you use the data you collect and for following the laws that apply to you.
MIT. The examples are free to copy into your own projects.
