# Lyrenth
Lyrenth is a web reader API for AI agents: give it any URL and your agent gets the page back as clean text, from an index of over 4.8 billion pages.
This is /llms-full.txt: the long-form companion to /llms.txt. If you're
an AI agent reading this, the goal is to give you everything in one
fetch so you can decide whether Lyrenth solves your problem
without crawling further.
## What it is
Lyrenth is the AI-readable web index: a search index of the
public web built for AI. The standing index holds over 4.8 billion documents across more than 182.4 million domains. The live size of the index is at https://www.lyrenth.com/web-index/stats. Each page is
served as a stable AIDocument: clean markdown body, source trace
(fetched_at, render_mode, status_code), cache truth (hit / miss /
refreshed / stale_revalidated), page structure (headings, links,
images, media, JSON-LD), and per-call token economics. Agents read
pages through the index (POST /v1/aidocument, GET /v1/read); the index
is standing, not fetch-on-demand, and a cross-caller cache collapses
repeated reads into one upstream fetch. A query endpoint (send a
question, get the best-matching AIDocuments) is coming. The envelope
is the same regardless of how the source page was rendered (static
HTML, React SPA, JS-hydrated content), and no website owner has to
change anything for their pages to become AI-readable through
Lyrenth.
The wedge: agents that read web pages today either pay to clean raw
HTML themselves (expensive, slow, hallucination-prone), or call a
search API that returns noisy results. Lyrenth reads each URL once
into the standing index and serves the same canonical AIDocument to
every agent after that. The architecture lets us offer competitive per-call
pricing while protecting origin sites from read amplification: many
agents asking for the same URL within the cache window result in one
upstream fetch. Per-call savings vs raw HTML to a frontier LLM run
60-90%.
## API
Base URL: https://api.lyrenth.com/v1
Auth: Bearer token. Free tier is 2,000 successful API calls / month,
no credit card. Sign up at https://www.lyrenth.com/signup.
```
GET /healthz public, not logged
GET /aidocument.schema.json public, not logged v2 JSON Schema (draft-07)
GET /v1/stats public, logged
POST /v1/aidocument body {"url":"..."} Bearer, logged read URL -> v2 envelope
GET /v1/read?url=... Bearer, logged GET form of /v1/aidocument -> clean Markdown
POST /v1/submit body {"url":"..."} Bearer, logged 202 + background indexing
# Per-user site management
GET /v1/sites Bearer list of caller's verified domains
POST /v1/sites/{domain}/verify Bearer issue / re-issue verification token
POST /v1/sites/{domain}/check Bearer run DNS + HTML probe; 15s cooldown
DELETE /v1/sites/{domain} Bearer drop the ownership record
# Self-service analytics
GET /v1/admin/stats?domain=...&days=N Bearer per-domain analytics
GET /v1/admin/usage?api_key_id=...&days=N Bearer per-key usage (add &scope=account for every key on the account)
GET /v1/admin/savings?api_key_id=...&days=N Bearer per-key savings ($, tokens)
```
A read of a page the index does not hold fetches it from the site and
keeps the pause the site asks for between visits: at least 2 seconds, or
the site's robots.txt Crawl-delay when that is longer, counted across
every Lyrenth fetch of that site. Such a read may wait a few seconds for
its visit. When the site's next free visit is too far away for the read
to wait, it answers 503 with error "site_busy", a Retry-After header and
a retry_after field in seconds. It is not billed and nothing is saved.
### The canonical AIDocument shape
The v2 grouped envelope served by POST /v1/aidocument. Machine-readable
JSON Schema (draft-07) lives at https://api.lyrenth.com/aidocument.schema.json; that
schema is the source of truth for field names, required fields, and
enum values (cache.status, source.freshness_policy, source.render_mode).
The narrative example below is the same shape humans can read.
```jsonc
{
"schema": {
"name": "AIDocument",
"version": "2.0",
"ref": "aidoc:sha256:7a14e9b2d8f3c901b42e5a77c0f19a34"
},
"source": {
"url": "https://...",
"canonical_url": "https://...",
"fetched_at": "...",
"render_mode": "static" | "rendered" | "static_after_render_failure",
"status_code": 200,
"freshness_policy": "cache_first" | "force_refresh"
},
"cache": {
"status": "hit" | "miss" | "refreshed" | "stale_revalidated",
"origin_contacted": false,
"body_fetched": false
},
"identity": {
"title": "...",
"description": "...",
"language": "en",
"content_type": "article"
},
"content": {
"markdown": "..." // the body, cleaned
},
"structure": {
"headings": [{"level": 1, "text": "..."}],
"links": [{"url": "...", "text": "...", "internal": true}],
"images": [{"url": "...", "alt": "..."}],
"media": [{"url": "...", "kind": "video", "mime": "video/mp4", "poster": "..."}],
"contacts": [{"type": "email", "value": "press@example.com", "label": "press", "source": "mailto"}],
"structured_data": { /* parsed JSON-LD blocks, merged into one object */ }
},
"signals": {
"word_count": 1552,
"reading_time": 7,
"has_json_ld": true,
"heading_hierarchy_ok": true
},
"economics": {
"raw_html_tokens_approx": 12500,
"output_tokens_approx": 1850,
"token_savings": 10650,
"token_savings_percent": 0.85,
"estimated_cost_usd": {
"raw_html": 0.0375,
"our_output": 0.0056,
"savings": 0.0319
},
"pricing_basis": {
"input_price_per_1k_usd": 0.003,
"model_class": "frontier-1m-context"
}
}
}
```
Media entries are references only: native /, media-file
links, and Open Graph (og:video / og:audio) tags. Lyrenth records the
URL, kind (video|audio), and metadata (mime, poster, title), not the
media bytes. Third-party iframe embeds (YouTube, Vimeo) are not
represented as media.
## Render mode escalation
Static fetch first (~50ms). If the page is empty, an empty SPA shell,
or low-density text with a framework signal (react / vue / angular /
next / nuxt / svelte), we escalate to headless Chromium with stealth
flags (~2-5s). The captured `crawl.status_code` comes from the
network event for the main document so chromedp can never silently
misreport an upstream 404.
If rendering fails AND the static fetch returned a body, we degrade
gracefully and return the static body. A 4xx/5xx never escalates: a
404 stays a 404.
## Bot identification
User-Agent: `AIWebIndex/2.0 (+https://www.lyrenth.com/bot; AI-readable web index)`
Verification: `AIWebIndex/2.0 verification (+https://www.lyrenth.com/bot)`
Cloudflare lists both of our user agents, AIWebIndex and AIWebIndex-Agent, as verified bots in its Search category: https://radar.cloudflare.com/bots/directory/aiwebindex and https://radar.cloudflare.com/bots/directory/aiwebindex-agent.
Our crawler implements RFC 9309 (https://www.rfc-editor.org/rfc/rfc9309.html).
We honor:
- robots.txt Disallow rules (RFC 9309 §6.1, MUST)
- robots.txt Crawl-delay directives (RFC 9309 §6.2, MAY)
- robots.txt Sitemap directives
- HTTP 429 / 503 backoff
- per-domain rate caps with a 2 second cooldown floor, raised by
Crawl-delay where declared. The one exception is pages a verified
site owner asks us to fetch again (with Recheck or the change
webhook): those skip the wait and the Crawl-delay, and robots.txt
still applies
- machine-readable TDM / AI-training reservations (the TDM Reservation
Protocol meta signal, robots noai / notrain): a domain that reserves
is excluded from corpus licensing, honored worldwide
If we cannot read your robots.txt (server error, timeout, network
failure), we do not crawl you until we can. We cache a robots.txt we
could read for 24 hours, so the open web sees about one robots.txt
fetch per origin per day from our entire fleet; one we could not read
is asked again after a minute, and one that refused us after six
hours. To opt out,
add a Disallow rule for User-agent AIWebIndex (or wildcard *) in your
robots.txt and we will refuse matching URLs at our pre-fetch gate. For
immediate cache invalidation, email us.
Lyrenth does not train foundation models on crawled content. The index
Lyrenth builds is independently maintained under this policy
and may be licensed for retrieval, research, and AI training under
separate enterprise agreements. Corpus customers, including AI labs, do
not direct our crawler. Removal applies going forward: on request we
stop future crawling and exclude content from future API, search, and
corpus delivery; we do not claw back data already delivered or models
already trained.
## Domain ownership
Two methods, either succeeds:
1. DNS TXT at `_aiwebindex-verify.` with value
`aiwi-verify=`.
2. HTML file at `https:///.well-known/aiwebindex-verify.txt`
containing `aiwi-verify=` anywhere in the body.
The DNS path bypasses the host's system resolver and queries
`1.1.1.1`, `8.8.8.8`, and `9.9.9.9` in parallel; the first resolver
that finds a matching record wins. This avoids breakage from
misbehaving local / ISP nameservers that hijack lookups (we've
reproduced this in the wild).
## For site owners
AI agents already crawl your pages and extract them however they like. Every
agent that reads you through Lyrenth gets an AIDocument built from
your own page. Verifying your domain shows you how AI reads each page: your
dashboard gives a readability score and the signals behind it, and, with our
edge worker, which AI agents visit. We read your sitemap and crawl its pages
ahead of pages found through links. When you change a page, the change webhook
or the Recheck button (2 credits a page) puts it at the front of our crawl
queue, so the copy agents read is fetched again from your page.
This is additive, not exclusive. The labs can keep reading you directly; we do
not ask you to make Lyrenth your only path to AI, and we do not tell
you to block them. Agents that do read through Lyrenth are served the
same clean AIDocument from our cache, so that demand reaches your origin as a
single fetch rather than a fresh crawl per agent.
There is no revenue share and no fee. Verification, the owner dashboard (AI
Readiness, verified-owner controls), and inclusion in the index are free.
Verifying also grants Lyrenth the right to include your canonical
content in the consent-backed Verified Index corpus we license to AI labs, and
Lyrenth retains the licensing proceeds. That grant is the
consideration for the free toolkit, it is recorded in an append-only ledger, and
it is removable going forward.
## AI Readiness score
A weighted 0-10 number per verified domain, surfaced in the
website-owner dashboard as the "AI Readiness score". It measures the
quality of the content Lyrenth serves to AI agents (not a homework
list for the site owner; we don't ship advice). Computed per-page
over the indexed AIDocuments and rolled up per-domain.
Signals and weights:
jsonld_coverage 0.20 structured-data entries on the page
heading_hierarchy 0.15 semantic heading structure
js_blocked_ratio 0.20 share served without JS escalation
noise_ratio 0.20 markdown-to-html density
meta_quality 0.10 title + description adequacy
paywall_penalty 0.10 open-access vs paywall / login wall
word_count_ok 0.05 meets baseline content depth
The hero on /sites/[domain] also surfaces a served-count: how many AI
agents Lyrenth served clean content to in the window.
## Privacy and what's logged
Every `/v1/*` call writes one row to `requests` from a goroutine
fired after the response is sent. Captured fields: endpoint,
status_code, duration_ms, cache_hit, render_mode, domain (as
requested), final_domain (post-redirect), url, api_key_id,
user_agent (the API caller's), error_message.
Not captured: end-user IPs, request bodies beyond the URL parameter,
response bodies, cookies / auth tokens, browser fingerprints, any
PII the agent might be relaying. The log captures the API CALLER'S
behavior, not the end-user data flowing through.
## Pricing
Every successful 2xx call that returns an AIDocument counts as one
request, regardless of which billable endpoint served it. Failed
fetches (4xx/5xx) don't count. Internal endpoints (dashboard
analytics, key management, domain verification, the
universal-bot-traffic ingest path) don't count either.
Free: 2,000 AIDocuments / month, 1 request/sec, 1 verified domain, 90-day cache freshness.
Starter Beta: 20,000 AIDocuments / month, 5 requests/sec, 5 verified domains, 7-day cache freshness.
Pro Beta: 200,000 AIDocuments / month, 25 requests/sec, unlimited verified domains, 24-hour cache freshness.
Custom / volume: contact us. (https://www.lyrenth.com/pricing)
## Universal AI-bot ingest (Phase 1 backend, v0.5.0)
Site owners who verify a domain auto-receive a per-domain ingest
token. Workers (a Cloudflare Worker, or a Next.js proxy on Vercel) install
at the site's CDN edge, classify request User-Agents, batch into
30-second windows, and POST aggregated counts to
/v1/ingest/bot/. The data lets Lyrenth see AI agents that
visit a verified domain directly (i.e., never route through
Lyrenth's own API), so we can serve the whole audience cleanly. Each
request an AI agent makes to the site counts once. The requests appear on
the site's page in the dashboard, in three cards: "AI agent traffic" (by
agent), "AI agent requests by day" and "Paths AI agents request most".
Wire protocol:
```
POST /v1/ingest/bot/
Authorization: Bearer aiwt_
{
"events": [
{ "raw_ua": "...", "path": "/blog", "bucket_at": "2026-05-09T10:30:00Z",
"count": 47, "status_code": 200 }
]
}
```
Server classifies raw_ua against an evolving curated list of AI
bots (GPTBot, ChatGPT-User, ClaudeBot, Claude-Web, anthropic-ai,
PerplexityBot, Applebot-Extended, Meta-ExternalAgent, Bytespider,
Google-Extended, GoogleOther, cohere-ai, DuckAssistBot, Amazonbot,
AI2Bot) and persists one row per bucket.
## Change webhook (push for freshness)
Verified owners can push changes instead of waiting for a re-crawl. When a page
changes, POST its URL(s) to the change webhook and Lyrenth re-resolves
exactly those pages at the front of its crawl queue, so the AIDocument agents
read through Lyrenth is fetched again from your page and freshness
follows your signal rather than a speculative re-crawl of your whole site. Auth is the same
per-domain ingest token used for the bot-ingest path above.
```
POST /v1/ingest/changed/
Authorization: Bearer aiwt_
Content-Type: application/json
{ "urls": ["https:///changed-page", "https:///another"] }
```
Rules: every URL must be on the verified domain's registrable domain (off-domain
URLs are rejected); up to 1000 URLs per request; a per-domain hourly budget caps
how many URLs we accept, so a leaked token cannot trigger an unbounded re-crawl;
the enqueue is idempotent, a URL already queued is not duplicated. The 202
response reports accepted, queued, off_domain_rejected, rate_limited, and
remaining_this_hour.
## Blog
### Four commands before a meeting
https://www.lyrenth.com/blog/four-commands-before-a-meeting
Agents that read the pages you hand them and return the finished job. Here is one morning of homework done in four runs, ending in a spreadsheet, with every command and every answer printed as it came back.
Every agent that touches the web does the same boring half first: fetch
some pages, get usable text out of them, keep track of which page said
what. Most of us write that half again for every job, and then write the
interesting half, and then never look at the boring half again even
though it decides how good the answer is.
So we wrote ten small agents that do whole jobs, and gave them all the
same reading layer. Compare two products. Brief a company. Answer a
question from documentation. Pull several pages into one table. One
command each, free and open, and they run on your machine with your own
model.
This post is one job done with four of them: the homework you do the
morning before a meeting with a company. Every command below is a real
command, and every answer is printed as it came back.
## 01. What do they actually do
```bash
uvx lyrenth-agents brief \
https://www.mozilla.org/en-US/about/ \
https://www.mozilla.org/en-US/about/manifesto/ \
https://www.mozilla.org/en-US/careers/
```
Three pages, 6,664 tokens of text, and a brief in fixed sections: what
they do, who it is for, what they sell, how they describe themselves, and
what these pages never answered.
```text
### Who it is for.
The site states that Mozilla's initiatives are intended to benefit everyone who
uses the internet [1][2]. Its open-source AI tools are designed for software
developers [2]. Its consumer products are built for people all over the world [2][3].
### What it sells.
Not stated on the pages given.
```
That second section is the one to notice. Three pages of a company's own
words, and the honest answer about what they sell is that these pages do
not say. An agent that guesses there would have cost you the meeting.
## 02. Who are you talking to
```bash
uvx lyrenth-agents people \
https://www.mozilla.org/en-US/about/leadership/ \
https://www.mozilla.org/en-US/careers/listings/
```
Two pages, 5,583 tokens, and out comes the leadership list and every open
role, each line carrying the page it came from.
```text
Who works there
- Mark Surman, President, Mozilla [1]
- Nabiha Syed, Executive Director, Mozilla Foundation [1]
- Anthony Enzor-DeMeo, CEO, Mozilla Corporation [1]
```
It closes with a sentence that matters more than the list:
```text
These pages name 9 people; this is who the pages name rather than everyone
who works there.
```
The open roles are the part people skip. A company tells you what it is
really building by what it is paying for.
## 03. How their product compares to the one you use
```bash
uvx lyrenth-agents compare \
https://en.wikipedia.org/wiki/Firefox \
https://en.wikipedia.org/wiki/Google_Chrome
```
Two long encyclopedia articles, 822,229 tokens of raw HTML between them,
and one table of what is actually different:
```text
| Available in | 97 languages [1] | 47 languages [2] |
| Engines | Gecko, Quantum, and SpiderMonkey; WebKit on iOS/iPadOS [1] | Blink (WebKit on iOS/iPadOS), V8 JavaScript engine [2] |
| Smart Window | Smart Window [1] | not stated on the pages given [2] |
| Dinosaur Game | not stated on the pages given [1] | Dinosaur Game [2] |
```
Every cell carries the number of the page it came from, and a cell that a
page did not fill says so rather than borrowing the answer from somewhere
else. The run also put this under the table, unprompted:
```text
Note: It cannot be determined from the provided pages whether "usage share on
traditional PCs" [1] and "worldwide browser market share on personal computers" [2]
refer to the exact same metric.
```
Two numbers that look comparable and are not. That caution is worth more
than the row above it.
## 04. Leave with a file, not fifteen tabs
The last run reads their three product pages and is asked for CSV:
```bash
uvx lyrenth-agents extract \
-q "Write the table as CSV with a header row, one row per product, and nothing before or after the CSV." \
https://www.mozilla.org/en-US/firefox/new/ \
https://www.thunderbird.net/en-US/ \
https://www.mozilla.org/en-US/products/vpn/
```
```text
Product Name,Type,Supported Platforms,Privacy & Tracking,Price,Open Source,AI Policy,Source
"Firefox","fast, private browser","Windows 8.1 and below, macOS 10.14 and below, App Store, Google Play, desktop, mobile, tablet","Blocks trackers automatically, don’t sell your personal data","","","AI features are optional by design","[1]"
"Thunderbird","app","Android, Windows, Mac, Linux","don’t collect personal data, sell ads in your inbox","Free forever","open source","don’t secretly train AI with your private conversations","[2]"
"Mozilla VPN","virtual private network","Windows","No logging, tracking or sharing of network data","€4.99/month, €9.99/month","open source","","[3]"
```
Save it as `products.csv` and your spreadsheet opens it. The empty cells
are the questions those pages did not answer, and the run said why the
price column cannot be read straight across:
```text
Price cannot be compared directly as Thunderbird is free forever [2], whereas Mozilla VPN is offered on monthly (€9.99/month) or annual (€4.99/month) billing periods [3].
```
## What the four runs cost in reading
Ten pages were read in total. As raw HTML those ten pages weigh
**1,020,262 tokens**. What reached the models was **77,786**, and in the
comparison step even that was the budget talking: both encyclopedia
articles are longer than the reading budget for one run, so each was
trimmed to half of it and marked as trimmed everywhere it appeared.
Nothing about that is a trick of formatting. It is the same text a person
reads, without the navigation, the cookie banners, the scripts and the
markup that a browser needs and a model does not.
## The part that makes the answers usable
Four habits, in every one of the agents:
1. **A number on every claim**, and the page behind every number printed
at the end, so a line you doubt is one click from its source.
2. **"Not stated on the pages given"** instead of a plausible guess. It
is the most useful sentence any of these agents writes.
3. **Failures out loud.** A page that could not be read is listed with
the reason. An answer never quietly comes back from fewer pages than
you handed over.
4. **A budget that is shared.** Every page gets its share of the reading
budget, so one long page cannot crowd out the others, which is what
turns a comparison into a table with one column filled in.
## Running them yourself
One key and one command. The command runs with uv (`brew install uv` on a
Mac); without uv, put `pipx run` in place of `uvx`:
```bash
export LYRENTH_API_KEY=... # free key at https://lyrenth.com/signup
uvx lyrenth-agents compare \
https://en.wikipedia.org/wiki/PostgreSQL \
https://en.wikipedia.org/wiki/MySQL
```
With that key alone the agent reads the pages and prints the finished
prompt with its numbered sources, ready to paste into whichever assistant
you already use. Point it at any OpenAI-compatible endpoint and it
answers on its own:
```bash
export LLM_BASE_URL=... LLM_MODEL=... LLM_API_KEY=...
```
Your model choice is yours, including a local one. Nothing in the loop
belongs to us except the reading.
## Writing your own
A recipe is data, not code: the instructions for the model and the shape
of the output. Register one and it runs on the same engine, with the same
reading, the same citations and the same failures out loud.
```python
from lyrenth_agents import Recipe, get, register, run
register(Recipe(
slug="changelog",
name="Release notes",
category="content",
tagline="Turn release pages into one list of what changed.",
what_you_give="The release or changelog pages, newest first.",
what_you_get="One list of changes, newest first, with the page each came from.",
system_prompt="You read release pages and list what changed...",
output_hint="One list, newest first, with a source number on every line.",
example_urls=["https://example.com/releases"],
))
result = run(get("changelog"), ["https://example.com/releases"])
print(result.answer or result.prompt)
```
## The ten
Each one has its own page with a real captured run on it, printed exactly
as it came back: [lyrenth.com/agents](https://lyrenth.com/agents). The
code is at
[github.com/lyrenth/lyrenth-agents](https://github.com/lyrenth/lyrenth-agents),
MIT, and the whole library installs with one command.
If you build a recipe worth shipping, send it to us and we will add it.
### Four billion documents, 40 days after two billion
https://www.lyrenth.com/blog/four-billion-documents
Lyrenth's index passed four billion AI-ready documents across 170 million domains, 40 days after it passed two billion. Here is what doubling that fast changes for the agent reading it.
Today at 11:19 UTC the counter on our front page read
**4,004,058,096 documents across 170,384,783 domains**.
On the morning of 13 August it read 2,000,432,308, and we wrote about
[passing two billion](/blog/two-billion-documents). The index doubled in
40 days, an average of about 50 million new documents a day.
Each of those documents is a web page already fetched, rendered when it
needed rendering, cleaned of its menus, banners and scripts, and stored as
an [AIDocument](/blog/what-is-an-aidocument): the content of the page in
one stable shape that an agent reads in a single request. The counter is
live on [lyrenth.com](https://lyrenth.com) and on the
[index stats page](/web-index/stats), and it is public on purpose. A number
you can check is worth more than one you are told.
## What doubling buys an agent
The size of an index matters for one reason: the next page your agent asks
for.
When that page is already in the index, the read is served in a fraction of
a second, at a fraction of the tokens of the raw page, and the site is not
contacted again. When it is not, it is fetched once, by a crawler that
identifies itself and follows the site's rules, and it becomes an instant
read for everyone who asks after you. [Crawl-on-miss, explained](/blog/crawl-on-miss-explained)
walks through both paths.
Twice the documents means the first case happens far more often. That is
the whole product: coverage is the difference between a cache that
sometimes helps and an index you can build on.
## Breadth, not only depth
170 million domains is the half of the number that is easy to skip.
An index can grow by crawling a few enormous sites deeper and deeper, and
the counter would climb just the same. Ours grows across the web: company
pages, documentation, shops, local businesses, forums, public records and
small publications. That long tail is where agents actually go, and it is
where a large index is most useful.
## Checked, not announced
We did not write this because a slide said four billion. We wrote it
because the public counter did, and anyone can watch it move.
[Read any URL](/docs/quickstart) and see what comes back. Reading from the
index starts free: [2,000 documents a month, no card](/pricing).
### How to build a research agent that actually reads its sources
https://www.lyrenth.com/blog/research-agent-that-reads-its-sources
Most research agents skim. Here is the reading layer done properly: clean text, provenance, deduplication, a token budget and honest failure handling.
Everyone is shipping agents this month. A large share of them are
research agents in one form or another: take a question, find sources,
read them, write an answer with citations. The finding and the writing
get most of the attention. The reading, which sits in the middle, is
usually one line: fetch the page, strip some tags, paste it into the
prompt.
That line decides more about the quality of the answer than the prompt
does. An agent that reads badly cites pages it never really read, pays
for navigation menus and cookie banners, reads the same article twice
under two URLs, and quietly answers from nothing when a source fails.
This post builds the reading layer properly, in about 50 lines of Python,
and shows real output from a run.
## What "reading properly" means
Five things, each of which the code below does:
1. **Read clean text, not HTML.** The model should see the article, not
the page around it.
2. **Keep provenance.** For every source, keep the canonical URL, the
title and when it was read. A citation is only as good as its link.
3. **Read each document once.** The same page reached through two URLs
is one source, not two.
4. **Stay inside a budget.** Decide how many tokens of reading an answer
may cost, and stop adding sources at that line.
5. **Fail visibly.** A source that could not be read is left out and
logged, never silently replaced by nothing.
## The code
This uses the Lyrenth API, which returns every page as an
[AIDocument](/blog/what-is-an-aidocument): Markdown content plus the
source, identity and token economics of the page. You need an API key
from [the quickstart](/docs/quickstart); the free tier covers this
example many times over.
```python
import os
import requests
API = "https://api.lyrenth.com/v1/aidocument"
HEADERS = {"Authorization": f"Bearer {os.environ['LYRENTH_API_KEY']}"}
def read_source(url):
"""Read one page as an AIDocument. Returns None if it could not be read."""
r = requests.post(API, json={"url": url}, headers=HEADERS, timeout=60)
if r.status_code != 200:
body = r.json()
# A failed read explains itself in "message"; "error" is the short code.
reason = body.get("message") or body.get("error", "")
print(f"skip {url}: HTTP {r.status_code} {reason}")
return None
doc = r.json()
return {
"url": doc["source"].get("canonical_url") or doc["source"]["url"],
"title": doc["identity"].get("title", ""),
"fetched_at": doc["source"].get("fetched_at"),
"text": doc["content"]["markdown"],
"tokens": doc.get("economics", {}).get("output_tokens_approx", 0),
"raw_tokens": doc.get("economics", {}).get("raw_html_tokens_approx", 0),
}
def gather(urls, token_budget=30_000):
"""Read every source once, drop duplicates, stay inside a token budget."""
seen, sources, used = set(), [], 0
for url in urls:
s = read_source(url)
if s is None:
continue
if s["url"] in seen:
print(f"duplicate: {url} is {s['url']}")
continue
if used + s["tokens"] > token_budget:
print(f"over budget, leaving out {s['url']} ({s['tokens']} tokens)")
continue
seen.add(s["url"])
sources.append(s)
used += s["tokens"]
return sources, used
```
Two details carry most of the weight. Deduplication uses the canonical
URL the API returns, not the URL you asked for, which is what catches
the same article under a mobile address, a tracking parameter or an old
redirect. And the budget uses the token count the API already measured,
so the agent knows what a source costs before it spends anything on a
model.
## A real run
Five URLs, chosen to exercise every branch: three real articles, one page
that does not exist, and a mobile copy of the first article.
```python
urls = [
"https://en.wikipedia.org/wiki/Web_indexing",
"https://en.wikipedia.org/wiki/Web_crawler",
"https://en.wikipedia.org/wiki/Robots.txt",
"https://en.wikipedia.org/wiki/No_such_page_for_this_example",
"https://en.m.wikipedia.org/wiki/Web_indexing",
]
sources, used = gather(urls)
```
The output, unedited, from a run on September 19, 2026, when the skip
line still printed the short code on its own:
```text
over budget, leaving out https://en.wikipedia.org/wiki/Robots.txt (16719 tokens)
skip https://en.wikipedia.org/wiki/No_such_page_for_this_example: HTTP 422 upstream_not_found
duplicate: https://en.m.wikipedia.org/wiki/Web_indexing is https://en.wikipedia.org/wiki/Web_indexing
[1] Web indexing - Wikipedia 3,119 tokens (raw HTML 24,970)
https://en.wikipedia.org/wiki/Web_indexing read 2026-09-19T12:37:30Z
[2] Web crawler - Wikipedia 22,410 tokens (raw HTML 86,702)
https://en.wikipedia.org/wiki/Web_crawler read 2026-09-19T12:37:11Z
context: 25,529 tokens for 2 sources (raw HTML would be 111,672)
```
Everything the list promised is visible in those lines. The missing page
was skipped with a reason. The mobile URL was recognized as the article
already read. The robots.txt article was left out because adding its
16,719 tokens would have broken the 30,000-token budget. And the two
sources that made it in cost 25,529 tokens, against 111,672 if the same
two pages had been handed to a model as raw HTML.
## What the numbers teach
Look at the two sources side by side.
| Source | Raw HTML | AIDocument | Smaller by |
|---|---|---|---|
| Web indexing (Wikipedia) | 24,970 | 3,119 | 87.5% |
| Web crawler (Wikipedia) | 86,702 | 22,410 | 74.2% |
Measured via the economics block on the API response, September 19,
2026. Token counts are the API's estimates.
Two lessons follow. First, cleaning is not the end of the budget
problem. The crawler article is 22,410 tokens even as clean text,
because it is a long article. A research agent that reads six sources
of that size is already at 130,000 tokens before it writes a word. The
budget line in `gather` is not an optimization; it is what keeps one
long source from crowding out three short ones.
Second, the saving varies a lot by page. A short article inside a heavy
page template saves the most. A long article in a light template saves
less, because most of what was there was already the article. Measure
your own sources rather than assuming a fixed ratio; the API returns the
numbers with every response, which is what the budget logic above relies
on. We looked at this across many kinds of pages in
[the token economics of RAG over the live web](/blog/rag-token-economics-live-web).
## From sources to an answer
With the sources gathered, the last step is building the context your
model reads. Keep it boring and explicit:
```python
def build_context(sources):
parts = []
for i, s in enumerate(sources, 1):
parts.append(f"[{i}] {s['title']}\nURL: {s['url']}\nRead: {s['fetched_at']}\n\n{s['text']}")
return "\n\n---\n\n".join(parts)
prompt = (
"Answer the question using only the numbered sources below. "
"Cite sources as [1], [2]. If the sources do not contain the answer, say so.\n\n"
f"Question: {question}\n\n{build_context(sources)}"
)
```
Send `prompt` to whichever model you use. Three rules make the answers
trustworthy:
- **Number the sources and require citations by number.** It is then
trivial to check every claim against the text you actually gave it.
- **Give the model permission to say "not in the sources".** Without it,
a model fills gaps from memory and the citations stop meaning anything.
- **Keep the read time in the context.** When a user asks about something
that changes, the model can say how fresh its information is. Our post
on [freshness](/blog/freshness-ai-web-index) goes deeper on when a
stored page is good enough.
## Where the URLs come from
This post starts from a list of URLs on purpose. Your agent might get
them from a search provider, from the user, from links inside the pages
it has already read, or from a curated list of trusted sites for your
domain. The reading layer does not care, and it should not: finding and
reading are separate jobs, and keeping them separate means you can
change one without breaking the other.
If you use an MCP client such as Claude or Cursor, the same reading step
is available as a tool without writing any code; see
[adding web reading to Claude and Cursor](/blog/add-web-reading-to-claude-cursor-mcp).
The whole agent from this post, with the answer step, a command line and
tests, is open source under the MIT license:
[github.com/lyrenth/lyrenth-research](https://github.com/lyrenth/lyrenth-research).
Bring your own model; it works with any OpenAI-compatible endpoint,
including local ones.
The research agents that feel smart are rarely the ones with the
cleverest prompt. They are the ones that read carefully, remember where
everything came from, and admit when a source could not be read. That
part is 50 lines. Start with the [quickstart](/docs/quickstart) and
point it at the sources your users actually care about.
### September 15 has passed: what actually changed for AI crawlers and agents
https://www.lyrenth.com/blog/september-15-what-actually-changed
Cloudflare's new defaults are live. What changed on September 15, who it hits, the Googlebot trap for site owners, and what agent builders should check now.
We spent August counting down to this date. In
[September 15 is coming](/blog/cloudflare-september-15-what-changes) we
explained what Cloudflare announced, and in
[the readiness checklist](/blog/september-15-agent-builder-checklist) we
listed what agent builders should verify before it arrived. The date has
now passed. This post is the last one in that series: what actually
changed, read from Cloudflare's own announcement rather than from
predictions, and what is worth doing about it this week.
## What changed, in Cloudflare's words
Cloudflare published the plan on July 1 in
[Your site, your rules](https://blog.cloudflare.com/content-independence-day-ai-options/).
Three things in it took effect on September 15.
**1. AI traffic is now sorted by what a bot does, not by whether it is
"AI".** There are three categories that every customer can manage,
including on the free plan:
- **Search:** a bot that collects or indexes content so it can answer
questions about it later. Cloudflare's definition is that Search is
"proactively building a database of your site to later respond to
queries with."
- **Agent:** automation acting in real time on a person's behalf, "often
there's a human waiting on the other end". Chat fetchers and browsers
driven by an assistant fall here.
- **Training:** a crawler taking content to train or fine-tune a model.
**2. New defaults for new domains.** For every domain newly onboarded to
Cloudflare, Training and Agent are blocked by default on pages that show
ads. Search stays allowed by default. The reasoning Cloudflare gives is
simple: an ad signals that the owner wanted a person to see the page, so
bots that may take that attention away are kept off it.
**3. Multi-purpose crawlers are judged by their strictest purpose.** A
crawler that does both Search and Training is now allowed or blocked
according to all of its behaviors. Cloudflare names Googlebot, Applebot
and BingBot as examples. On a site that blocks Training, those crawlers
are blocked too, unless the owner opted out of the change in their
security settings.
Two smaller changes arrived with it. The "Verified" label no longer means
"allowed by default"; a verified bot is now allowable within its
category, and the category the owner allows decides. And Cloudflare is
testing a fourth robots.txt Content Signal, `use`, with three levels:
`immediate` (interact but store nothing), `reference` (index, excerpt and
link back) and `full` (summarize and reproduce). Sites on Cloudflare's
managed robots.txt now carry `use=reference` by default.
## The trap for site owners: blocking Training can block Google
This is the change most likely to cost someone traffic without them
noticing. If you switched on a Training block at any point, including
the older one-click "Block AI bots" option, the strictest-rule policy now
applies it to Googlebot, BingBot and Applebot as well, because each of
them also crawls for training. Search Engine Journal
[reported the effect](https://www.searchenginejournal.com/cloudflares-ai-crawler-rules-can-block-googlebot/581385/)
before the date: verified Googlebot requests returning 403 on sites that
had only meant to block training.
What to check, in this order:
1. In the Cloudflare dashboard, open the AI traffic settings and see what
Training is set to. If it is blocked, decide deliberately whether you
accept Googlebot being blocked on pages with ads.
2. If you want Google Search but not training, look for the opt-out that
keeps multi-purpose crawlers on their previous behavior. Cloudflare
describes it in the same announcement.
3. Look at your bot traffic for the last few days. A sudden drop in
Googlebot requests, or a rise in 403 responses to it, is the symptom.
4. Check Google Search Console for crawl errors on pages that carry ads.
Nothing about this is permanent. It is a setting, and the point of the
new model is that you choose. The risk is only in not knowing it applies
to you. Our
[guide to the bots reading your site](/blog/which-ai-bots-read-your-site)
covers how to see who is actually visiting.
## What it means if you build agents
The new taxonomy draws a line that matters for anyone whose product reads
the web.
If your agent fetches a page live, at the moment a user asks, it is doing
what Cloudflare calls Agent behavior. On newly onboarded domains, that is
now blocked by default on any page with ads, which covers a large share of
news, recipes, reviews and other ad-supported content. Your agent will not
fail everywhere, and it will not fail on sites that have kept their old
settings. It will fail more often, and in places that worked last month.
If your agent reads from an index that was built ahead of time, the page
was collected by a crawler whose job is to index content for later
queries. By Cloudflare's own definition that is Search behavior, and
Search is the category that stays allowed by default. The distinction is
not a loophole. It is the exact line the new model is designed to draw:
building a database of a site to answer questions later, and sending
people back to it, is treated differently from visiting a site in real
time instead of a person.
This is how Lyrenth works for readers of its API. Pages are indexed ahead
of time by our crawler, which identifies itself and publishes how it
behaves at [/bot](/bot), and your agent reads the stored
[AIDocument](/blog/what-is-an-aidocument) rather than visiting the site.
When a page is not in the index yet, it is fetched once, stored, and
served from the index to every caller after that. We describe that path
in [crawl on miss, explained](/blog/crawl-on-miss-explained).
Whatever you use, three checks are worth running this week:
1. **Watch your failure rate by domain, not in total.** A new block shows
up as a handful of domains going from working to failing, which an
overall success rate hides.
2. **Treat 403 and challenge pages as a distinct outcome.** A block is
not a network error, and retrying it makes things worse. Log it as a
block, surface it to the user, and move on to the next source.
3. **Decide which of your reads need to be live.** Most do not. A pricing
page checked once a day, a documentation page, an article from last
week: all of these can come from an index. Keep live fetching for the
few cases where seconds matter, and identify yourself honestly when
you do it.
## What to expect next
Cloudflare's announcement says two more things are coming. First, it
wants companies that run one crawler for several purposes to split it
into separate crawlers, one per purpose. So far no major search engine
has announced a split, and until one does, the Googlebot trap above
stays live for anyone who blocks Training.
Second, Cloudflare is moving its paid-access program from paying per
crawl toward paying per use, so that a site is compensated when its
content is actually used in an AI answer rather than when it is fetched.
That is a larger shift than the defaults, and it is the one we will be
watching.
The broader direction is clear, and it is one we agree with. The web is
moving from "every bot is the same" to "every bot must say what it is
for", and sites are being given the controls to answer each purpose
separately. For site owners, that means a few minutes in a settings page
this week. For agent builders, it means the difference between reading
the web and visiting it is no longer academic.
If you want to see how a page looks to an agent reading it from an index,
paste any URL into the reader on [the Lyrenth homepage](/), or start with
[the quickstart](/docs/quickstart).
### An independent measurement of AI search crawlers, and where Lyrenth sits
https://www.lyrenth.com/blog/independent-measurement-ai-search-crawlers
Known Agents measures which crawlers do the most AI search indexing across thousands of sites. The list is Huawei, Amazon, Apple, Anthropic, Meta, OpenAI, and, a few rows down, us.
Known Agents runs a bot directory and a measurement panel: their
analytics script on thousands of websites, plus daily scans of the top
1,000 sites and their robots.txt files. From that they publish
[The Agentic Web Index](https://knownagents.com/insights), including a
table of which crawlers do the most AI search indexing.
We are on it. That is worth writing down carefully, because the number
is small and the company it puts us in is not.
## The table
Share of observed AI search crawler activity, by operator, as published
in August 2026:
| Operator | Share |
|---|---|
| Huawei | 27.1% |
| Amazon | 18.2% |
| Apple | 14.9% |
| Anthropic | 11.6% |
| Meta | 11.3% |
| OpenAI | 10.6% |
| Linkup | 3.0% |
| Perplexity | 2.1% |
| Google | 0.3% |
| Microsoft | 0.2% |
| xAI | 0.2% |
| **Lyrenth** | **0.2%** |
| Exa | 0.1% |
| AddSearch | 0.0% |
| Direqt | 0.0% |
Source: [knownagents.com/insights](https://knownagents.com/insights#ai-search-indexing),
retrieved 25 August 2026. The crawler token measured for us is
`AIWebIndex`.
## What this measures, and what it does not
Read the table for what it is. It measures **observed crawl activity**
on one panel: how many requests from each AI search crawler their
instrumented sites actually saw. It does not measure index size, result
quality, or anything about the products behind the crawlers.
Two rows need a caveat, and it would be dishonest to skip it. Google at
0.3% and Microsoft at 0.2% are **their AI-search crawlers only**
(Google-CloudVertexBot and AzureAI-SearchBot). Googlebot and Bingbot are
different categories and are not in this table. Those companies crawl
the whole web through their main crawlers and their AI-specific ones
have little left to do. So this table does not say Lyrenth crawls at
Google's scale. It says that among crawlers built specifically for AI
search, ours does about as much observed work as theirs.
The like-for-like comparisons are the other rows: Linkup, Perplexity,
xAI, Exa. Purpose-built AI search crawlers, measured the same way, on
the same panel.
## Why 0.2% is the number we wanted to show you
Every other operator on that list above us is a company with hundreds
or thousands of people, and most of the ones near us are venture
funded. Lyrenth is self-funded. The index behind that 0.2%
holds over 2.6 billion documents, and the live counter is public at
[lyrenth.com/web-index/stats](https://lyrenth.com/web-index/stats).
We did not measure any of this ourselves, which is the point of citing
it. We have no relationship with the panel, no analytics presence on
their sites, and no way to influence what they observed. Somebody
else's instrument saw our crawler doing real work at the scale of
crawlers run by the largest companies in the world, and published the
result with our name spelled correctly.
## If you found us in your logs
You do not have to take any of this from us. Three bot directories
maintain independent entries on `AIWebIndex`, and none of them was
written by us:
- [Known Agents](https://knownagents.com/agents/aiwebindex) files it as
an AI search crawler and reports that 7% of top websites currently
block it in robots.txt.
- [IPScanner](https://ipscanner.io/bot/aiwebindex) tracks 150 crawler
names. A name in your logs can be faked by anyone, so the only proof
is when the operator publishes something checkable, and by their
count only 33 of the 150 operators do. We are one of them, and
IPScanner ran the check itself: it looked up all 22 of our published
crawl addresses and confirmed each one really belongs to
lyrenth.com. Their entry records that check, dated August 2026.
- [udger](https://udger.com/resources/ua-list/bot-detail?bot=AIWebIndex)
classifies both of our user agents, the scheduled crawler and the
on-demand fetcher, as search engine bots.
Blocking us is every owner's right, and our
[crawler policy](https://lyrenth.com/crawler-policy) includes the exact
rules for doing it if that is your decision.
Before deciding, you can verify that a request claiming to be us
actually is:
- Our crawl addresses are published in machine readable form at
[lyrenth.com/bot/ip-ranges.json](https://lyrenth.com/bot/ip-ranges.json),
the same format OpenAI uses for GPTBot.
- Every one of those addresses has forward-confirmed reverse DNS under
`lyrenth.com`.
- Our requests carry Web Bot Auth signatures (RFC 9421), with the
public key directory at
[api.lyrenth.com/.well-known/http-message-signatures-directory](https://api.lyrenth.com/.well-known/http-message-signatures-directory).
Known Agents' FAQ answers "Should I block AIWebIndex?" with "Usually
not." We will keep earning that answer.
### The token economics of RAG over live web data
https://www.lyrenth.com/blog/rag-token-economics-live-web
Most RAG cost is not the model, it is what you feed it. A measured look at raw HTML versus a readable document, and where the money actually goes.
Retrieval-augmented generation has an unglamorous cost centre. Everyone
budgets for the model. Almost nobody budgets for the retrieval, and when
the source is the live web rather than a tidy internal corpus, the
retrieval is usually where the money went.
This post is the arithmetic, with numbers measured against a real page
rather than estimated.
## The measurement
Take a page with real substance to it: the Wikipedia article on
retrieval-augmented generation. About 8,400 words, plenty of structure,
the sort of source a research agent would legitimately pull into
context.
```bash
curl -s -X POST https://api.lyrenth.com/v1/public/aidocument \
-H "Content-Type: application/json" \
-d '{"url":"https://en.wikipedia.org/wiki/Retrieval-augmented_generation"}'
```
The economics block on that response, measured on 24 August 2026:
| | tokens | cost at $3 per million |
|---|---|---|
| Raw HTML | 44,191 | $0.1326 |
| Readable document | 14,924 | $0.0448 |
| Difference | 29,267 | $0.0878 |
That is a 66.2 percent reduction, and the cost basis is the mid-tier
frontier model class rather than a cheap one or a flagship, so treat it
as the middle of the range rather than a best case.
Two thirds of that page, as delivered by an HTTP fetch, is navigation
chrome, scripts, inline styles, edit links, and markup. It costs real
money for a model to read it and it contributes nothing to any answer.
## Why it compounds
One page at nine hundredths of a cent is not a business problem. RAG
does not read one page.
A single research question typically touches somewhere between five and
twenty sources. Call it ten. If your pipeline feeds raw HTML, that one
question costs about $1.33 in input tokens instead of about $0.45. The
difference is $0.88 per question.
Now put that behind a product:
| Questions per day | Raw HTML | Readable | Difference per month |
|---|---|---|---|
| 100 | $133 | $45 | about $2,600 |
| 1,000 | $1,326 | $448 | about $26,300 |
| 10,000 | $13,257 | $4,477 | about $263,400 |
Those are input tokens only, on one measured page, at one price point.
Your pages will differ, and mostly in the direction that helps. Three
pages read the same morning:
| Page | Raw HTML | Readable | Saved |
|---|---|---|---|
| An embeddings API guide | 155,431 | 8,028 | 94.8% |
| Vector database (Wikipedia) | 80,078 | 15,348 | 80.8% |
| RAG article (Wikipedia) | 44,191 | 14,924 | 66.2% |
The article at the bottom is the encyclopedia's best case: dense prose,
little furniture, and it still sheds two thirds. The documentation page
at the top is the one to look at, because it is the shape most technical
sources take now, and nineteen twentieths of it was never the answer.
The ratio is the part that travels: content density on the open web is
stubbornly low, and the closer a page is to a modern application, the
worse the ratio gets.
## The three costs people forget
**Reading the same page twice.** In most pipelines every user's question
triggers its own fetch. Two hundred users researching the same topic in
the same week pay two hundred times for one page that did not change.
Retrieval is the one part of RAG where the work is genuinely shareable,
and it is the part most often built per-caller.
**Paying for the fetch itself.** Fetching is not free even when the
tokens are cheap. It is latency in front of a user who is waiting, it is
a request against someone else's server, and increasingly it is a
request that can be refused. We wrote about
[what an index promises about freshness](/blog/freshness-ai-web-index)
because that promise is what lets you skip the fetch honestly rather
than by hoping.
**Paying twice, once to embed and once to prompt.** In a pipeline that
indexes before it answers, every token is billed on the way in as well
as on the way out. Embedding is cheaper per token than generation, which
is exactly why it gets ignored, but it is charged on the full document
rather than on the part that matched. Chunking and embedding 44,000
tokens of markup means storing the markup, searching the markup, and
retrieving chunks that are partly markup. The saving compounds through
every stage that touches the text, not just the final prompt.
**Context you did not need.** A 15,000 token document is better than a
44,000 token one, and still worse than the 800 tokens that actually
answer the question. Extraction gets you the first saving. Selecting
sections, using the page's own heading structure, gets you the second
one, and it is usually larger. A document that arrives with its
structure intact makes that selection possible; a wall of text does not.
## What to actually do about it
**Extract before you embed, and before you prompt.** Whatever else you
change, stop putting raw HTML in front of a model. This is the two
thirds, and it is the easiest of the three to fix.
**Read from an index, not from the origin, when the answer is knowledge
rather than a live number.** The fetch happens once for everybody
instead of once per user, and the read comes back in milliseconds. For
anything genuinely time-sensitive, force a refresh explicitly, which
costs what a live fetch costs and is worth it exactly when it matters.
**Use the structure you were given.** Around a tenth of pages carry
usable JSON-LD, and when a site has already declared the price or
the publication date as a field, reading the field beats inferring it
from a sentence. It is cheaper and it is right more often.
**Log the ratio you actually get.** The economics block comes back on
every read, so this number is available for your own pages rather than
estimated. The next section is the one-minute version of taking that
measurement.
## Measuring your own ratio, in about a minute
Estimates are not worth much here, because the ratio depends entirely on
what your sources look like. A documentation site and a news homepage
are not in the same business. The measurement is cheap enough that you
should just take it.
```bash
for url in \
"https://example.com/docs/getting-started" \
"https://example.com/pricing" \
"https://example.com/blog/some-post"
do
curl -s -X POST https://api.lyrenth.com/v1/public/aidocument \
-H "Content-Type: application/json" \
-d "{\"url\":\"$url\"}" \
| python3 -c "
import json,sys
e = json.load(sys.stdin)['aidocument']['economics']
print(f\"{e['raw_html_tokens_approx']:>7} -> {e['output_tokens_approx']:>6} \"
f\"({e['token_savings_percent']*100:.0f}% saved)\")
"
done
```
Run that over ten URLs your product actually reads. If the average
saving is around two thirds, the arithmetic above applies to you almost
directly. If it is higher, your sources are heavier than average and the
case is stronger. If it is much lower, you are already reading clean
sources and your money is going somewhere else, which is worth knowing
before you spend a sprint on retrieval.
One caveat on reading these numbers honestly: the token counts are
approximations, and the dollar figures are an illustration at one price
point rather than your invoice. Tokenisers differ between model
families and prices change. The ratio is the durable part; treat the
cost column as an order of magnitude rather than an accounting entry.
## The part that is not about money
Cheaper retrieval is the obvious win and the smaller one. The larger one
is that a model given 15,000 tokens of clean prose and structure gives
better answers than one given 44,000 tokens of the same content wrapped
in markup, because the markup is not neutral. It is a distraction with a
cost, and attention spent on a cookie banner is attention not spent on
the paragraph you needed.
Token economics is the measurable proxy for a quality argument. The
budget is what makes people act on it.
If you want the ratio for your own pages, the
[quickstart](/docs/quickstart) returns the economics block on the first
call, for any public URL, without an account. Read three pages you
actually use and you will know within a minute whether this is worth
your attention.
### MCP or a REST API: which one should your agent use to read the web?
https://www.lyrenth.com/blog/mcp-vs-api-for-web-reading
MCP and a plain HTTP API do the same job in different places. When to expose a capability as a tool, when to call the endpoint, and why most teams run both.
The Model Context Protocol went from interesting to assumed in about a
year. Data platforms, testing tools and research databases now ship an
MCP server as a standard product surface, alongside the REST API they
already had. If you are building an agent that reads the web, you now
have two doors into the same capability and a decision to make about
which one to walk through.
The honest answer is that they are not competitors. They sit at
different layers, and the interesting question is not which is better
but which one owns the decision.
## The actual difference
A REST endpoint is something **your code** calls. You decide when to
call it, with what arguments, and what to do with the response. The
model never sees the endpoint; it sees whatever your code chose to put
in the context.
An MCP tool is something **the model** calls. You register a capability,
describe it, and hand the decision to the agent. It decides when reading
a URL is the right next step.
That is the whole distinction, and everything else follows from it.
```
Your code decides -> call the HTTP endpoint
The model decides -> expose it as an MCP tool
```
## When the model should not decide
Plenty of production paths are better off with the model out of the
loop.
**Fixed pipelines.** A nightly job that reads two hundred known URLs and
writes them to a store has no decision in it. Calling an endpoint in a
loop is simpler, cheaper, easier to retry, and easier to reason about
when it breaks at 3am. Giving that job an agent that chooses what to
read adds a nondeterministic step to something that was deterministic.
**Anything with a hard budget.** When your code makes the call, you can
count the calls. When the model makes the call, you get to watch a
retry loop discover an interesting website. Budget enforcement belongs
where the loop is, and if the loop is inside the model you need a
different kind of guard.
**Server-side work with no chat in it.** Ingestion, enrichment,
scheduled refreshes. There is no conversation to attach a tool to.
For all of these the shape is a normal HTTP call:
```bash
curl -s -X POST https://api.lyrenth.com/v1/aidocument \
-H "Authorization: Bearer $LYRENTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/pricing"}'
```
One URL in, one JSON document out, and your code decides what happens
next.
## When the model should decide
The opposite case is just as clear.
**Research and open-ended questions.** "Find out what changed in this
library's licensing" is not a fixed list of URLs. The agent has to read
one page, discover the next, and stop when it has enough. Making that a
tool call is the whole point.
**Interactive assistants.** A person asks about a page they are looking
at. The agent should be able to read it without you having predicted
that turn in the conversation.
**Multi-step work where reading is one of several options.** If the
agent can read, search a codebase, and run a query, those should be
peers. The model chooses, and MCP is the vocabulary for offering the
choice.
That is why the read capability is published as an MCP server as well as
an endpoint: the same read, offered to whichever layer is making the
decision.
## Running both, which is the usual answer
Most real systems end up with both, and the split is generally clean.
- **Ingestion path:** HTTP. Known URLs, scheduled, budgeted, retried.
- **Agent path:** MCP. Unknown URLs, chosen live, bounded by the
agent's own limits.
They share an index, so a page read once through either door is
available cheaply through the other. That is the part worth designing
for: the value is not the protocol, it is that the fetch already
happened. A page in the index answers in milliseconds and costs a
fraction of the tokens the raw HTML would have, because the extraction
was done once rather than per caller.
## Failure handling is where they really diverge
This is the part that decides how each one feels in production, and it
is rarely in the comparison posts.
When your code calls an endpoint, you own the failure. A timeout, a
refusal from the origin, a page with nothing readable on it: your code
sees the status, decides whether to retry, and decides what the user is
told. The failure is a branch in a program you wrote.
When the model calls a tool, the failure becomes part of the
conversation. The tool returns an error, the model reads it, and the
model decides what to do next. That is genuinely useful when the error
is informative, because an agent that is told a page could not be read
can go and find another source without being asked. It is genuinely
dangerous when the error is vague, because the model will improvise, and
improvising around a failed read means answering from memory instead of
from the page.
The practical consequence: if you expose a read capability as a tool,
spend the effort on the error text. "Not found" invites a guess.
"That URL returned no readable content, the page draws its text with
JavaScript" tells the agent something it can act on. Errors written for
a log file are the wrong genre; write them for a reader who has to
decide what to do next.
The same applies to limits. An HTTP 429 in a pipeline is a backoff. An
HTTP 429 handed to an agent mid-conversation is a decision point, and
the agent handles it well only if the message says how long to wait.
## Three things that bite
**A tool name is a public API.** People pin your MCP tools in their
agent configuration. Rename a tool and you break installs you cannot see
and cannot fix. Treat tool names with the same seriousness as an
endpoint path, which is to say: choose carefully and then stop changing
it.
**The description is the interface.** With a REST endpoint your docs are
read by a person who then writes code. With an MCP tool the description
is read by the model, at decision time, every time. A vague description
produces an agent that calls the tool at the wrong moments, and the fix
is copywriting rather than code.
**Credentials pass through, they do not disappear.** An MCP server that
reads the web on a user's behalf is still spending that user's quota.
Make the key the caller's own, so usage and limits land on the right
account. Anything else turns into an accounting problem the first week
it is popular.
## Choosing, in one table
| Situation | Use |
|---|---|
| Known URLs, scheduled | HTTP endpoint |
| Hard per-run budget | HTTP endpoint |
| No conversation in the loop | HTTP endpoint |
| Agent decides what to read next | MCP tool |
| Interactive assistant | MCP tool |
| Reading is one option among several | MCP tool |
| Both of the above, in one product | Both, sharing the index |
## Start with whichever loop you already have
If you already have a pipeline, add the endpoint: it is a POST and a
JSON response, and the
[quickstart](/docs/quickstart) is about a minute of work.
If you already have an agent, add the MCP server, because the decision
is already living in the model and this just gives it a better way to
read than driving a browser. We wrote about why that distinction matters
in [agentic browsers vs crawlers](/blog/agentic-browsers-vs-crawlers).
The wrong move is building a bespoke reading layer inside your agent
framework, which is how teams end up maintaining an HTML parser they
never wanted. Whichever door you pick, the thing on the other side
should hand back a document, not a page.
### Agentic browsers vs crawlers: which one does your agent actually need?
https://www.lyrenth.com/blog/agentic-browsers-vs-crawlers
Crawlers read the web so a question can be answered later. Agentic browsers use the web now. Picking the wrong one costs latency, tokens, and access.
Two things that look alike are being built at once right now, and the
difference between them is worth being precise about, because most teams
end up paying for the wrong one.
A crawler reads the web. It fetches a page, turns it into text a model
can use, and stores it so a question can be answered later. An agentic
browser uses the web. It drives a real browser session: it clicks, fills
forms, waits for a modal, compares two prices, completes a checkout. One
produces knowledge. The other produces a change in someone else's
system.
The reason this matters commercially is that the browser is the more
impressive demo and the more expensive habit. It is very easy to reach
for a browser session because it obviously works, and then discover you
are paying browser prices to read three paragraphs of text.
## The test that decides it
Ask what the outcome of the step is.
**If the outcome is knowledge, read.** "What does this page say about
pricing." "Which of these ten suppliers ships to Ireland." "Summarise
this documentation." Nothing changes on the far side. You need the text,
correctly extracted, and you need it cheaply enough to do it a thousand
times.
**If the outcome is a state change, use.** "Book the appointment."
"Submit the form." "Add it to the basket and pay." Something is
different afterwards on a system you do not own. That genuinely needs a
session, a real browser, and a human's authority behind it.
Most agent products are ninety percent the first thing and ten percent
the second. The ten percent is what gets demoed.
## What reading through a browser actually costs
Take a concrete page. Here is the Wikipedia article on
retrieval-augmented generation, read through the AIDocument API:
```bash
curl -s -X POST https://api.lyrenth.com/v1/public/aidocument \
-H "Content-Type: application/json" \
-d '{"url":"https://en.wikipedia.org/wiki/Retrieval-augmented_generation"}'
```
The economics block on that response, measured on 24 August 2026:
```json
"economics": {
"output_tokens_approx": 14924,
"raw_html_tokens_approx": 44191,
"token_savings": 29267,
"token_savings_percent": 0.662,
"estimated_cost_usd": {
"our_output": 0.044772,
"raw_html": 0.132573,
"savings": 0.087801
},
"pricing_basis": {
"input_price_per_1k_usd": 0.003,
"model_class": "mid-tier frontier model class"
}
}
```
The raw page is about 44,000 tokens. The readable document is about
15,000. Two thirds of what a browser would hand your model is
navigation, scripts, markup and boilerplate that costs money to think
about and contributes nothing to the answer.
That is the cost per page, before you have counted the seconds. A
browser session has to start, load, execute scripts, and settle before
it can tell you anything. A read from an index answers in milliseconds
because the work already happened once, for everybody.
## The third cost, which is newer
Access rules are tightening. Through 2026 the default posture of the web
towards automated traffic has moved from "allow and see" to "declare
what you are and we will decide", and
[the September 15 changes](/blog/cloudflare-september-15-what-changes)
are the clearest example of that turning into infrastructure.
A browser session driven by an agent is, from the far side, unattributed
traffic with a real browser fingerprint. It is not obviously a robot and
it is not obviously a person. That ambiguity was an advantage in 2024.
In 2026 it is the thing that gets you a challenge page, then a block,
then an abuse report to your hosting provider.
Reading through an index inverts that. The fetch happens once, from a
crawler that identifies itself, publishes its address ranges, and
honours the site's own rules. Your product then reads from the index
rather than from the site. You are not one more anonymous browser at the
door.
That is not only a politeness argument, though it is that too. It is an
availability argument: the access you have not asked for is the access
you can lose overnight.
## What "read" should return
If you are going to read rather than browse, the thing you read should
be worth the trip. Handing a model cleaned-up HTML is only a small
improvement on handing it HTML.
An AIDocument is one JSON shape for any URL: the markdown a model should
actually see, the structure of the page (headings, tables, links), the
source trace saying where it came from and when it was fetched, cache
truth saying honestly whether the origin was contacted, the structured
data the site already declared, and the token economics above so
you can see what the read cost you.
The structure matters more than people expect. Roughly a tenth of pages
carry usable JSON-LD, and when a site has already declared that a
page is a product with a price, or a recipe with a cook time, an agent
that reads that declaration is more reliable than one that infers it
from prose. It is the difference between parsing a sentence and reading
a field.
## A decision table you can actually use
| The step | Read or use | Why |
|---|---|---|
| Answer a question from a page | Read | Knowledge out, nothing changes |
| Compare fifty products | Read | Fifty browser sessions is a bill, not a design |
| Check whether something changed | Read | Freshness is a property of the index |
| Log in and download an invoice | Use | Authority and a session are the point |
| Fill and submit a form | Use | State change on someone else's system |
| Extract the whole documentation set | Read | Bulk reading through a browser is the classic mistake |
The pattern in real products is a wide read layer and a narrow use
layer. Read broadly and cheaply to decide what to do; drive a browser
only for the handful of steps that genuinely act.
## The hybrid, which is what most products end up as
Say you are building a procurement assistant. It has to find suppliers,
compare them, and then place an order.
Finding and comparing is reading. Fifty supplier pages, extracted to
text and structure, is fifty cheap reads that can happen in parallel and
be cached for the next user who asks a similar question. None of it
needs a session, because nothing changes on the supplier's side when you
look at their catalogue.
Placing the order is using. One browser session, authenticated as the
customer, driving a real checkout. It is slow and expensive and that is
fine, because it happens once at the end and it is the step the customer
is actually paying for.
Teams that get this backwards build fifty browser sessions to compare
prices and then wonder why the feature costs more to run than it earns.
The read layer should be wide and cheap. The use layer should be narrow
and careful.
## Where MCP fits
The reason this is worth writing down now is that the plumbing finally
agrees. The Model Context Protocol has become the common way to hand an
agent a capability, and that includes the capability to read a URL. It
means the read layer does not have to be a bespoke integration in every
framework you try: it is a tool the agent already knows how to call.
If you are wiring this up, the
[quickstart](/docs/quickstart) is one call, and the same read is
available as an MCP tool for agent frameworks that prefer it. We wrote
separately about
[what an index actually promises about freshness](/blog/freshness-ai-web-index),
which is the question that decides whether reading from one is safe for
your use case.
## The short version
Use a browser when the agent has to act. Read from an index when the
agent has to know. Reading is cheaper by roughly two thirds on tokens
for a typical page, faster by orders of magnitude, and it does not spend
access you cannot get back.
The impressive demo is the agent that books the flight. The product that
survives contact with a thousand users is mostly the boring half that
reads.
### How fresh is an indexed page? Staleness, recrawls, and forcing a refresh
https://www.lyrenth.com/blog/freshness-ai-web-index
Cached reads are fast and cheap, but pages change. How freshness works in an AI web index: documented cache ages, change-driven recrawls, and per-request refresh.
The first question people ask about reading from an index instead of the
live web is the right one: what if the page changed?
It deserves a straight answer, because the alternative answers are both
wrong. "Always fetch live" pays full latency and full tokens for every
read and increasingly [gets refused at the
door](/blog/cloudflare-september-15-what-changes). "Trust the cache
blindly" eventually quotes last month's price as today's. Freshness is
not a yes-or-no property; it is a contract, and the contract should be
explicit.
## The documented maximum age
Every Lyrenth plan states, on the [pricing page](/pricing), the oldest a
cached document is allowed to be when served to you. If the stored copy
is older than your plan's ceiling, your read does not get the stale copy;
the page is fetched fresh, re-extracted, and the updated document is both
served to you and stored for the next reader. Staleness has a published
upper bound, not a vibe.
## Reads keep the index alive
An index used by many agents has a property a private cache never gets:
demand tells it what matters. Pages that agents actually read are exactly
the pages whose freshness gets exercised, because every read checks the
stored copy's age against the caller's ceiling. Popular content
effectively refreshes itself through use, while the long tail refreshes
when someone cares, which is the only economical answer at
billions-of-pages scale.
## When you need this minute, say so
Some reads cannot tolerate any age: a price during checkout, a breaking
story, a status page. For those, pass the refresh flag and the fetch
happens now, regardless of how fresh the stored copy is. It costs more,
which is honest, because it does more, and the newly fetched version
becomes the stored copy, so your urgency subsidizes the next reader's
speed.
## Choosing your posture
The practical guidance falls out of the mechanics. Default to cached
reads: for documentation, articles, references, and most of what agents
read, a copy within a documented age is indistinguishable from live and
arrives in a fraction of the time. Reserve forced refreshes for the
reads where minutes genuinely matter, and let the
[cache economics](/blog/caching-web-content-for-ai-agents) work for you
everywhere else.
Fast by default, current on demand, and the age limit in writing: that is
what freshness should mean.
Try both on the free tier: [2,000 reads a month, no card](/pricing).
### More than markdown: getting structure from web pages your agent can use
https://www.lyrenth.com/blog/structured-web-data-for-llms
Clean text is half the job. How AIDocument's structure, headings, links, and media, lets agents navigate, cite, and act on pages instead of just reading them.
Turning a web page into clean markdown solves the reading problem. It
does not solve the using problem. An agent that only receives prose can
summarize a page, but the moment it needs to cite a section, follow the
right link, or find the diagram, flat text runs out of road.
That is why an [AIDocument](/blog/what-is-an-aidocument) carries
structure alongside the markdown, and this post is about what that
enables.
## Headings: the page's own map
The document's heading tree arrives as data, not just as markdown
prefixes. Your agent can answer "which section covers authentication"
without reading the whole body, jump a long reference page by section,
or cite "under Rate limits" instead of "somewhere in the middle." For
retrieval pipelines, headings are natural chunk boundaries that keep
each embedded chunk about one thing, which is most of the battle in
[keeping context small](/blog/feed-web-pages-to-llm-without-blowing-context).
## Links: resolved and ready to follow
Every link arrives with its text and an absolute URL, already resolved
against the page's base. The difference sounds small until your agent
tries to follow relative paths from raw HTML. With resolved links, a
research agent walks documentation naturally: read a page, pick the
relevant next link by its text, read that. Crawling logic you did not
have to write.
## Media: what the page shows, not only what it says
Images and embedded media arrive as a list with sources and alt text
where the page provides it. Agents that produce reports can pull the
right figure; agents that answer questions know a chart exists even when
they cannot see it, and can say so honestly.
## One shape, every page
The point of all of it is uniformity. Every page on the web arrives in
the same shape: same fields, same types, same places. Your code stops
being a museum of per-site parsers and becomes one handler, which is the
whole trick behind [a web-reading tool in 30
lines](/blog/web-reading-tool-in-30-lines). When the page changes its
design, the shape does not change with it; that is the index's job to
absorb.
Fetch any URL and look at the structure yourself: the free tier is
[2,000 documents a month, no card](/pricing).
### The September 15 readiness checklist for agent builders
https://www.lyrenth.com/blog/september-15-agent-builder-checklist
Five checks to run on your agent's web access before Cloudflare's new crawler defaults land: inventory, identity, failure handling, freshness, and fallback.
*Part of Countdown to September 15. Part one covered
[what actually changes](/blog/cloudflare-september-15-what-changes);
this is the practical follow-up for people who ship agents.*
On September 15, a growing share of ad-supported sites starts refusing
unidentified AI crawlers by default. If your product reads the web, spend
thirty minutes on these five checks before the date does it for you.
## 1. Inventory every place your product touches the web
Most products have more fetch paths than anyone remembers: the main
reading pipeline, a link-preview feature, an enrichment job, a health
check, that one script from the demo. List them. The paths you forget are
the ones that will fail silently, and a block on a minor path looks like
a flaky feature rather than what it is, a policy decision at the origin.
## 2. Ask the identity question about each path
For each path: when this code fetches a page, does the site know who is
asking and why? A generic client with no name and no contact page is a
stranger, and strangers are what the new defaults refuse. Paths that
cannot answer the question need either a real bot identity of your own,
with a published policy and verifiable requests, or a switch to reading
through infrastructure that [already has
one](/blog/polite-web-access-for-agents).
## 3. Make blocks visible instead of mysterious
A blocked fetch rarely says so. It shows up as an empty page, a challenge
screen your parser cannot read, or a timeout. Whatever your agent does
on those, make sure it is not "retry forever" and not "pretend the page
was empty." Log the failure class distinctly, surface it, and decide the
product behavior deliberately. The teams that struggle after policy
changes are the ones whose failures all look identical.
## 4. Separate must-be-fresh from can-be-cached
When live fetching gets harder, the question "does this read need this
minute's version?" starts having a price. Most agent reads are of stable
content where a [cached copy](/blog/caching-web-content-for-ai-agents) is
indistinguishable from a live one, and a shared index serves those
without asking the origin at all. Reserve live fetching for the reads
that genuinely need it, and your exposure to the new defaults shrinks to
a fraction of your traffic.
## 5. Decide your fallback before you need it
If a source your product depends on goes dark to your fetcher on the
15th, what happens? The wrong time to answer is the morning it happens.
The answers that work: an indexed copy that predates the block, an
identified fetcher the site still admits, or a graceful product message.
The answer that does not: hoping.
## The short version
Know your fetch paths, be identifiable on all of them, see your failures,
cache what can be cached, and have a fallback. Builders who do this will
notice September 15 as a news story. The rest will notice it as a pager
alert.
Reading through Lyrenth covers the identity, caching, and fallback checks
in one move: [2,000 reads a month free, no card](/pricing).
### Reading the web without getting blocked: why politeness beats tricks
https://www.lyrenth.com/blog/polite-web-access-for-agents
Agents get blocked for behaving like strangers. What polite machine access looks like, why evasion is a treadmill, and how identified reading stays welcome.
Sooner or later, every agent that reads the web directly gets blocked,
and the team behind it faces a fork in the road. One path is the
treadmill: rotate addresses, disguise the client, retry harder. The other
is the one this post argues for: stop being a stranger.
## Why sites block bots
From a site owner's side, unidentified bot traffic is pure risk. It
consumes bandwidth without ever seeing an ad or buying anything, it might
be harvesting content for someone else's product, and it does not answer
when asked who it is. Site owners respond rationally: challenges, rate
limits, and blocks, applied more aggressively [every
month](/blog/cloudflare-september-15-what-changes) as infrastructure
providers make blocking the default.
The blocks are not aimed at your use case. They are aimed at your
anonymity. A site cannot tell a helpful research agent from a content
thief when neither introduces itself, so both get the same door.
## Why evasion is a losing trade
Tricks work until they are noticed, and being noticed is guaranteed at
any useful scale. Each round of the arms race costs engineering time,
makes your traffic look more like an attack, and burns the one thing you
cannot rotate: the site's willingness to serve machines at all. Evasion
by some bots is exactly why defaults are hardening against all bots.
It is a strategy that poisons its own well.
## What polite access looks like
The durable alternative is boring and it works: identify yourself, state
your purpose, respect the site's rules, and limit your rate. Lyrenth's
reading works this way by design. Every fetch identifies itself with a
named agent and a published policy page a site owner can check, requests
carry a cryptographic signature so the identity cannot be spoofed,
[robots.txt is honored on every fetch](/blog/robots-txt-ai-agents-2026),
and per-domain rate limits keep any single site's load negligible.
The deeper advantage is structural. Because reads are served from a
[shared index](/blog/one-crawl-serves-everyone-economics), the popular
page a thousand agents want was fetched once, politely, instead of a
thousand times, rudely. The origin sees less traffic, not more, as usage
grows. That is what makes the politeness sustainable rather than
performative.
## The practical takeaway
If your agent reads the web through your own fetching code, you own the
identity problem: name your bot, publish a policy, respect robots, and
accept that some doors stay closed. Or read through infrastructure that
already has a standing, verifiable identity and takes the whole problem
off your plate. Either way, the strangers get blocked first, and after
[September 15](/blog/cloudflare-september-15-what-changes), by default.
A free key takes a minute: [2,000 reads a month, no card](/pricing).
### Caching web content for AI agents: what to cache, for how long, and when to force a refresh
https://www.lyrenth.com/blog/caching-web-content-for-ai-agents
A practical guide to caching the web for agents: why every agent team ends up building a cache, what staleness actually costs, and what a shared index changes.
Every team that builds an agent which reads the web goes through the same
three stages. First they fetch every page live, every time, and pay full
price in latency and tokens for identical content. Then they notice that
most of what their agent reads was read before, and they build a cache.
Then they discover that caching the web properly is its own product.
This post is about stage three, and about the shortcut past it.
## Why agents re-read the same web
Agent traffic is not like human browsing. A human reads a page once. A
fleet of agents researching companies, monitoring competitors, or
answering support questions hits the same popular pages over and over:
documentation, pricing pages, news, reference material. Left uncached,
that repetition multiplies three costs: the seconds each live fetch takes,
the tokens of re-processing the same content, and the load on the origin
site, which is exactly the behavior that gets bot traffic
[blocked](/blog/cloudflare-september-15-what-changes).
## What a good cache has to get right
Building your own cache means answering questions that have nothing to do
with your product. How long is a cached page trustworthy: a news homepage
changes hourly, an API reference changes monthly, and nothing in the URL
tells you which is which. What do you store: raw HTML bloats storage and
still needs cleaning on every read, while cleaned text must be
re-extracted whenever your parser improves. When do you invalidate: too
eager and you are back to live-fetching everything, too lazy and your
agent quotes a price that changed last week. And every answer has to hold
across the whole team, or each service builds its own contradictory copy.
## The shared-index answer
An index is what a cache becomes when it is the product instead of the
workaround. Every page Lyrenth serves is already fetched, rendered when
needed, and stored as a clean [AIDocument](/blog/what-is-an-aidocument),
and the same stored copy serves every caller, so the
[economics](/blog/one-crawl-serves-everyone-economics) beat any private
cache: the fetch cost was paid once, for everyone.
Freshness is explicit instead of accidental. Each plan documents the
maximum age of a cached read, and when your agent must have this minute's
version, a [force-refresh](/pricing) fetches the page anew and updates the
stored copy for the next reader. You choose per request, which is the
control a hand-built cache rarely reaches.
## When not to cache
Honesty requires the other half: some reads should never be cached.
Anything personalized, anything behind authentication, anything where the
answer changes per viewer has no meaningful shared copy. For the public
web that agents actually read, though, the pattern holds: cache by
default, refresh on demand, and let someone whose whole product is the
cache carry the invalidation problem.
Start with the free tier: [2,000 reads a month, no card](/pricing), cached
reads included.
### Two billion documents, and why the number matters more after September 15
https://www.lyrenth.com/blog/two-billion-documents
Lyrenth's index crossed two billion AI-ready documents this week, on a public live counter. Here is what an index that size changes for agents as the web's defaults turn restrictive.
*This is part of Countdown to September 15, a short series about the web's
new defaults for machine access. Part one covered
[what actually changes on the date](/blog/cloudflare-september-15-what-changes).*
This week the counter on our front page crossed two billion.
Two billion documents, each one a web page already fetched, rendered when it
needed rendering, cleaned of its navigation and cookie banners and scripts,
and stored as an [AIDocument](/blog/what-is-an-aidocument): the page's
actual content in a stable, compact shape an agent can read in one request.
The counter is live on [lyrenth.com](https://lyrenth.com), it moves while
you watch it, and it only moves one way.
A big number is easy to announce and hard to check, which is why ours is
public and always current rather than a press-release snapshot. But the
interesting question is not how big the number is. It is what the number
does for an agent, and the answer changed this summer.
## An index is a different promise than a fetch
Most tools that read the web for AI work like a browser without the human:
you ask for a URL, they go get it, right then, from the origin. That works
until it does not. The origin is slow, or down, or behind a challenge page,
or it simply says no to bots, and [says no more often every month](/blog/cloudflare-september-15-what-changes).
Every read is a fresh negotiation with a stranger.
An index makes the opposite promise: the work of fetching, rendering, and
cleaning happened before you asked. When the page you want is one of the
two billion, your read is served from the index in a fraction of a second,
at a fraction of the tokens, without the origin being asked again. The
measured numbers live on our [benchmarks page](/benchmarks), built from
real index data, and the token side is documented in
[what famous pages cost to read](/blog/token-cost-of-famous-pages).
Scale is what turns that promise from occasional luck into the normal
case. At two billion documents, growing by tens of millions a day, the
page an agent asks for is increasingly one we already hold, already clean,
already cheap. And when it is not, the miss is fetched by a crawler that
identifies itself, respects the site's rules, and adds what it learned to
the index, so the next agent's ask is a hit.
## Why this matters more after September 15
Everything in part one of this series compresses into one sentence: the
cost of an anonymous live fetch is going up. Sites are inheriting defaults
that block unexplained bots, and the share of the web willing to answer a
stranger's request is shrinking by policy, not by accident.
An index absorbs that shift on your behalf. The fetching that fills it is
done by one named, verifiable, policy-published bot with a standing
relationship to the sites it visits, described openly on
[our bot page](/bot). Your agent never has to be the stranger at the door,
because the knocking already happened, politely, once, for everyone.
That is the quiet argument the counter makes as it climbs. Not that big is
impressive, but that ready is different from reachable. After September 15,
a growing part of the web will be reachable only by those who prepared.
Two billion documents is what prepared looks like.
Reading from the index starts free: [2,000 documents a month, no card](/pricing).
Point your agent at any URL and see what comes back.
### September 15 is coming: what actually changes for AI crawlers
https://www.lyrenth.com/blog/cloudflare-september-15-what-changes
Cloudflare's new defaults land on September 15. Here is what gets blocked, who is affected, what stays allowed, and what agent builders and site owners should do before the date.
*This is part one of Countdown to September 15, a short series about the
biggest change to machine access to the web this year, and how to be ready
for it.*
On September 15, 2026, a large part of the web changes its default answer to
AI crawlers from yes to no.
Cloudflare [announced the change in July](https://blog.cloudflare.com/content-independence-day-ai-options/):
crawlers that mix jobs, the ones that blend search indexing, AI training,
and agent browsing into one bot, will be blocked by default from pages that
carry advertising. The block applies to new Cloudflare customers, to new
sites added by existing customers, and to every site on the free plan.
Paying customers keep a dashboard switch to let specific crawlers back in.
Two things make this bigger than one company's policy update.
## The defaults are the law of the web
Most site owners never touch bot settings. Whatever the default does, the
web mostly does. When the default was "allow everything that speaks HTTP,"
the open web was open to every bot, polite or not. When the default becomes
"block mixed-use AI crawlers on ad-supported pages," a meaningful share of
the web goes dark to any bot that cannot explain itself, and the owner of
that site never has to lift a finger for it to happen.
Cloudflare sits in front of roughly a fifth of the web, so its defaults are
not one vendor's preference. They are infrastructure policy.
## The question every bot now has to answer
The deadline forces a separation that the web has needed for years: what is
this bot, and why is it here? A crawler that indexes for search is treated
differently from one that harvests training data, and both are treated
differently from an agent acting for one user. Search stays allowed by
default. Training and mixed-use face the block. Bots that identify
themselves honestly, state their purpose, and respect the site's terms keep
a path in. Bots that will not, lose theirs.
That is the real story of September 15. It is not anti-AI. It is the end of
anonymous machine access to other people's content, and the beginning of
access as a relationship: identity, purpose, permission, and increasingly
payment. Cloudflare's own Pay Per Use program, launched with named AI
partners, points the same direction: publishers compensated when their
content is actually used in AI answers.
## If you build agents
Ask one question about every web access path in your product: when your
agent fetches a page, does the site know who is asking and why? If the
answer is no, some share of your reads starts failing on September 15, and
that share grows every time another site inherits the new defaults. The
symptoms will look like flaky scraping: more empty responses, more
challenge pages, more silent blocks. The cause will be policy, not code,
and no retry loop fixes policy.
The durable answer is to read the web through infrastructure that
identifies itself: a named bot with a published policy, cryptographically
signed requests, and published pages a site owner can check. That is how
Lyrenth's reading works today, described openly on [our bot page](/bot) and
[crawler policy](/crawler-policy), and it is why reads served from an index
do not turn into a new burden on the origin every time an agent asks.
## If you own a site
You are about to get real control, and it is worth spending ten minutes
deciding what to do with it. Our earlier guides walk through the
practicalities: [which AI bots read your site](/blog/which-ai-bots-read-your-site)
and [what robots.txt can and cannot do in the agent era](/blog/robots-txt-ai-agents-2026).
The short version: allow the bots that identify themselves and bring you
value, block the ones that will not say who they are, and know that after
September 15 the second part increasingly happens for you.
## The countdown
We will follow this to the deadline and past it. Next in the series: a
readiness checklist for agent builders, a site-owner's guide to the new
controls, what a two-billion-document index changes when the walls go up,
and, on the day itself, what actually shifted.
The web is not closing. It is starting to ask who is at the door.
### One crawl serves everyone: the economics of a shared web index
https://www.lyrenth.com/blog/one-crawl-serves-everyone-economics
Why one crawl serving every reader changes the cost of machine-read web data: real token numbers, cache math, and what shared infrastructure means for origins.
Every AI product that reads the web today re-solves the same problem in private. Thousands of teams fetch the same popular pages, strip the same boilerplate, parse the same markup, and pay for the same tokens, independently, over and over. It is as if every household that wanted electricity ran its own wire to the power plant.
This post is the economic argument for the alternative: a shared index, where a page is fetched once, cleaned once, stored once, and read by everyone. The argument is simple enough to fit in three numbers.
## Number one: what a page costs to read raw
Web pages are built for browsers, so most of their bytes are not content. From our [public benchmarks](/benchmarks), measured on the live API against real pages:
- Stripe's API reference is about 307,902 tokens of raw HTML. The same page as a clean AIDocument is about 2,000 tokens: a 99.4 percent reduction.
- Vercel's Functions docs: 237,390 raw tokens against 2,149 clean, 99.1 percent.
- Kubernetes' Pods concepts page: 131,977 against 7,475, 94.3 percent.
At the $3.00 per 1M input token price of a mid-class model, the Stripe page costs roughly 92 cents every time an agent reads it raw, and about half a cent as an AIDocument. An agent that reads fifty pages per task is either a rounding error or a real invoice, depending entirely on which format it reads. The full measured table is in [the token cost of famous pages](/blog/token-cost-of-famous-pages).
## Number two: how many times the web gets re-fetched
Cleaning the page solves the token cost. It does not solve the duplication, because every reader still fetches and cleans privately. The popular pages, the exact ones most likely to be asked about, are the ones fetched redundantly the most: every price checker hits the same product pages, every research agent hits the same documentation, every assistant hits the same news.
A shared index collapses that entire multiple to one. The first request for a URL causes one fetch by one identified crawler; the page becomes one canonical AIDocument; every subsequent reader, from any customer, is served from that copy. When a thousand agents ask for the same URL, the origin sees one crawl. We wrote up the serving mechanics, including what happens on a request for a page the index has never seen, in [crawl-on-miss, explained](/blog/crawl-on-miss-explained).
Freshness stays in the reader's control rather than being the price of sharing: the default serves the indexed copy with its age declared, and `force_refresh` makes the index refresh its copy before serving when the task genuinely needs the newest version.
## Number three: what the index already holds
Sharing only works if the shared thing has coverage, because the first URL an agent asks for and does not get ends the session. As of this week the index holds more than 4 billion pages across 170 million domains, growing by over 50 million pages a day, with live counters on the [stats page](/web-index/stats). Coverage is the product: it is the difference between a cache that sometimes helps and an index you can build on.
## The side of the ledger nobody prices: origins
The same math that saves readers money is what makes the model sustainable for the websites being read, and this half matters just as much.
Redundant fetching is a cost the web absorbs silently. Every private scraper that reads a page burns the origin's bandwidth and compute to produce value the origin never sees, multiplied by every company doing it in parallel. The shared index inverts that: aggregate machine demand reaches the origin as a single, rate-limited, robots-respecting crawl from an identified crawler, and everything after that is served from the index without touching the site at all. Attribution and source links travel with every document, we [do not train foundation models](/bot) on crawled content, and site owners can see, verify, and control how they are read.
This is why the shift the web is going through right now, defaults that welcome search-class indexing while walling off anonymous per-agent fetching, which we covered in [the metered web](/blog/metered-web-what-agent-builders-should-know), points toward shared infrastructure rather than away from it. An index is the version of machine reading that origins can live with.
## Why per-read pricing follows from the architecture
Shared infrastructure is also what makes honest pricing possible. When the expensive events (fetching, rendering, cleaning, storing) happen once per page instead of once per reader, the marginal cost of a read is small and measurable, so the product can charge per read, with the free tier a real allowance rather than a teaser. You pay for what your agents actually consume, not for the duplicated machinery behind it. That is the entire pricing philosophy, and the [pricing page](/pricing) is short because the architecture did the work.
## The one-sentence version
Reading the web is a shared problem wearing a thousand private costumes: fetch once, clean once, serve everyone, and the cost per read collapses for readers while the load on origins collapses with it. That is the economics of an index, and it is live today: the [quickstart](/docs/quickstart) is one API call, and the free tier needs no card.
### llms.txt, explained for developers
https://www.lyrenth.com/blog/llms-txt-explained-for-developers
What llms.txt is, the exact file format, how it differs from robots.txt and sitemaps, who adopted it, and how to write one that AI assistants actually use.
If robots.txt is how a website says "here is what you may read," llms.txt is how it says "here is what is worth reading, and in what order." It is one of the simplest proposals to come out of the AI-and-the-web moment, it is spreading fast through developer documentation, and it takes about an hour to do well. Here is the whole picture.
## What llms.txt is
[llms.txt](https://llmstxt.org/) is a proposed standard: a Markdown file served at the root of your site (`/llms.txt`) that gives language models a curated map of your content. The problem it solves is context: models cannot ingest your whole site, and HTML pages drown the useful part in navigation, scripts, and layout. llms.txt hands a model the short version: what this site is, what matters most, and direct links to clean text.
The proposal has a second half people miss: pages worth reading should also exist as plain Markdown at the same URL with `.md` appended. The HTML page stays for people; the `.md` twin serves machines.
## The exact format
The spec is deliberately rigid so both models and ordinary parsers can rely on it. In order:
1. An `H1` with the site or project name. This is the only required section.
2. A blockquote summarizing the project, carrying the key facts needed to interpret everything below.
3. Optional prose sections with details, anything except headings.
4. Zero or more `H2` sections containing file lists: Markdown links, each optionally followed by a colon and a note.
5. An optional section literally titled `Optional`, with a defined meaning: these links may be skipped when context is tight.
A minimal example in the spec's shape:
```
# Acme Analytics
> Acme is a self-hosted product analytics server with a REST API
> and SDKs for six languages.
## Docs
- [Quickstart](https://acme.dev/docs/quickstart.md): install to first event in ten minutes
- [REST API](https://acme.dev/docs/api.md): every endpoint with request and response examples
## Optional
- [Changelog](https://acme.dev/changelog.md)
```
That is the whole standard. No XML, no schema registry, no tooling required to start.
## llms.txt vs robots.txt vs sitemap.xml
The three root files answer three different questions, and none replaces another.
- **robots.txt** answers "what may automated clients fetch?" It is access policy, scoped to crawlers, and in 2026 it is doing heavy lifting we covered in [how robots.txt applies to AI agents](/blog/robots-txt-ai-agents-2026).
- **sitemap.xml** answers "what exists?" It enumerates everything for search indexing, without curation, and in aggregate is far too large for a context window.
- **llms.txt** answers "what should a model read first, and where is the clean version?" It is editorial, not exhaustive: a curated overview meant for inference time, when a user is actively asking about your product, rather than for training.
They compose: robots.txt grants access, sitemap.xml enumerates, llms.txt curates.
## Who is using it
Adoption started where the pain is sharpest: developer documentation, where users constantly paste docs into assistants and coding agents. The FastHTML project maintains the reference implementation, publishing both [its llms.txt](https://www.fastht.ml/docs/llms.txt) and `.md` twins of every docs page, and the nbdev documentation ecosystem generates `.md` versions of all pages by default. Public directories like [llmstxt.site](https://llmstxt.site/) track sites that publish the file.
Honesty requires the caveat: llms.txt is a proposal, not an IETF standard, and no major assistant has committed to fetching it on every request. Today its reliable consumers are coding tools and agents whose users point them at it deliberately. That is also why it costs so little to adopt: the file is useful the first time one user's agent reads it, and its value only grows if consumption becomes automatic.
## Writing a good one
The spec's own guidance, plus what we see reading the web at index scale:
1. **Curate ruthlessly.** llms.txt is not a second sitemap. Ten links a model should actually follow beat two hundred it cannot.
2. **Make the blockquote load-bearing.** One or two sentences that let a model answer "what is this and who is it for" without following a single link.
3. **Annotate the links.** The `: note` after each link is what lets a model pick the right one instead of fetching all of them.
4. **Serve real Markdown at the targets.** The file is a map; the destinations should be clean text, not links back into HTML soup.
5. **Use the Optional section honestly.** Put genuinely secondary material there, so tight-context readers know what to skip.
6. **Keep it current.** A stale llms.txt misleads the exact readers who trusted you enough to use it.
## Where an index fits in
llms.txt is each site solving machine readability for itself, one file at a time, for the sites that opt in. An AI-readable index solves the same problem from the other side, for every public page at once: Lyrenth crawls the web and serves every URL as a clean, structured [AIDocument](/blog/what-is-an-aidocument), whether or not the site ever published a Markdown twin. The two are complementary, and we read them in that spirit: site-provided structure is a signal of a well-maintained machine-readable site, and machine readability is exactly what our [AI Readiness score](/blog/ai-readiness-score-explained) measures for site owners.
If you publish documentation, do both: write the llms.txt (it is an hour well spent for every agent your users point at you), and [check your readiness score](/bot) to see your site the way machine readers see it. And if you are on the consuming side, building the agent rather than the docs, the index already holds the clean version of more than 4 billion pages: the [quickstart](/docs/quickstart) is one API call.
### How robots.txt applies to AI agents in 2026
https://www.lyrenth.com/blog/robots-txt-ai-agents-2026
What robots.txt actually governs in 2026, how AI crawler tokens work, recipes to allow search and block training, and why verification matters as much as rules.
robots.txt is a 1994 idea having its biggest year since 1994. A plain text file that politely asks robots to stay out of certain paths has become the frontline document in the negotiation between the web and AI, and in 2026 it is doing jobs it was never designed for. Here is what it actually governs, what it cannot do, and how to write one that says what you mean.
## What robots.txt actually is
Since 2022, robots.txt has a formal specification: [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html), the Robots Exclusion Protocol. The mechanics are simple. A crawler is expected to fetch `/robots.txt` before crawling, find the group whose `User-agent` line matches its product token, and obey the `Allow` and `Disallow` rules in that group. A `Disallow: /` under its token means: do not crawl this site.
Two properties matter more than everything else:
**It is scoped to automatic clients.** RFC 9309 governs crawlers, programs that autonomously choose what to fetch. It was never a general access-control system.
**It is voluntary.** robots.txt is a request, enforced by the reader's good behavior, not by the server. A compliant crawler obeys it exactly; a bad actor ignores it entirely. This single fact explains most of what has changed around it in 2026.
## What changed in 2026
**Purpose-labeled crawling became the norm.** The big operators now run separate crawlers for separate jobs, with separate tokens, so a site can allow one purpose and refuse another. This mirrors the taxonomy Cloudflare is now [enforcing at the network level](/blog/cloudflare-blocks-ai-crawlers-what-site-owners-should-do): search, agent, and training are different behaviors deserving different answers, and combined-purpose crawlers are increasingly treated by their most expansive behavior.
**Machine-readable rights reservations grew up alongside it.** robots.txt says what may be crawled; TDM reservation signals and robots-meta directives like `noai` and `notrain` say what may be done with content afterward, reserving text-and-data-mining and AI-training rights. They answer a different question than robots.txt and well-behaved indexers honor both.
**Enforcement moved into infrastructure.** Because robots.txt is voluntary, 2026's real shift is that networks and CDNs began enforcing crawl policy at the edge, with defaults, categories, and verification. The polite file did not get teeth; the teeth grew around it.
## Writing a robots.txt that says what you mean
A few recipes, using the real mechanics.
**Allow search-class indexing, refuse a specific bot:**
```
User-agent: SomeBot
Disallow: /
User-agent: *
Allow: /
```
**Keep private sections out of every well-behaved crawler:**
```
User-agent: *
Disallow: /internal/
Disallow: /drafts/
```
**Refuse one purpose without refusing discovery.** Because operators split crawlers by purpose, you can now target the purpose by targeting its token. Check each operator's published documentation for which token does what, and write a group per token. The precision only works when bot operators are honest about their tokens, which is where verification comes in below.
Three mistakes to avoid: rules for the wrong token (a group only binds crawlers whose token matches), assuming robots.txt hides content (it is public, and disallowing a path advertises that the path exists), and treating it as security (it is a request; access control belongs in authentication).
## How Lyrenth reads your robots.txt
We can speak precisely for our own crawler, because the policy is public and singular. Lyrenth's crawler matches the token `AIWebIndex`, and it implements RFC 9309 in full: `Disallow` rules, `Crawl-delay`, `Sitemap` directives, backoff on 429 and 503, and per-domain rate caps. The one exception to the rate caps is pages a verified site owner asks us to fetch again (with Recheck or the change webhook): those skip the wait and the `Crawl-delay`, and robots.txt still applies. Two details worth knowing because they are stricter than the RFC requires:
- **Every fetch obeys, on every path.** Whether a page is fetched by our scheduled crawler or on demand because an API customer asked the index for a URL it did not hold yet, the same rule applies: a URL your robots.txt disallows for our token is not fetched, not indexed, and not served, and the API request is refused with an explanation instead. There is no customer override.
- **We fail closed.** If your robots.txt cannot be read at all and we hold no cached copy, we treat the site as disallowed until we can read it.
We also honor TDM reservations and `noai`-family directives, and we [do not train foundation models](/bot) on crawled content. The full policy, including both of our User-Agent strings and every opt-out mechanism ranked by strength, is on the [crawler policy page](/crawler-policy).
## The missing half: verification
Here is the uncomfortable truth about every recipe above: a robots.txt group binds a token, and a token is just a string. Anyone can send `User-agent: Googlebot`. In 2026, a crawl policy without verification is a lock without a door.
Verification is how the honest half of the ecosystem is fixing this: cryptographic request signatures (Web Bot Auth, the scheme Cloudflare's verified-bots program uses), published IP ranges, and forward-confirmed reverse DNS. A crawler that gives you all three can be held to its stated purpose; one that gives you none of them is asking for trust it has not earned. Our own verification surface is documented on the [bot page](/bot), and your server logs can be checked against it in minutes.
For site owners who want the full picture of who reads them, purpose by purpose, verified against impostors, that is what our [bot analytics](/blog/which-ai-bots-read-your-site) shows, free with domain verification.
## The one-paragraph summary
robots.txt in 2026 is the web's statement of intent: scoped to automatic clients, voluntary by design, newly precise thanks to purpose-labeled tokens, and newly meaningful because infrastructure started enforcing it and verification started proving who is who. Write yours deliberately, pair it with rights signals if you have training concerns, and extend trust to crawlers that prove their identity and publish their policy. The ones worth allowing are the ones that make it easy to check.
### The web is getting metered for machines: what agent builders should know before September 15
https://www.lyrenth.com/blog/metered-web-what-agent-builders-should-know
Cloudflare's new defaults block agent fetchers on ad pages and per-fetch access is getting priced. How agent builders keep reading the web through an index.
If you build AI agents that read the web, two announcements this month changed your operating environment, and most of the coverage was written for publishers, not for you. Here is the agent builder's view.
## What changed
**First: agent fetchers lose default access to a slice of the web.** On July 1, Cloudflare [announced](https://blog.cloudflare.com/content-independence-day-ai-options/) a new classification for automated traffic (Search, Agent, Training) and new defaults arriving **September 15, 2026**: for new domains on Cloudflare, the **Agent** and **Training** categories are blocked by default on pages that display ads. "Agent" here means exactly the thing many of us build: chat fetchers and browser-driving automation acting in real time on a user's behalf. Cloudflare names the pattern explicitly, and the default answer for it on ad-monetized pages becomes no.
**Second: per-fetch access is becoming per-use pricing.** Cloudflare's pay-per-crawl marketplace is evolving toward what press coverage describes as pay-per-use, where publishers charge when content actually contributes to an answer rather than merely when it is fetched ([TechCrunch's coverage](https://techcrunch.com/2026/07/01/cloudflares-new-policy-pushes-ai-companies-to-pay-for-publishers-content/) has the details). The precise mechanics will evolve, but the direction is not subtle: the anonymous, free, per-request read is on its way out.
Put together: the raw fetch, the thing every DIY agent stack is built on, is becoming both **less allowed** and **more expensive**.
## Why this breaks the DIY fetching stack
The standard agent architecture fetches pages directly: the agent hits the origin, parses whatever HTML comes back, and burns context window on markup. That stack already had problems we have written about before: [JavaScript-heavy sites return empty shells](/blog/why-scrapers-get-empty-html-from-javascript-sites), and [the true cost of running your own fetching infrastructure](/blog/diy-scraper-stack-real-cost) is a full-time job hiding inside a weekend project.
September 15 adds a policy wall on top of the technical ones. Every direct fetch your agent makes is, in Cloudflare's taxonomy, Agent traffic, and on a growing share of the web the default answer to that traffic on monetized pages is a block page. Retrying harder is not a strategy; being evasive about identity is how bot operators end up on the wrong lists permanently.
## The architecture that keeps working
Notice which category **stays allowed by default: Search**. Indexing, the behavior where content is collected once, served with attribution, and funnels discovery back to the origin, is the one the new defaults treat as welcome. That is not an accident, and it points at the durable architecture for agents that read the web:
**Do not fetch. Read from an index.**
When your agent reads through an index, the fetch that touched the origin happened once, was made by an identified, verified, search-class crawler that honors robots.txt, and now serves every reader from the same copy. Your agent gets the page as a clean, structured [AIDocument](/blog/what-is-an-aidocument) instead of raw markup, and the origin sees one polite crawl instead of a thousand agent fetches. We wrote up the model in detail in [agents don't browse, they read](/blog/agents-dont-browse-they-read).
The numbers are not close. From our [public benchmarks](/benchmarks), measured on the live API:
- Stripe's API reference: 307,902 tokens of raw HTML, 2,000 tokens as an AIDocument, a 99.4 percent reduction.
- Vercel's Functions docs: 237,390 raw tokens, 2,149 as an AIDocument, 99.1 percent.
- Kubernetes Pods concepts: 131,977 raw tokens, 7,475 as an AIDocument, 94.3 percent.
At a $3.00 per 1M input token model price, that Stripe page costs about 92 cents to read raw and well under a cent as an AIDocument. Multiply by every page your agent reads per task, and the metered web stops being a threat and becomes an argument for reading efficiently.
## What one read looks like
One call, URL in, structured document out:
```sh
curl -s https://api.lyrenth.com/v1/aidocument \
-H "Authorization: Bearer $LYRENTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://docs.stripe.com/api"}'
```
If the index holds the page (it holds more than 4 billion of them across 170 million domains, live counters on the [stats page](/web-index/stats)), the response is instant and the origin is never contacted. If it does not, the index fetches the page itself, under its own crawler policy, indexes it, and serves it; every future reader shares that copy. When your task needs the newest version, pass `force_refresh` and the index refreshes its copy before serving you. The full serving model is in [crawl-on-miss, explained](/blog/crawl-on-miss-explained).
## The checklist for agent builders
1. **Audit where your fetches actually go.** If your agent hits origins directly, count how much of that traffic lands on ad-monetized pages. That share is where September 15 bites first.
2. **Split reading from acting.** Reading a page to extract information is index work; submitting a form on a user's behalf is genuinely agentic and will always be a direct interaction. Architect the two differently instead of shipping one fetcher that does both badly.
3. **Stop spending identity as a cost.** Unidentified traffic is the thing the whole web is arming against. Read through infrastructure that identifies itself cryptographically and honors robots.txt, so your product is not betting its uptime on staying unnoticed.
4. **Price your reads.** Whatever your stack, know your cost per page read, in tokens and in dollars. The metered web punishes architectures that never measured this.
The web is not closing to machines. It is closing to anonymous, redundant, per-agent fetching, and it is staying open to identified reading that gives something back. Build on the second one. The [quickstart](/docs/quickstart) takes about five minutes, and the free tier needs no card.
### Cloudflare will block AI crawlers by default on September 15: what site owners should actually do
https://www.lyrenth.com/blog/cloudflare-blocks-ai-crawlers-what-site-owners-should-do
Cloudflare blocks Training and Agent crawlers by default on ad pages from September 15, 2026. What changes, who it affects, and a site-owner checklist.
On July 1, Cloudflare announced the biggest change to how the web treats automated readers since robots.txt: starting **September 15, 2026**, new defaults that block whole categories of AI crawlers unless a site owner decides otherwise. If you run a website, this change reaches you whether you use Cloudflare or not, because it resets what "normal" looks like for every bot operator on the web.
Here is what was actually announced, what it means for your site, and a short checklist to work through before the deadline.
## What Cloudflare announced, precisely
The announcement (Cloudflare calls it their second [Content Independence Day](https://blog.cloudflare.com/content-independence-day-ai-options/)) has three parts.
**1. A taxonomy: Search, Agent, Training.** Instead of asking whether a bot "is AI," Cloudflare now classifies bots by what they do with your content:
- **Search**: collects or indexes your content so it can answer questions about it later, and is expected to send referral traffic or other compensation back.
- **Agent**: acts in real time on a person's behalf, like chat fetchers and browser-driving agents, usually with a human waiting on the other end.
- **Training**: takes your content to train or fine-tune a model, absorbing it permanently into the model's weights.
All Cloudflare customers, including the free tier, can now allow or block each category separately.
**2. New defaults on September 15.** For new domains onboarding to Cloudflare, **Training and Agent crawlers will be blocked by default on pages that display ads**, while **Search remains allowed by default**. Cloudflare's reasoning: an ad is a signal that a page was meant for human attention, so bots that bypass that attention get blocked there, while search, the behavior that funnels visitors back, stays open.
**3. Multi-purpose crawlers get judged by all of their behaviors.** This is the part with the widest blast radius. A crawler that combines Search with Training is subject to the most restrictive applicable rule. Cloudflare names Googlebot, Applebot, and BingBot specifically: customers who block Training will block those crawlers too, because they crawl for both purposes with one bot. Site owners who do not want that outcome can opt out in their security settings before September 15.
## What this means depending on who you are
**If your site runs ads:** you are the direct target of the new defaults. After September 15, new Cloudflare domains will serve your ad pages to human visitors and search crawlers, and refuse training scrapers and real-time agent fetchers by default. If you want agents to be able to read your pages (for example, because AI assistants recommending your product is how customers find you), that is now an explicit choice you have to make, not a default you inherit.
**If you sell through AI recommendations:** be careful with the blunt settings. Blocking the whole Agent category also blocks the fetcher that reads your pricing page when a customer asks their assistant "which of these tools should I buy?" The taxonomy exists so you can make a finer choice than "block all automation."
**If you rely on Google:** the multi-purpose rule is the one to understand. Blocking Training without reading the fine print can block the crawler your search traffic depends on. Check which of your rules apply to combined-purpose bots before the defaults land.
**If you are not on Cloudflare at all:** the defaults still matter, because they reset expectations. Bot operators now have a strong incentive to split their crawlers by purpose and identify themselves clearly, and site owners everywhere will start asking the same question Cloudflare's dashboard asks: what does this bot do with my content?
## The question behind the question: who is actually reading you?
Category rules only work if bots tell the truth about their category, and anyone can put anything in a User-Agent string. That is why the other half of this shift is **verification**: cryptographic request signatures, published IP ranges, and reverse DNS that let you confirm a crawler is who it claims to be. Cloudflare maintains a directory of verified bots for exactly this reason.
This is also where we should say plainly where Lyrenth sits in this taxonomy. Lyrenth operates a **single-purpose, search-class crawler**: it fetches public pages once, indexes them, and serves every subsequent reader from the index, with attribution and a link back to the source. We [do not train foundation models](/bot) on the content we crawl, and every fetch honors robots.txt. Our crawler signs its requests, publishes its IP ranges, and documents both of its User-Agent strings in our [crawler policy](/crawler-policy), so you can verify us instead of trusting a string.
If you want to see which AI bots are reading your site today, verified against the impostors, that is exactly what our free site-owner tools show: [see which AI bots read your site](/blog/which-ai-bots-read-your-site).
## The checklist before September 15
1. **Inventory your bot traffic now.** Before defaults change, know your baseline: which crawlers visit, in which category, and which pages they read. Decisions made blind are the ones you reverse in October.
2. **Decide per category, not per vibe.** Search: almost every site should keep it open, it is where discovery comes from. Training: your call, and it is a real trade with real leverage only if your content is distinctive. Agent: think about whether AI assistants acting for customers are a channel for you or a cost.
3. **Check the multi-purpose consequences.** If you block Training, confirm you are comfortable with what that does to combined-purpose crawlers like Googlebot under the most-restrictive rule.
4. **Mind your ad pages specifically.** The new defaults key off ad presence. Know which of your pages carry ads and whether the default treatment there matches what you want.
5. **Say your policy in robots.txt too.** Cloudflare settings govern Cloudflare's network; robots.txt speaks to every well-behaved crawler everywhere. Keep the two consistent so honest bots outside Cloudflare hear the same policy.
6. **Prefer verified crawlers.** Whatever you allow, allow it for bots that prove their identity. An allowlist built on User-Agent strings alone is an invitation.
## The bigger picture
The 30-year-old deal ("crawl me, send me visitors") broke when reading stopped producing visits, and September 15 is the first time a major infrastructure provider changes the web's defaults to reflect that. The direction is clear: purpose-labeled, identity-verified, permission-based crawling. That is the world Lyrenth was built for from day one, and it is a better world for site owners than the anonymous free-for-all it replaces.
If you want your site to be represented accurately to every AI reader that comes through our index, [verify your domain](/bot): your dashboard shows how AI reads each page and, with our edge worker, exactly which AI agents visit, and you can send the pages you change to the front of our crawl queue.
### See exactly which AI bots read your site (and which just say they do)
https://www.lyrenth.com/blog/which-ai-bots-read-your-site
User-agent strings are easy to fake. Here is how to verify which AI bots really read your site, and how AI bot traffic analytics show it without grep.
Ask anyone who runs a site and reads their own access logs: the audience is changing. A growing share of requests come not from browsers but from AI agents, fetching a page to answer a question, ground a coding session, or fill a research loop. The first question every owner asks is which AI bots are reading my site. The sharper second question is which of those bots are who they claim to be. This post covers both: why the obvious approach (grepping for user agents) quietly lies to you, what real verification looks like, and how to see the verified picture on a dashboard instead of in a terminal.
## Round one: grep the logs
Every well-behaved bot announces itself in the `User-Agent` header, so the obvious move is to search your logs for the names you know. Here is what that traffic looks like in a standard combined-format access log. These lines are illustrative, invented traffic against example.com, not real measurements:
```text
198.51.100.7 - - [16/Jul/2026:09:14:07 +0000] "GET /docs/api HTTP/1.1" 200 48213 "-" "SomeAIBot/1.2 (+https://example.net/bot)"
203.0.113.42 - - [16/Jul/2026:09:14:11 +0000] "GET /pricing HTTP/1.1" 200 12904 "-" "LyrenthBot"
```
From there the classic pipeline is ten minutes of work:
```sh
grep -i "someaibot" /var/log/nginx/access.log \
| awk '{print $1}' | sort | uniq -c | sort -rn
```
You get a tidy table of bot names and hit counts, and it feels like an answer.
Here is the flaw. A user agent is a plain request header. It is a string the client chooses to send, and nothing anywhere checks it. This one-liner produces a log entry that looks exactly like a visit from our crawler:
```sh
curl -A "LyrenthBot" https://example.com/docs/api
```
Anyone can type any bot's name, and there are real incentives to do so. A known, well-behaved bot name inherits that bot's reputation: if owners have allowed it in robots.txt or in firewall rules, wearing its name is the cheapest way through the door. So a UA-only tally is really the sum of at least three populations you cannot separate: the operator's genuine crawler, scrapers borrowing its name, and one-off scripts someone never bothered to relabel. It is an upper bound with an unknown amount of junk mixed in, and you cannot make allow, throttle, or block decisions from it.
The inverse failure is worth naming too. If you block by user agent, you only block the clients honest enough to keep the name. The dishonest ones switch to a browser string and keep going. UA matching is a courtesy protocol; it works on exactly the actors who never needed policing.
## What separates a claimed bot from a proven one
A bot is proven when its identity rests on something a spoofer cannot simply type. Three checks do that work, and they are independent: each one catches cases the others miss.
### Published IP ranges
The operator publishes the IP ranges its crawler egresses from, and you check the connecting address of each request against that list. Faking a header costs one command-line flag. Sourcing your traffic from inside someone else's published network is a different class of problem entirely.
### Reverse DNS that resolves back
Take the connecting IP and do a PTR lookup. For a genuine bot, the hostname you get back sits under the operator's domain, and resolving that hostname forward returns the same IP you started with. Both halves matter. A PTR record alone can claim anything, since whoever holds the IP sets it. The forward confirmation has to come from the operator's own DNS zone, which the spoofer does not control.
### Signed requests (Web Bot Auth)
The strongest check: the bot cryptographically signs its requests, and you verify the signature against the operator's published key. Without the private key there is no valid signature, no matter what the header says or where the packets came from. Signatures also survive infrastructure changes that would make an IP list stale.
LyrenthBot, the crawler that builds Lyrenth's index, does all three. It identifies itself in the user agent, crawls from published IP ranges with reverse DNS that resolves back to us, and signs its requests with Web Bot Auth. The verification details, ranges included, live at [/bot](/bot). We do this deliberately, precisely so that any owner can separate our real traffic from someone wearing our name. The bot also respects robots.txt, reads only the public web, and never signs in to accounts. And to state the policy plainly: Lyrenth does not train foundation models on crawled content. We build a search index that serves pages as AIDocuments, nothing else.
One structural fact about our traffic is useful when you read your logs. Lyrenth serves every read from the index. If a page is already indexed, the caller gets the cached index copy instantly and your origin is not contacted at all. If a page is not in the index yet, it is crawled once, indexed, and served from that fresh index entry. One crawl serves every caller, so a single LyrenthBot fetch in your log can stand behind many downstream reads of that page.
## Seeing it without grep
You can run all three checks by hand. It means keeping per-operator IP lists current, scripting the double-sided rDNS lookups, and implementing signature verification, then redoing pieces of it whenever an operator changes infrastructure. It is tractable, but it is a side project that decays the moment you stop tending it.
We built this into the site-owner side of Lyrenth instead. Verify your domain (a DNS TXT record or an HTML file, your choice) and your dashboard shows bot-traffic analytics through a lightweight worker integration: which AI bots visited, how often they came, and what they read, with the verification already done. The setup is documented at [/docs/bot-tracking](/docs/bot-tracking).
Verification unlocks the rest of the owner tooling at the same time: per-domain stats and an AI-readiness score from 0 to 10, computed as the mean of per-page audits across your site. The score tells you how well AI readers can actually parse what you publish, which is the natural follow-up question once you know they are visiting.
## Why this matters more every month
Agent traffic is not a curiosity anymore, and every month it is a larger share of how your pages get read. We see the demand side of this directly: Lyrenth's index now covers over 4 billion documents across more than 170 million domains ([live index stats](/web-index/stats)), and the callers reading it are agents and applications, not people paging through a browser.
That growth turns bot identity from trivia into an operating decision. You will decide which bots to allow, which to rate-limit, and which to block. You will want to know whether the agents reading your pages are seeing your content correctly. You will write robots.txt rules and want confidence about who actually honors them. Every one of those decisions is only as good as your ability to tell a proven bot from a pretender, because the pretenders are, by construction, the ones your user-agent rules cannot touch.
For the fuller owner playbook, covering robots.txt policy, verification in depth, and what to do about the bots that do not verify, see our [site owner's guide to AI bots and verification](/blog/publishers-guide-ai-bots-and-verification).
Domain verification is on the free tier: [sign up](/signup) (2,000 AIDocuments a month, no card, one verified domain), prove ownership with a TXT record or an HTML file, and your dashboard starts showing which AI bots really read your site. If you want the API side first, start with the [quickstart](/docs/quickstart).
### Crawl-on-miss: how an index reads pages it has never seen
https://www.lyrenth.com/blog/crawl-on-miss-explained
Crawl on miss, explained: how Lyrenth serves every page from its index, whether cached or freshly indexed, and when a re-crawl happens before serving.
Give an agent the ability to read the web and it will eventually ask for a URL nobody has requested before. An index that could only answer for pages it already holds would make that first read a dead end. Lyrenth's answer is crawl-on-miss: request any public URL and you get an AIDocument back, whether the index has held that page for months or first learned about it because of your call.
The index currently holds over 4 billion documents across more than 170 million domains (live counts at [/web-index/stats](/web-index/stats)), and crawl-on-miss is the reason those numbers are a floor rather than a ceiling on what you can read through the [AIDocument API](/docs). This post explains the two serving states, what the `cache` block in every response tells you, and how freshness windows and `force_refresh` decide when we go back to the origin.
## One rule: everything is served from the index
Start with the rule that makes the rest of the design easy to reason about: every AIDocument is served from the index. There is no separate live-fetch mode and no code path that pipes raw crawler output at you. What varies between requests is only whether the index entry existed before you asked.
**Cached index.** The copy already existed. `cache.status` comes back as `hit`, the response is instant, and the site was not contacted. Most reads land here, because popular pages are exactly the pages the index has already seen.
**Freshly indexed.** The index has never seen the URL. Lyrenth crawls the page, cleans it into an AIDocument, writes it into the index, and serves you that fresh entry. Your response is the first read of a brand-new index record.
Note what the second state is not: the crawl is not the thing serving you. The crawl is how the entry gets into the index, and the index is what serves it, to you and to everyone after you. That distinction sounds pedantic until you see the consequence: one crawl serves every caller. The second person to request that URL gets a cached-index hit, and the origin site never hears about it.
## Reading the cache block
Every response carries a `cache` block, so you never have to guess which state you got. Here is the call:
```sh
curl -s https://api.lyrenth.com/v1/aidocument \
-H "Authorization: Bearer $LYRENTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://docs.python.org/3/library/json.html"}'
```
And here is the relevant slice of the response, with the body and the other fields trimmed:
```json
{
"aidocument": {
"source": {
"url": "https://docs.python.org/3/library/json.html",
"fetched_at": "2026-07-16T09:14:03Z",
"render_mode": "static",
"status_code": 200
},
"cache": {
"status": "hit",
"origin_contacted": false
}
}
}
```
A `cache.status` of `hit` says the copy already existed, and `origin_contacted: false` confirms the site was not touched to answer you. On a freshly indexed read, the cache block records instead that the origin was contacted, and `source.fetched_at` carries a timestamp from moments ago. On a hit, `fetched_at` is the honest capture time of the stored copy, so you always know how old the page you are reading actually is.
(For what sits in the rest of the response, the cleaned body, the structure, and the token economics, see [what an AIDocument is](/blog/what-is-an-aidocument).)
## What this means for an agent
Three practical consequences follow.
**Hits return instantly.** A cached-index read involves no origin fetch, no render, and no waiting on someone else's server. For an agent making several reads per task, this is the difference between a loop that is bounded by your own model calls and a loop that is bounded by the slowest website in the chain.
**A first-ever read pays one origin fetch.** When you request a URL the index has never seen, your call waits for the crawl and the cleaning before the fresh entry comes back. That is the honest cost of being first, and you pay it once per page, not once per caller.
**After that, every caller shares the copy.** Your first read of an obscure changelog page becomes everyone's instant hit, and the same is true in reverse. This is the core difference between an index and a fetch-on-demand tool: the work compounds. It is also why the read pattern beats the browse pattern for agents, which we cover in [agents don't browse, they read](/blog/agents-dont-browse-they-read).
Both states cost the same: one credit per successful read, whether it was a hit or freshly indexed. And the single origin fetch behind a miss is made by an identified crawler. LyrenthBot signs its requests with Web Bot Auth, publishes its IP ranges, resolves via reverse DNS, and respects robots.txt (verification details at [/bot](/bot)). It reads only the public web and never signs in to accounts. Lyrenth does not train foundation models on crawled content; the crawl exists to serve the page to callers, nothing else.
## Freshness windows: when a hit is not fresh enough
A stored copy is only useful if it is recent enough for your purpose, so every plan carries a freshness window, and the serving rule extends naturally: if the copy in the index is older than your plan's window, Lyrenth re-crawls the page before serving you. You still get an index entry, just a newer one. A re-crawl triggered by your freshness window is a normal read and costs one credit.
| Plan | Price | AIDocuments per month | Freshness window |
|---|---|---|---|
| Free | $0 | 2,000 | 90 days |
| Starter | $19/month | 20,000 | 7 days |
| Pro | $79/month | 200,000 | 24 hours |
On Free, the copy you are served is never older than 90 days; on Pro, never older than 24 hours. Rate limits and the rest of the plan details are on the [pricing page](/pricing).
### force_refresh, for this-second freshness
Sometimes even 24 hours is too old: a changelog published this morning, a status page mid-incident, a price you are about to act on. Pass `"force_refresh": true` in the request body and Lyrenth re-crawls and re-indexes the page before serving it, regardless of how fresh the stored copy is. A forced refresh costs 2 credits instead of 1, which keeps it a deliberate choice rather than a default. The response is still served from the index; you are just insisting the entry be seconds old.
## The misses that stay misses
Crawl-on-miss covers the public web, and only the public web. Because LyrenthBot fetches as an anonymous client, a URL behind a login, paywall, or IP allowlist cannot become an index entry. Rather than hand you a stripped login shell, the API says so plainly with an HTTP 422:
```json
{
"error": "upstream_unauthorized",
"message": "internal.example.com requires authentication (401). Lyrenth fetches as an anonymous client; URLs behind a login, paywall, or IP allowlist can't be retrieved this way.",
"upstream_status": 401
}
```
Failed fetches cost nothing. A 4xx or 5xx outcome does not consume a credit, so probing a URL that turns out to be gated is free.
The simplest way to internalize the two states is to trigger them yourself: read a page, read it again, and watch `cache.status` flip to `hit` on the second call. The [free tier](/signup) includes 2,000 AIDocuments a month with no card required, and the [quickstart](/docs/quickstart) gets you to that first call.
### LangChain document loaders for live web pages: a clean pattern
https://www.lyrenth.com/blog/langchain-live-web-pages-loader
A custom LangChain web loader that reads pages as clean AIDocuments instead of raw HTML: about 30 lines of Python, with real token numbers.
LangChain's `Document` is a deliberately small contract: `page_content` plus a `metadata` dict. Splitters, retrievers, and chains all operate on that shape, so the quality of everything downstream is set by what you put in `page_content`. The hard part was never the contract. It is getting a live web page into it without dragging the page's navigation, scripts, and consent banners along.
The stock approach is to fetch the URL and strip tags from whatever comes back. That fails outright on JavaScript-rendered sites, which hand a plain fetcher an empty shell (we wrote up [why that happens](/blog/why-scrapers-get-empty-html-from-javascript-sites)), and on the pages that do load, it quietly fills your chunks with boilerplate. Here is the pattern we use instead: a custom loader, about 30 lines of Python, that reads pages through the Lyrenth AIDocument API and yields Documents whose body is clean Markdown.
One thing to be clear about up front: this is a pattern, not an official package. There is no `langchain-lyrenth` on PyPI. Copy the class, adapt it, own it.
## The loader
```python
from collections.abc import Iterator
import requests
from langchain_core.documents import Document
API = "https://api.lyrenth.com/v1/aidocument"
class LyrenthLoader:
"""Yield one Document per URL, read from the Lyrenth index."""
def __init__(self, urls: list[str], api_key: str, force_refresh: bool = False):
self.urls = urls
self.api_key = api_key
self.force_refresh = force_refresh
def lazy_load(self) -> Iterator[Document]:
for url in self.urls:
payload = {"url": url}
if self.force_refresh:
payload["force_refresh"] = True
resp = requests.post(
API,
json=payload,
headers={"Authorization": f"Bearer {self.api_key}"},
timeout=60,
)
resp.raise_for_status()
doc = resp.json()["aidocument"]
yield Document(
page_content=doc["content"]["markdown"],
metadata={
"title": doc["identity"].get("title", ""),
"source": doc["source"]["url"],
"fetched_at": doc["source"].get("fetched_at", ""),
"tokens": doc["economics"]["output_tokens_approx"],
},
)
def load(self) -> list[Document]:
return list(self.lazy_load())
```
Choices worth naming.
**`lazy_load` is the whole interface.** LangChain's loader base classes have moved around between versions, but the stable core is a method that yields `Document` objects one at a time. If your version wants a `BaseLoader` subclass, add the base class and keep the body. `from langchain_core.documents import Document` is the import we would reach for first; if your project pins something older, that one line is the thing to adjust.
**The body is already Markdown.** `content.markdown` is the cleaned page: headings, lists, tables, and code blocks survive, while navigation, scripts, and cookie chrome do not, and JavaScript-rendered pages arrive rendered. There is nothing left to parse. The full response shape is documented at [/docs/aidocument](/docs/aidocument).
**Metadata carries provenance and cost.** `title` and `source` give the chain something to cite. `fetched_at` says how old the snapshot is. `tokens` is the API's own `output_tokens_approx` for the body, so you can budget a prompt before you ever call a model.
**Failures are loud and free.** `raise_for_status()` surfaces them immediately, and failed fetches (4xx/5xx) cost no credits. The errors are structured, too: a page behind a login returns HTTP 422 with `{"error": "upstream_unauthorized", ...}` telling you the host answered 401. Lyrenth fetches as an anonymous client and never signs in to accounts, so a login-walled URL is a hard, diagnosable no rather than a silently garbled page in your vector store.
## Three URLs into a chain
```python
import os
loader = LyrenthLoader(
urls=[
"https://docs.stripe.com/api",
"https://vercel.com/docs/functions",
"https://developers.cloudflare.com/workers/",
],
api_key=os.environ["LYRENTH_API_KEY"],
)
docs = loader.load()
for d in docs:
print(f'{d.metadata["title"]}: {d.metadata["tokens"]} tokens')
```
From here it is ordinary LangChain. One caveat: splitter and chain import paths vary across versions more than `Document` does, so treat the wiring below as shape, not gospel.
```python
from langchain_text_splitters import RecursiveCharacterTextSplitter
splitter = RecursiveCharacterTextSplitter(chunk_size=2000, chunk_overlap=200)
chunks = splitter.split_documents(docs)
```
Splitting Markdown instead of raw HTML has a quiet benefit: chunk boundaries land between paragraphs and headings, not in the middle of a `
` is roughly a kilobyte of that, most of which is script. There is a `` and it is empty. The page is politely telling you the truth in that `
` line: without JavaScript, there is no app here. Your scraper is JavaScript-disabled by definition, because a raw HTTP fetch does not run scripts. So your extractor, your readability library, your regex over the DOM, whatever came next, has nothing to work with.
Now read the same URL through the Lyrenth reader, which renders the page the way a browser would before extracting. Here is the genuine response header and the top of the body:
```
# Excalidraw — Collaborative whiteboarding made easy
> Excalidraw is a virtual collaborative whiteboard tool that lets you
> easily sketch diagrams that have a hand-drawn feel to them.
Source: https://excalidraw.com
status 200 · render rendered · 46 words · ~76 tokens · 99% smaller than raw HTML
```
The title and description are populated. The `render` field says `rendered`, meaning the page was executed in a headless browser before the content was pulled, not fetched flat. You get an AIDocument, one clean shape with a Markdown body and structure, instead of a hollow div. (Method: both outputs captured live in July 2026. The raw HTML is the actual `curl` response for `https://excalidraw.com`; the rendered line is the economics header the Lyrenth reader returned for the same URL.)
The whiteboard is a deliberately extreme case, almost the entire page is client-rendered, so the contrast is stark. But the same mechanism sits under a huge amount of ordinary content: docs sites, dashboards, marketing pages, product catalogs. When the body arrives empty, this is why.
## Why the page needs JavaScript at all
To fix the failure you have to understand it, and there is not one cause. There are several, and they stack.
**Client-side rendering.** In the classic server-rendered model, the server assembles the full HTML and sends it down complete. In the client-side model, the server sends a near-empty shell plus a JavaScript bundle, and the browser builds the DOM after the bundle loads and runs. That is the `
` you saw. The content exists, but it is assembled on the client, from data the bundle fetches after it boots. A flat HTTP fetch stops before any of that happens.
**Hydration and lazy data.** Even pages that do send some server-rendered markup often fill the important parts in afterward. The shell paints, the app "hydrates," it makes one or more API calls for the actual data, then it renders that data into the DOM. If you read the HTML the moment it arrives, you catch the page mid-boot: skeletons, spinners, and placeholder boxes where the content will be. Reading too early looks like success, because you get a 200 and some HTML. It is just the wrong HTML.
**Shadow DOM and web components.** Some sites build their UI out of custom elements that keep their content inside a shadow root. When you serialize that page to HTML the normal way, the shadow trees do not come along, so the markup you capture is structurally present but textually hollow. The tags are there; the words are not. A naive extractor sees valid HTML with almost no readable text and gives up or, worse, returns confident nonsense.
**Consent managers and overlays.** Even when the content does render, something is often sitting on top of it. A cookie or consent banner injects itself late, frequently from a third-party script, and it can cover the page or hold rendering behind an interaction. Extract at that moment and your "article" is a privacy notice and two buttons. Consent overlays are close to universal on commercial sites now, and they are engineered to be hard to ignore, which is exactly what makes them hard to strip programmatically.
Any one of these turns a simple fetch into an empty or wrong page. In the wild they combine: a client-rendered site, with a consent overlay, that lazy-loads its main content after hydration, that also uses a few web components. That is a completely normal page in 2026.
## What real rendering takes
The fix, conceptually, is easy to state: run the page in a real browser, wait until it is actually done, clean up what the browser leaves, then extract. Each of those clauses hides a genuine engineering problem, and we run all of them at index scale, so here is the honest version of what it costs.
**You need a headless browser, not a fetcher.** To get the content a browser produces, you have to be a browser: load the shell, run the bundle, execute the fetches the app makes, let it paint. That means driving a real rendering engine, not sending an HTTP request. A headless browser is heavy. It uses far more CPU and memory than a fetch, it can crash or hang, and running a fleet of them reliably is a standing operational commitment. This is the single biggest reason "just scrape it" is harder than it looks: the moment you need JavaScript, your per-page cost jumps by a large multiple, and you own a browser-farm reliability problem you did not have before.
**You have to decide when a page even needs it.** Rendering everything is wasteful, because plenty of pages are still server-rendered and a plain fetch is complete and cheap. So the first real decision is per-page: does this URL need a browser, or is the flat HTML already the whole story? Render too eagerly and you burn browser time on pages that never needed it; render too rarely and you ship hollow pages. The signal is not always obvious from the first bytes, so this is a category of problem, not a one-line heuristic.
**Settle timing is the hard part.** Once you commit to rendering, you have to decide when the page is done. Fire the extract too early and you capture spinners and skeletons. Wait a fixed long time on every page and you have throttled your whole system to the speed of the slowest page, which at scale is ruinous. The right behavior is adaptive: watch for the signals that the DOM has stopped changing and the content-bearing elements have appeared, and settle as soon as they have, not on a fixed timer. Different sites reach "done" through different paths, so a settle policy that works on one class of page will read another too early. This looks trivial in a demo of one URL and becomes the whole game across many.
**You have to strip what the browser leaves behind.** A rendered page includes everything the browser drew, and that is more than the content. The consent overlay is now in the DOM, along with the nav, the footer, the newsletter modal, and the sticky share bar. Rendering got you the content; it also got you every piece of chrome around it. So after the render you still have to strip overlays and boilerplate to recover the actual document, and it is adversarial work, because consent tools and modals are designed to be sticky. Web components add another layer: you have to flatten shadow trees so their text is actually present in what you extract, or you are back to hollow markup even after a successful render.
None of these is exotic on its own. The cost is doing all of them, correctly, on every page, at volume, and keeping the browser fleet healthy while you do. That is the difference between a script that reads one page and infrastructure that reads the web.
## How Lyrenth handles it so you do not have to
The point of the AIDocument is that all of the above happens on our side, once, and you receive the result. When you read a URL through Lyrenth, the reader decides whether the page needs a browser, renders it when it does, waits for the content to settle rather than on a fixed timer, strips the consent overlays and boilerplate, flattens shadow trees so web-component content is real text, and hands back a clean Markdown body with structure. That is what the `render: rendered` field in the Excalidraw response meant: this page needed a browser, we ran one, and here is the content a flat fetch could never have given you.
You do not maintain a browser farm, tune settle timers per site, or chase the newest consent-banner script. You send a URL and get an AIDocument back, the same clean shape whether the source was static HTML or a fully client-rendered app. And because reads resolve through a shared index, the render is amortized: the expensive part happens once for a URL, and subsequent reads come back from the cache rather than paying for another headless render.
For the full picture of the shape you get back, the fields and the stable contract, see [what an AIDocument is](/blog/what-is-an-aidocument). And if the reason you are reading pages is to feed them to a model, the token side of this, why raw HTML wrecks a context window and how the clean shape fixes it, is covered in [how to feed web pages to an LLM without blowing the context window](/blog/feed-web-pages-to-llm-without-blowing-context).
## The takeaway
An empty `` is not a failure of your scraper. It is a modern web page telling you it is built to be run, not fetched. Getting real content out of it means being a browser, deciding when to be one, knowing when the page is done, and cleaning up everything the browser drags in with the content. That is a real infrastructure project, and not the one you set out to build.
The whole idea of the AIDocument is that you get to skip it. Point the reader at a JavaScript-heavy URL and see the `rendered` marker come back with real content behind it. The free tier is 2,000 AIDocuments a month, no card, so you can test it against the exact SPA that has been handing your scraper a hollow div.
## Links
- Documentation: https://www.lyrenth.com/docs
- Pricing: https://www.lyrenth.com/pricing
- Bot info: https://www.lyrenth.com/bot
- Agent manifest (JSON): https://www.lyrenth.com/api/agent-manifest
- AIDocument JSON Schema (draft-07): https://api.lyrenth.com/aidocument.schema.json
- Sign up: https://www.lyrenth.com/signup
- Sitemap: https://www.lyrenth.com/sitemap.xml
- Robots: https://www.lyrenth.com/robots.txt