# Public Web Capture & Extraction APIs

Canonical URL: https://dataroute.dev/apis/web/
Specification Snapshot: 2026-11-22 | Planned Endpoints: 4

Convert public web pages into clean LLM-ready Markdown, deterministic PC and H5 screenshots, discovered URL maps, and bounded multi-page site dossiers backed by PageReceipt.

LLM agents and RAG pipelines need compact, deterministic text stripped of navigation boilerplate. PageReceipt escalates from fast HTTP extraction to rendered viewport capture only when JavaScript rendering is required, keeping latency and unit cost predictable.

Bounded site dossiers cap page budget, return per-URL HTTP status and content hashes, and operate strictly on public pages accessible without user authentication.

## Endpoint Catalog
| Method | Planned Path | Platform | Capability | Stage | Engine | MCP Tool |
| --- | --- | --- | --- | --- | --- | --- |
| POST | `/v1/web/markdown` | Page Extraction | URL to LLM Markdown | V1 Flagship | PageReceipt | `web_to_markdown` |
| POST | `/v1/web/screenshot` | Visual Capture | Desktop (PC) & Mobile (H5) Screenshot | V1 Flagship | PageReceipt | `web_screenshot` |
| POST | `/v1/web/map` | Site Discovery | Domain Site Map | V1 Flagship | PageReceipt | `web_map` |
| POST | `/v1/web/dossier` | Multi-Page Research | Bounded Site Dossier | V1 Flagship | PageReceipt | `web_site_dossier` |

## Target Fields & Failover Policies
- `POST /v1/web/markdown` (V1 Flagship, Tier 1 · First-Party Capture): fields `url, final_url, http_status, title, markdown, word_count, captured_at` — Fast HTTP readability path with automatic headless browser escalation for JS-rendered pages.
- `POST /v1/web/screenshot` (V1 Flagship, Tier 2 · Rendered Viewport): fields `url, viewport, full_page, image_url, content_hash, http_status, captured_at` — Managed headless rendering pool with deterministic viewport retries and timeout isolation.
- `POST /v1/web/map` (V1 Flagship, Tier 1 · First-Party Crawl): fields `origin, urls[], sitemaps_found[], total_discovered, bounded_limit` — Sitemap-first discovery falling back to bounded internal link extraction.
- `POST /v1/web/dossier` (V1 Flagship, Tier 2 · Bounded Research Run): fields `origin, pages_captured[], pricing_urls[], docs_urls[], summary_markdown, evidence_hashes[]` — Budget-bounded capture run returning per-page receipts and content hashes for agent research.

## Questions & Answers
### How does /v1/web/markdown handle JavaScript-heavy web pages?
PageReceipt attempts fast static HTML retrieval and boilerplate extraction first. When a target page requires client-side hydration, execution escalates to a managed headless browser pool to render final DOM text before converting it to clean LLM-ready Markdown.

### What viewports does /v1/web/screenshot support?
The planned screenshot endpoint supports both Desktop (PC) and Mobile (H5) viewport presets with optional full-page capture, returning the final resolved URL, HTTP status code, capture timestamp, and SHA-256 content hash.

### How does /v1/web/dossier bound latency and cost?
Bounded site dossiers enforce an explicit maximum page count and crawl depth per request, prioritizing high-signal public pages such as homepage, pricing, documentation, and changelog routes while attaching per-URL evidence hashes.

### Can Web Capture endpoints fetch paywalled or login-protected pages?
No. PageReceipt captures publicly reachable HTTP/HTTPS pages only. Cookie-authenticated portals, private dashboards, and CAPTCHA bypass routines are strictly outside DataRoute scope.
