[cdpfleet](https://cdpfleet.com/) / Pages to text for LLMs

For LLM, RAG and agent builders

# Pages your model can read, *at a fraction of the tokens*.

Render the page in a real browser so scripts run and lazy content loads, then hand the model the right serialisation: an accessibility snapshot when it has to act, plain text when it only reads, typed records when you need data.

[Case: page to text](https://cdpfleet.com/docs/cases/page-to-text-for-llms)[MCP server](https://cdpfleet.com/docs/mcp)

-   **~28–33%**of the HTML as an ARIA snapshot (case 32)
-   **5–12%**as innerText
-   **1 URL**hosted MCP for assistants

## Pick the serialisation

-   **ARIA snapshot to act:** `locator.ariaSnapshot()` keeps every link with its URL, the headings and lists, at about 28% of the HTML on Wikipedia and 33% on a catalogue ([case 32](https://cdpfleet.com/docs/cases/page-to-text-for-llms)).
-   **innerText to read:** the smallest by far, 5–12% of the HTML — fine for a summary, useless when the model has to click or follow a link.
-   **Snapshot the part you need:** table layouts repeat text as row and cell names, so a Hacker News `body` snapshot was 117% of its HTML; `page.locator("main")` or the list itself cuts tokens more than any format choice.
-   **Typed records for data:** one `page.evaluate` per page returned all 20 records with prices as numbers and ratings 1–5, validated before they left the page ([case 28](https://cdpfleet.com/docs/cases/structured-extraction)).

```js
// After page.goto(url): three ways to hand a page to a model.
const forActing = await page.locator('main').ariaSnapshot(); // YAML: roles, names, links
const forReading = await page.locator('main').innerText();   // plain text, smallest
const records = await page.evaluate(() =>                    // typed data, parsed in the page
  [...document.querySelectorAll('article')].map((a) => ({
    title: a.querySelector('h2, h3')?.textContent.trim(),
    url: a.querySelector('a')?.href,
  })));
```

## For assistants and agents

-   **Hosted MCP server:** add `https://cdpfleet.com/mcp` to Claude, ChatGPT, Gemini, Cursor or Claude Code and sign in; its `snapshot` tool returns the page as an accessibility snapshot, `evaluate` runs extraction code in the page ([MCP setup](https://cdpfleet.com/docs/mcp/setup), [example prompts](https://cdpfleet.com/docs/mcp/prompts)).
-   **Coding agents:** [skill.md](https://cdpfleet.com/skill.md) has the launch flow, browsers, limits and errors on one page, and [llms.txt](https://cdpfleet.com/llms.txt) indexes every doc — each of our pages also has a Markdown version at the same URL plus `.md`.
-   **Hand a page to a person when needed:** a [live view](https://cdpfleet.com/live-view) link lets someone get past a login or a consent step, then the agent carries on.

## At volume

-   **Fewer bytes, faster pages:** blocking images on Camoufox took a catalogue page from 30 requests to 10 and from about 7.3 s to 1.6 s ([camoufox-block-images recipe](https://cdpfleet.com/docs/examples#camoufox-block-images)); third-party scripts are the bigger lever on news pages ([case 08](https://cdpfleet.com/docs/cases/bandwidth-diet)).
-   **Parallel pages:** several tabs in one session share its thread ([case 30](https://cdpfleet.com/docs/cases/parallel-pages)); several sessions spread across your threads ([case 10](https://cdpfleet.com/docs/cases/worker-pool)).
-   **Be a good guest:** read public pages, honour `Retry-After`, and back off when a site pushes back ([case 53](https://cdpfleet.com/docs/cases/soft-block-backoff)).

## Related

Cases, recipes, posts and comparisons about this — updated as new ones are published.

### Reference docs

The details, options and errors.

-   [MCP server](https://cdpfleet.com/docs/mcp)Tools, hosting and OAuth.
-   [skill.md](https://cdpfleet.com/skill.md)Everything an agent needs on one page.
-   [Recipe: block images](https://cdpfleet.com/docs/examples#camoufox-block-images)Fewer requests and bytes per page.
-   [LLM data examples](https://cdpfleet.com/docs/cases#for-llm-data)Examples and benchmarks for this use, filtered.

### Cases 5

Real problems solved end to end, run on production in five languages.

-   [Case 86: Crawl a whole site as a job: map, crawl, stop, resume, results, zip and a signed webhook](https://cdpfleet.com/docs/cases/crawl-a-site-as-a-job)Map books.toscrape.com, crawl 100 pages of it as a background job, stop it part-way and resume it, then read the results as JSON lines and as a zip archive, and…[Code on GitHub](https://github.com/cdpfleet/cdpfleet/tree/main/cases/86-crawl-a-site-as-a-job)
-   [Case 85: A Function or your own browser? Screenshot, PDF and Markdown of the same pages, timed and billed](https://cdpfleet.com/docs/cases/function-vs-your-own-browser)Three pages, three outputs, two ways: one POST to a Function, or launch a browser yourself, connect Playwright, capture and close. Wall time, the thread-seconds each…[Code on GitHub](https://github.com/cdpfleet/cdpfleet/tree/main/cases/85-function-vs-your-own-browser)
-   [Case 79: MCP in action: an MCP client drives a cloud browser through cdpfleet.com/mcp](https://cdpfleet.com/docs/cases/mcp-in-action)A script connects to the hosted MCP server with its API key and does what an AI assistant does: list the tools, launch a browser, open a page, read it as an…[Code on GitHub](https://github.com/cdpfleet/cdpfleet/tree/main/cases/79-mcp-in-action)
-   [Case 32: A page for an LLM: HTML, innerText or the accessibility snapshot?](https://cdpfleet.com/docs/cases/page-to-text-for-llms)Three ways to hand a rendered page to a model — raw HTML, innerText and Playwright's ARIA snapshot — measured on three real pages: how big each is and what it keeps.[Code on GitHub](https://github.com/cdpfleet/cdpfleet/tree/main/cases/32-page-to-text-for-llms)
-   [Case 28: Scrape a catalogue page by page: structured data from rendered HTML](https://cdpfleet.com/docs/cases/structured-extraction)Every book on two pages of a catalogue — title, price, star rating and availability — as clean JSON, parsed from the rendered DOM in one evaluate call per page.[Code on GitHub](https://github.com/cdpfleet/cdpfleet/tree/main/cases/28-structured-extraction)

## Read next

[AI agents →](https://cdpfleet.com/ai-agents)[Web scraping →](https://cdpfleet.com/web-scraping)[Monitoring →](https://cdpfleet.com/monitoring)[Proxies →](https://cdpfleet.com/proxies)

---
Source: https://cdpfleet.com/llm-data · Markdown: https://cdpfleet.com/llm-data.md · All docs for AI tools: https://cdpfleet.com/llms.txt
