Skip to content

About

GitHub scraper API: GitHub AI Dataset & Documentation Collection, GitHub Repository Details & Metrics, GitHub Developer Talent Sourcing & Profiles as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

GitHub Scraper API

Scrape GitHub with a JSON API. This repo has working Python examples for DataGuru's GitHub scraper APIs: GitHub AI Dataset & Documentation Collection, GitHub Repository Details & Metrics and GitHub Developer Talent Sourcing & Profiles.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0022 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

GitHub APIs

API What it returns Price Page
GitHub AI Dataset & Documentation Collection Extract structured documentation sections, code snippets, file trees, and issue QA instruction-tuning pairs from GitHub repositories and issues for training AI models. $0.0022 https://dataguru.cc/apis/github-dataset-collection/
GitHub Repository Details & Metrics Scrape comprehensive GitHub repository details including stars, forks, watchers, open issues, PR counts, topics, license, default branch, creation date, and description. $0.0022 https://dataguru.cc/apis/github-repo-details/
GitHub Developer Talent Sourcing & Profiles Scrape GitHub developer profile information for technical recruiting and talent sourcing, including contact links, company, location, followers, and pinned repositories with stars. $0.0022 https://dataguru.cc/apis/github-talent-sourcing/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/github-scraper-api.git
cd github-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py github-dataset-collection

Examples

Every example covers all 3 GitHub APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O github.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

GitHub AI Dataset & Documentation Collection

Extract structured documentation sections, code snippets, file trees, and issue QA instruction-tuning pairs from GitHub repositories and issues for training AI models.

Parameter Type Required Description
geolocation string no Optional two-letter country code to fetch the page from, e.g. US, GB Default: US.
target string yes GitHub repository URL (e.g. psf/requests) or issue URL (e.g. psf/requests/issues/7650)

Response fields: dataset_type, url, date, has_readme, files_count, files, total_sections, records, title, author, status, instruction, input, output, all_comments, note, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/github/dataset-collection" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": "psf/requests"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "dataset_type": "documentation_and_code",
  "url": "https://example.com/...",
  "date": "2026-01-01T12:00:00Z",
  "has_readme": false,
  "files_count": 0,
  "files": [
    "string"
  ],
  "total_sections": 0,
  "records": [
    {
      "instruction": "string",
      "context": "string",
      "code_examples": [
        "string"
      ]
    }
  ],
  "title": "string",
  "author": "string",
  "status": "string",
  "instruction": "string",
  "input": "string",
  "output": "string",
  "all_comments": [
    {
      "text": "string",
      "code_blocks": [
        "string"
      ]
    }
  ],
  "note": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "GitHub AI Dataset & Documentation Collection",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

GitHub Repository Details & Metrics

Scrape comprehensive GitHub repository details including stars, forks, watchers, open issues, PR counts, topics, license, default branch, creation date, and description.

Parameter Type Required Description
geolocation string no Optional two-letter country code to fetch the page from, e.g. US, GB Default: US.
target string yes Repository in 'owner/repo' format (e.g. tiangolo/fastapi) or full GitHub repository URL

Response fields: repository_url, owner, name, full_name, description, website, stars, forks, watchers, open_issues, open_pull_requests, topics, created_date, license, default_branch, is_fork, is_archived, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/github/repo-details" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": "tiangolo/fastapi"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "repository_url": "https://example.com/...",
  "owner": "string",
  "name": "string",
  "full_name": "string",
  "description": "string",
  "website": "string",
  "stars": 0,
  "forks": 0,
  "watchers": 0,
  "open_issues": "string",
  "open_pull_requests": "string",
  "topics": [
    "string"
  ],
  "created_date": "2026-01-01T12:00:00Z",
  "license": "string",
  "default_branch": "string",
  "is_fork": false,
  "is_archived": false,
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "GitHub Repository Details & Metrics",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

GitHub Developer Talent Sourcing & Profiles

Scrape GitHub developer profile information for technical recruiting and talent sourcing, including contact links, company, location, followers, and pinned repositories with stars.

This API needs a real input value: replace the placeholder in the examples, then run it by name.

Parameter Type Required Description
geolocation string no Optional two-letter country code to fetch the page from, e.g. US, GB Default: US.
target string yes GitHub username (e.g. torvalds, tiangolo) or full GitHub profile URL

Response fields: profile_url, username, full_name, bio, company, location, website, public_email, social_links, followers, following, pinned_repositories, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/github/talent-sourcing" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": "<github-username>"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "profile_url": "https://example.com/...",
  "username": "string",
  "full_name": "string",
  "bio": "string",
  "company": "string",
  "location": "string",
  "website": "string",
  "public_email": "user@example.com",
  "social_links": [
    "string"
  ],
  "followers": "string",
  "following": "string",
  "pinned_repositories": [
    {
      "name": "string",
      "url": "https://example.com/...",
      "description": "string",
      "language": "string",
      "stars": "string",
      "forks": "string"
    }
  ],
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "GitHub Developer Talent Sourcing & Profiles",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

GitHub scraper API: GitHub AI Dataset & Documentation Collection, GitHub Repository Details & Metrics, GitHub Developer Talent Sourcing & Profiles as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors