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:
titleRepository name.slugowner/name.descriptionThe repository's description.programming_languageMain language.topicsThe topics the repository is tagged with.urlThe repository on GitHub.
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
-
Open the API page
Go to the GitHub Topic Repositories API in the catalog and check its sample records.
-
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.
-
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
- Claude Connect CleanedWeb and ask: “List the 30 most-starred GitHub repositories under the topic llm, with their language and description, as a table.”
- ChatGPT Add the connector and ask the same question in a chat.
- n8n Run the API from the verified CleanedWeb node, one item per record, on a schedule.
- Agent prompts Ready-made prompts for this API, such as an export to a spreadsheet.
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.
Related
- Docker Hub Images API Search Docker Hub images with pull counts and stars.
- Y Combinator startup jobs Jobs at YC companies as records.
More tutorials
-
Scrape Steam reviews
Every review of a game, with recommendation, votes and playtime.
-
Track Steam's most played games
Rank, current players and today's peak for the top games.
-
Track PlayStation Store prices
Base price, sale price and free status of PlayStation games.
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.