Skip to content

Grok API docs in markdown format because Cloudflare said 'no' to web scraping, so we said 'fine' and manually copied HTML like it's 1995. Cost: $5.70 in Claude tokens. Dignity: Priceless.

Notifications You must be signed in to change notification settings

JKapostins/grok-api-docs-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown - Grok API Docs

Last Updated: July 10, 2025

This project provides a clean, markdown representation of the Grok API documentation. Why markdown? Because our coding assistants have strong preferences and markdown is their love language. Let's be honest - we don't actually read documentation anymore (or write code, for that matter). We just feed everything to our AI overlords and hope they understand it better than we do. Perfect for RAG systems, context windows, and maintaining the illusion that we still know what we're doing.

Why This Exists

If you've ever tried to get your coding assistant to crawl the official Grok API docs, you were probably met with a friendly 403 error courtesy of Cloudflare's protective embrace. So instead of banging our heads against that particular wall, this repo contains manually scraped HTML that's been lovingly converted to beautiful markdown.

The Process

  1. Manual HTML Collection: Visited each documentation page by hand (like a caveman, but with WiFi)
  2. HTML to Markdown Conversion: Used Claude Code's /generate_markdown_from_html command to transform the HTML into pristine markdown
  3. Profit: Now we have 23 gorgeous markdown files ready for consumption

Documentation Files

The markdown-docs/ folder contains comprehensive API documentation covering:

  • Core API: Chat, models, async operations, streaming
  • Advanced Features: Function calling, structured outputs, image understanding/generation
  • Management: API keys, user management, billing
  • Utilities: Migration guides, debugging, rate limits, regions
  • Special Features: Live search, deferred completions, reasoning

Most Likely FAQ

Q: Why wouldn't you just write a Python tool to convert the HTML to markdown instead of burning your Claude tokens?

A: Because.

(Sometimes the most elegant solution is the one that works, not the one that makes the most sense.)

Q: How much did this cost to generate?

A: $5.70 using the Claude Code API. Worth every penny for 23 beautifully formatted markdown files and the satisfaction of bypassing Cloudflare.

Updating This Project

Single File Update

  1. Go to the respective documentation page on the official site
  2. Right-click → Inspect → Copy the <main> div
  3. Save it to the respective HTML file in html-docs/
  4. Ask Claude to convert it to markdown

Full Regeneration

Use the original command that created this magic:

/generate_markdown_from_html

This will process all HTML files in the html-docs/ folder and generate fresh markdown files in the markdown-docs/ folder.

Contributing

Found an issue? Want to update a file? Feel free to submit a PR. Just remember: we're keeping this simple and functional, not perfect and complicated.


Made with ❤️ and a healthy disregard for conventional wisdom

About

Grok API docs in markdown format because Cloudflare said 'no' to web scraping, so we said 'fine' and manually copied HTML like it's 1995. Cost: $5.70 in Claude tokens. Dignity: Priceless.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages