# AgentReader > Reads web pages and PDFs that an agent's built-in fetch can't handle, and returns the actual content as clean, compact Markdown or JSON. Plain fetch often returns an empty JavaScript shell, a cookie/consent page, raw PDF bytes, or HTML where menus, ads and scripts burn thousands of tokens. AgentReader renders JavaScript when needed, gets past consent walls, extracts PDFs and strips boilerplate. Sites that block bots fail fast with a clear error and are not charged. 5 free reads/day with no signup, then $0.005 per call in USDC on Base via x402 (no account) or prepaid credits. REST API + MCP server; web search and field extraction included. ## When to use - Your normal fetch returned an empty page, a cookie/consent wall, raw PDF bytes, or HTML too bloated to fit your context - You need the text of a web page, docs page, news article or PDF without navigation, ads and scripts - A plain HTTP fetch returns an empty JavaScript shell (SPA): render=always - You want structured fields (title, author, date, links, tables) instead of raw HTML: format=json ## Read a URL - GET https://agentreader.xyz/v1/read?url= -> text/markdown - GET https://agentreader.xyz/v1/read?url=&format=json -> {url,title,author,date,siteName,description,lang,contentType,markdown,wordCount,links[],tables[{caption,headers,rows}],meta} (meta.warning is set when very little text could be extracted) - format=markdown|json (default markdown): markdown returns the content as Markdown only. json wraps the same Markdown with title, author, date, word count, links, tables and metadata (meta.warning flags results that may be incomplete); there is no separate plain-text copy. - mode=auto|article|links|full (default auto): article: main content only. links: list of headlines with links. full: the whole page, including non-article parts. auto picks article or links based on the page. RSS/Atom feeds always return their items. - render=auto|never|always (default auto): Whether to load the page in headless Chromium. auto does so only when plain fetching returns too little. - extract= (default (none)): Returns named fields (title, author, date, price, currency, image, brand, sku, rating, availability, summary…) from JSON-LD, OpenGraph, microdata and meta tags. No LLM. Missing fields are null. In JSON as `fields`, in Markdown as front matter. - nocache=1 (default off): Skips the 10-minute result cache and reads the page again. - StackOverflow/StackExchange, npm and PyPI URLs are read through their official APIs (meta.source names the API). - Page types: articles -> clean article text; news homepages/index pages -> "## Headlines" list of [title](link) plus main text (mode=links for links only); RSS/Atom feeds -> items (title, link, date, summary); mode=full -> whole page. JSON adds pageType and items[]. Cookie/consent walls are accepted automatically. POST with a JSON body also works. - Auth (optional, for prepaid credits): Authorization: Bearer ar_... or x-api-key: ar_... ## Extract fields - Add extract=title,author,date,price,currency,summary,image,brand,sku,rating,availability (or any field name, or a JSON schema like {"properties":{"price":{"type":"number"}}}) - Values come from JSON-LD, OpenGraph, microdata and meta tags, plus text heuristics (price). Returned as "fields" in JSON, or as front matter at the top of the Markdown. Missing fields are null. ## Search the web - GET https://agentreader.xyz/v1/search?q=&limit=10[&lang=en][&format=json|markdown] -> {query, backend, results:[{title,url,snippet}]} - MCP tool: search(query, limit?, lang?). Priced like one read. Then read the best results with read_url. ## Input tips - url accepts aliases u= and link=, a missing scheme (https assumed), and path style: https://agentreader.xyz/v1/read/https://example.com - 400 responses explain the expected parameters, with examples. ## MCP - Streamable HTTP: https://agentreader.xyz/mcp - Tools: read_url(url, format?, mode?, render?, extract?), search(query, limit?, lang?), get_balance() - Server card: https://agentreader.xyz/.well-known/mcp/server-card.json ## Pricing - Free: 5 calls/day per IP, no key needed - Credit bundle: 500 calls for $1 USDC ($0.0020/call), no expiry - Credit bundle: 5000 calls for $8 USDC ($0.0016/call), no expiry - Card pack: 7000 calls for $10 by credit/debit card at https://agentreader.xyz/buy?pack=7000 (a human opens the page; the card provider handles verification) - Pay per call: $0.005 USDC via x402. Use the always-paid endpoint https://agentreader.xyz/v1/x402/read?url=, or /v1/read once the free calls run out - API keys only hold prepaid credits; one is issued automatically when you buy a bundle without a key. - Order: free daily calls (only without a key), then credits, then per-call x402. ## Legal - Terms: https://agentreader.xyz/terms (Markdown: https://agentreader.xyz/terms.md). Privacy: https://agentreader.xyz/privacy (Markdown: https://agentreader.xyz/privacy.md). Only the hostname of each read is logged; IPs are stored as salted hashes; logs are kept 30 days. ## Buying credits (x402) 1. GET https://agentreader.xyz/v1/credits/bundles lists bundles; POST https://agentreader.xyz/v1/credits/buy?bundle=500 (send your key, or none to receive a new key) 2. The server answers HTTP 402 with an x402 v2 challenge (PAYMENT-REQUIRED header + JSON body; scheme "exact", USDC, network eip155:8453). Pay with any x402 v2 client (@x402/fetch, @x402/axios, python x402) and retry with the PAYMENT-SIGNATURE header. v1 clients: send "X402-Version: 1" for a v1 challenge and pay with X-PAYMENT. 3. Card instead of crypto: send a human to https://agentreader.xyz/buy#key= (or POST https://agentreader.xyz/v1/card/orders?pack= and poll GET https://agentreader.xyz/v1/card/orders/). Credits land on the key once the payment confirms on Base. 4. GET https://agentreader.xyz/v1/balance shows free calls and credits. ## Machine-readable - OpenAPI: https://agentreader.xyz/openapi.json - x402 resources: https://agentreader.xyz/.well-known/x402 - MCP registry entry: https://agentreader.xyz/server.json - Health: https://agentreader.xyz/health ## Contact - contact@agentreader.xyz