CleanedWeb

Tutorial · Developer data

Get GitHub repositories by topic as JSON or CSV

List the public GitHub repositories under any topic, such as machine-learning or web-scraping, with name, owner, description, language and topics, sorted by stars, forks or last update. Use it to map a field, find rising projects or build research lists.

What you get

Each result is one record. The main fields:

A real record from a run on 26 November 2026, shortened:

{
  "title": "firecrawl",
  "slug": "firecrawl/firecrawl",
  "description": "Knowledge infrastructure to make your agents smarter. Search, scrape and access 550+ data providers through one API.",
  "programming_language": "TypeScript",
  "topics": [
    "markdown",
    "crawler",
    "scraper",
    "ai"
  ],
  "url": "https://github.com/firecrawl/firecrawl"
}

The API page lists every field with its type.

Try it without code

  1. Open the API page

    Go to the GitHub Topic Repositories API in the catalog and check its sample records.

  2. Run it live

    Pick the inputs and click Run live. A live run in the page returns up to 3 records and needs no account; sign up to run more. New accounts get 5,000 free records.

  3. Download the records

    Copy the JSON, or turn it into a spreadsheet with the free JSON to CSV converter.

Run it from code

Create an API key under API keys in the console with the run scope, then send one request. topics is the topic as in github.com/topics/web-scraping. sort takes desc_stars, desc_forks or desc_updated. programming_language keeps one language, such as Python.

curl https://api.cleanedweb.com/v1/catalog/public/apis/generated_047a8ebb25911ccf62f4a212/endpoints/generated_047a8ebb25911ccf62f4a212_search/run \
  -H "Authorization: Bearer $CLEANEDWEB_API_KEY" \
  -H "Idempotency-Key: github-repositories-by-topic-$(date +%s)" \
  -H "Content-Type: application/json" \
  -d '{"input":{"topics":"web-scraping","sort":"desc_stars","enrich_records":false},"max_items":100}'

The same run in Python. A run that takes longer than the request waits answers 202; the loop reads its result with the same idempotency key, so nothing runs twice.

import os, time, uuid, requests

API = "https://api.cleanedweb.com/v1/catalog/public/apis/generated_047a8ebb25911ccf62f4a212/endpoints/generated_047a8ebb25911ccf62f4a212_search"
headers = {"Authorization": f"Bearer {os.environ['CLEANEDWEB_API_KEY']}",
           "Idempotency-Key": str(uuid.uuid4())}

r = requests.post(f"{API}/run", headers=headers, timeout=120,
                  json={"input": {"topics":"web-scraping","sort":"desc_stars","enrich_records":False}, "max_items": 100})
while r.status_code == 202:  # still running: read the result with the same key
    time.sleep(int(r.headers.get("Retry-After", 10)))
    r = requests.get(f"{API}/result", headers=headers, timeout=120)
r.raise_for_status()

for record in r.json()["records"]:
    print(record["slug"], record.get("programming_language"))

Runs are charged per record delivered ($1 per 1,000); a run that returns nothing costs nothing. See Run a catalog API for every option and scheduled runs to run it every day.

Use it from AI assistants and automation tools

Questions

Is this the GitHub API?

No. It reads GitHub's public topic pages, so it needs no GitHub token and lists repositories the way the topic page does.

Can I get star counts?

Turn on enrich_records to read each repository page for more fields. The list order already follows the sort you choose.

Is it legal to scrape this data?

CleanedWeb reads public pages only, without signing in. Whether you may collect and reuse the data depends on the site's terms and the law where you operate, so check both, and handle any personal data accordingly. CleanedWeb is not affiliated with the site.

What happens when the site changes?

The API is maintained: CleanedWeb checks it and repairs the extraction when the site's pages change, and keeps the fields stable within a major version. See source changes.

More tutorials

All tutorials

Need data from another site?

Browse the catalog of maintained website APIs, or ask for a site it does not cover yet. 5,000 records are free once; after that you pay per record delivered.