Flutter Docs for LLMs

Instant pub.dev documentation API optimized for LLM agents. Lightning-fast responses with three-tier caching, semantic search, and structured data ready for AI coding tools.

Try the Playground Read the Docs

Why PubContext?

The challenge of accessing Flutter documentation programmatically, and how PubContext is solving it.

The Problem with pub.dev

No Public API for Documentation

pub.dev doesn't offer a REST API to fetch full package documentation including classes, methods, properties, and descriptions.

Aggressive Rate Limiting

Both the documentation website and API enforce strict rate limits, making direct scraping impractical for on-demand fetching.

Complex HTML Parsing Required

Extracting structured data requires navigating multiple pages per package, parsing complex DOM structures, and handling errors.

Not Optimized for LLMs

HTML documentation includes navigation, ads, and markup noise that wastes tokens and confuses AI models.

The PubContext Solution

Three-Tier Caching

Memory cache for hot data, disk storage for persistence, and background freshness checks to keep docs current without blocking.

Built for Concurrency

Go-powered with goroutines and worker pools, serving thousands of requests simultaneously without blocking.

Smart Rate Limit Handling

Exponential backoff retry logic and request delays ensure reliable scraping without overwhelming pub.dev.

Millisecond Response Times

Cached responses return instantly, with async jobs for large packages and pre-warming of popular packages on startup.

LLM-Optimized Output

Clean markdown or structured JSON with zero HTML noise, token-efficient chunking, and depth control.

Developer-Friendly API

RESTful endpoints with semantic search, package discovery, and helpful cache headers.

API Endpoints

RESTful API with consistent response formats and helpful cache headers.

GET /api/v1/packages/{name} Get package documentation
GET /api/v1/packages/{name}/metadata Get metadata only (no scraping)
GET /api/v1/packages/{name}/search BM25 search within package
POST /api/v1/packages/{name}/scrape Trigger async scrape job
GET /api/v1/search Search packages with filters
GET /api/v1/categories List all categories
View Full Documentation

Built For

AI Coding Assistants

GitHub Copilot, Cursor, and other AI tools can use PubContext to get accurate Flutter package documentation for code generation.

Custom LLM Agents

Build agents that can research Flutter packages, understand APIs, and generate integration code with real documentation context.

Developer Tools

IDE plugins, CLI tools, and documentation browsers can leverage PubContext for fast, structured package information.