llm.codes
Convert JS documentation to Markdown for LLM
Overview
Section titled “Overview”llm.codes is a web service for converting JavaScript-heavy documentation into clean Markdown, optimized for language models.
Website: llm.codes Repository: github.com/amantus-ai/llm-codes
Problem
Section titled “Problem”Modern documentation often uses:
- Client-side rendering (React, Vue)
- Dynamic content loading
- JavaScript navigation
AI assistants (Claude Code, Cursor) cannot execute JavaScript and see empty pages.
Solution
Section titled “Solution”llm.codes:
- Loads pages via headless browser (Firecrawl)
- Waits for JavaScript rendering
- Extracts main content
- Converts to clean Markdown
- Removes navigation, ads, boilerplate
Supported Sites
Section titled “Supported Sites”Languages and Frameworks
Section titled “Languages and Frameworks”| Category | Sites |
|---|---|
| Languages | Python, TypeScript, Rust, Go, Java, Ruby, PHP, Swift, MDN |
| Web | React, Vue.js, Angular, Next.js, Nuxt, Svelte, Django, Flask |
| Mobile | React Native, Flutter, Android, Apple Developer |
| CSS | Tailwind CSS, Bootstrap, Material-UI, Chakra UI |
Platforms
Section titled “Platforms”| Category | Sites |
|---|---|
| Cloud | AWS, Google Cloud, Azure, Vercel, Netlify |
| Databases | PostgreSQL, MongoDB, MySQL, Redis, Elasticsearch |
| DevOps | Docker, Kubernetes, Terraform, GitHub, GitLab |
| AI/ML | PyTorch, TensorFlow, Hugging Face, LangChain |
Total: 69+ documentation sites
Web Interface
Section titled “Web Interface”- Open llm.codes
- Paste documentation URL
- Configure crawl depth
- Click “Convert”
- Copy Markdown
curl "https://llm.codes/api/scrape" \ -H "Content-Type: application/json" \ -d '{ "url": "https://docs.python.org/3/library/asyncio.html", "depth": 1 }'Parameters
Section titled “Parameters”| Parameter | Description | Range |
|---|---|---|
depth | Crawl depth | 0-5 |
maxUrls | Maximum pages | 1-1000 |
Crawl Depth
Section titled “Crawl Depth”- 0 — only the specified page
- 1 — page + direct links
- 2 — recommended for most cases
- 5 — full documentation section
Optimizations
Section titled “Optimizations”Content Filtering
Section titled “Content Filtering”llm.codes removes:
- Navigation and sidebars
- Headers and footers
- Ads and banners
- Duplicate content
- Compatibility strings (iOS 14.0+, etc.)
Result
Section titled “Result”Size reduction up to 70% while preserving all useful information.
Caching
Section titled “Caching”- Results cached for 30 days
- Redis-backed for speed
- Repeat requests are instant
AI Integration
Section titled “AI Integration”Claude Code
Section titled “Claude Code”# Get documentationcurl -s "https://llm.codes/api/scrape?url=https://docs.example.com" \ | claude "Explain how to use this API"In Prompts
Section titled “In Prompts”Below is the documentation for the XYZ library:
[paste llm.codes output]
Based on this documentation, help me implement...Comparison with Other Tools
Section titled “Comparison with Other Tools”| Tool | JS Rendering | Crawling | Filtering |
|---|---|---|---|
| llm.codes | ✅ | ✅ | ✅ |
| curl | ❌ | ❌ | ❌ |
| wget | ❌ | ✅ | ❌ |
| llmstxt | ❌ | ✅ | Basic |
Self-Hosting
Section titled “Self-Hosting”git clone https://github.com/amantus-ai/llm-codescd llm-codesnpm installnpm run devEnvironment Variables
Section titled “Environment Variables”FIRECRAWL_API_KEY=fc-... # RequiredUPSTASH_REDIS_URL=... # Optional (for cache)Use Cases
Section titled “Use Cases”Apple Developer Docs
Section titled “Apple Developer Docs”Apple uses heavy JavaScript. llm.codes is the only way to get content for LLM:
https://llm.codes/?url=https://developer.apple.com/documentation/swiftuiReact Documentation
Section titled “React Documentation”New React documentation (react.dev) also requires JS:
https://llm.codes/?url=https://react.dev/reference/react/hooksLimitations
Section titled “Limitations”- Only whitelist of 69 sites
- Requires Firecrawl API key for self-hosting
- Rate limiting for public API
- No support for authenticated content
Relationship to llms.txt
Section titled “Relationship to llms.txt”llm.codes complements the llms.txt standard:
- llms.txt — index of pages with links
- llm.codes — get content of specific pages
Workflow:
llms.txt → select needed URLs → llm.codes → get Markdown