GitHub Scraper - Repo Code, Docs & Metadata to LLM Text
Chat with a repo: turn any GitHub repository into LLM-ready text - README, file tree and source files as clean text with token counts, plus repo metadata and optional issues. Feed a codebase to ChatGPT/Claude or a RAG pipeline. Official GitHub API, no token required. Export JSON, CSV or Markdown.
Guide: Web data for AI agents
GitHub Scraper — Repo Code, Docs & Metadata to LLM Text
Chat with a repo. Turn any GitHub repository into clean, LLM-ready text: the README, the file tree, and the contents of selected source/doc files — each with a token count — plus repo metadata and (optionally) recent issues. Built for feeding a codebase into ChatGPT / Claude or a RAG pipeline.
Why this one
AI coding assistants and RAG-over-code are one of the biggest LLM use cases. This Actor gives you the whole repo as structured text in one run — no cloning, no git, no parsing HTML. It uses GitHub's official REST API plus raw.githubusercontent.com, so it's fast and reliable. Works without a token (60 req/h); add one for 5,000 req/h.
What it does
- Scrape multiple repos by
owner/repoor URL. - README + file tree + file contents (filtered by glob patterns).
- Sensible include/exclude defaults (code + docs in;
node_modules, lockfiles, binaries out). - Caps for max files, file size, and chars per file to control token cost.
- Optional issues as text.
- Export to JSON, CSV, or Markdown, or pull via the Apify API.
Input
| Field | Description |
|---|---|
repos |
Repositories as owner/repo or GitHub URLs. |
includeReadme / includeFileTree / includeFileContents |
What to return. |
includePatterns / excludePatterns |
Glob filters (defaults provided). |
maxFiles / maxFileSizeKB / maxCharsPerFile |
Token-budget caps. |
includeIssues / maxIssues |
Optionally pull issues. |
githubToken |
Optional PAT for a higher rate limit. |
Example
{
"repos": ["apify/apify-sdk-python"],
"includeReadme": true,
"includeFileContents": true,
"includePatterns": ["*.py", "*.md"],
"maxFiles": 50,
"maxFileSizeKB": 100
}
Output
One repo record (metadata + README + tree), then one file record per selected file:
{ "resultType": "file", "repo": "apify/apify-sdk-python", "path": "src/apify/actor.py",
"content": "from __future__ ...", "tokensApprox": 1820,
"url": "https://github.com/apify/apify-sdk-python/blob/master/src/apify/actor.py" }
Use cases
- RAG over a codebase — chunk
file.contentinto a vector DB, ask questions about the repo. - LLM code review / onboarding — paste README + key files into ChatGPT/Claude.
- Docs generation — summarise a repo from its README and source.
- Dependency / license audits — pull metadata across many repos.
FAQ
Do I need a token? No — but a token raises the limit to 5,000 req/h for large runs.
How are binary files handled? Skipped (size cap + a binary guard); only text is returned.
🤖 Use with Claude or ChatGPT (MCP)
Run this actor from Claude, ChatGPT, Cursor or any MCP client via the Apify MCP server. In Claude Desktop: Settings → Connectors → Add custom connector → https://mcp.apify.com. Or expose just this tool:
{ "mcpServers": { "apify": { "url": "https://mcp.apify.com?tools=get_anything/github-repo-scraper" } } }
Full guide: Connect Apify actors to Claude & ChatGPT.
⭐ Found this useful?
If this Actor saved you time, please leave a rating on its Apify page — reviews genuinely help others discover it and help me keep improving it.
Related scrapers
LLM Web Scraper - Website to Markdown for RAG & ChatGPT
Turn any URL or website into clean, LLM-ready Markdown or text - boilerplate, ads and nav stripped - with metadata and token count. Feed ChatGPT/Claude context or build RAG pipelines. HTTP-fast with a hardened-browser fallback for JS-heavy pages. Export JSON, CSV or Markdown.
AI Web Search Scraper - SERP & Page Content for LLM RAG
Web search API for LLMs: query -> clean results (title, URL, snippet, position, domain) and OPTIONALLY each page's full content as LLM-ready Markdown. Ground ChatGPT/Claude and RAG pipelines with live web results. Google (browser-rendered) or DuckDuckGo engine. Export JSON, CSV or Markdown.
SERP Scraper - Google, Bing & DuckDuckGo for LLM/RAG
Scrape search engine results by keyword: organic results (title, URL, snippet, position) and Related Searches. Bing (default, reliable) plus DuckDuckGo and best-effort Google, all rendered in a hardened browser. Any country & language, pagination, no API key. Ideal for SEO, RAG and LLM grounding.