{"openapi":"3.1.0","info":{"title":"AgentReader","version":"0.3.0","description":"Web reader for AI agents: fetch any URL and get clean, LLM-ready Markdown or structured JSON. Reads web pages, scrapes JavaScript-rendered sites (headless Chromium), converts PDF to Markdown, extracts the main article (title, author, date, text, links, tables) without ads or navigation. REST API + remote MCP server. 5 free calls/day, no signup; then prepaid credits or $0.005/call in USDC via x402.","contact":{"email":"contact@agentreader.xyz"},"x-guidance":"To read a URL and pay per call: GET https://agentreader.xyz/v1/x402/read?url=<http(s) URL>&format=json|markdown. Without a payment header the server returns HTTP 402 with an x402 v2 challenge (PAYMENT-REQUIRED header, $0.005 USDC on eip155:8453); sign it and retry with PAYMENT-SIGNATURE. For many calls, buy prepaid credits with POST https://agentreader.xyz/v1/credits/buy?bundle=500 ($1, x402); the response returns an API key, then call GET https://agentreader.xyz/v1/read?url=... with Authorization: Bearer <key>. JSON output: title, author, date, markdown, text, links, tables. Works for HTML, JS-rendered pages and PDFs."},"servers":[{"url":"https://agentreader.xyz"}],"components":{"securitySchemes":{"bearerApiKey":{"type":"http","scheme":"bearer","description":"Optional API key holding prepaid credits (ar_...)"}}},"paths":{"/v1/x402/read":{"get":{"operationId":"readUrlPaid","description":"Read a web page or PDF: fetch a URL and return clean Markdown (default) or structured JSON. Use it to browse, scrape or extract the main content/article of any webpage, render JavaScript-heavy pages (SPA) with a headless browser, convert PDF to text/Markdown, and get title, author, publish date, links and tables. Strips ads, menus and boilerplate.","tags":["read"],"summary":"Read a URL (always paid: $0.005 USDC via x402)","security":[],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"network":"eip155:8453","asset":"USDC"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"description":"http(s) URL of an HTML page or PDF"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["markdown","json"]},"description":""},{"name":"render","in":"query","required":false,"schema":{"type":"string","enum":["auto","never","always"]},"description":""}],"responses":{"200":{"description":"Markdown (text/markdown) or JSON","content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","description":"format=markdown returns text/markdown; format=json returns this object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"date":{"type":["string","null"]},"siteName":{"type":["string","null"]},"description":{"type":["string","null"]},"contentType":{"type":"string","enum":["html","pdf"]},"markdown":{"type":"string"},"text":{"type":"string"},"wordCount":{"type":"number"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"tables":{"type":"array","items":{"type":"object","properties":{"caption":{"type":"string"},"headers":{"type":"array"},"rows":{"type":"array"}}}}}}}}},"402":{"description":"x402 payment required (USDC)","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"number"},"accepts":{"type":"array"}}}}}}}},"post":{"operationId":"readUrlPaidPost","description":"Read a web page or PDF: fetch a URL and return clean Markdown (default) or structured JSON. Use it to browse, scrape or extract the main content/article of any webpage, render JavaScript-heavy pages (SPA) with a headless browser, convert PDF to text/Markdown, and get title, author, publish date, links and tables. Strips ads, menus and boilerplate.","tags":["read"],"summary":"Read a URL (always paid, JSON body)","security":[],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"network":"eip155:8453","asset":"USDC"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"format":{"type":"string","enum":["markdown","json"]},"render":{"type":"string","enum":["auto","never","always"]}}}}}},"responses":{"200":{"description":"Markdown (text/markdown) or JSON","content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","description":"format=markdown returns text/markdown; format=json returns this object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"date":{"type":["string","null"]},"siteName":{"type":["string","null"]},"description":{"type":["string","null"]},"contentType":{"type":"string","enum":["html","pdf"]},"markdown":{"type":"string"},"text":{"type":"string"},"wordCount":{"type":"number"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"tables":{"type":"array","items":{"type":"object","properties":{"caption":{"type":"string"},"headers":{"type":"array"},"rows":{"type":"array"}}}}}}}}},"402":{"description":"x402 payment required (USDC)","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"number"},"accepts":{"type":"array"}}}}}}}}},"/v1/credits/buy":{"post":{"operationId":"buyCredits","summary":"Buy a prepaid credit bundle via x402 (default bundle 500)","security":[],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","min":"1","max":"8"},"network":"eip155:8453","asset":"USDC","note":"bundle=500: $1, bundle=5000: $8"},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"bundle":{"type":"integer","enum":[500,5000]}}}}}},"parameters":[{"name":"bundle","in":"query","required":false,"schema":{"type":"integer","enum":[500,5000],"default":500},"description":""}],"responses":{"200":{"description":"Credits added; returns apiKey if none was sent"},"402":{"description":"x402 payment required (USDC)","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"number"},"accepts":{"type":"array"}}}}}}}}},"/v1/read":{"get":{"operationId":"readUrl","description":"Read a web page or PDF: fetch a URL and return clean Markdown (default) or structured JSON. Use it to browse, scrape or extract the main content/article of any webpage, render JavaScript-heavy pages (SPA) with a headless browser, convert PDF to text/Markdown, and get title, author, publish date, links and tables. Strips ads, menus and boilerplate.","tags":["read"],"summary":"Read a URL (5 free calls/day without a key; with a key uses prepaid credits)","security":[],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"description":"http(s) URL of an HTML page or PDF"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["markdown","json"]},"description":""},{"name":"render","in":"query","required":false,"schema":{"type":"string","enum":["auto","never","always"]},"description":""},{"name":"nocache","in":"query","required":false,"schema":{"type":"string","enum":["1"]},"description":""}],"responses":{"200":{"description":"Markdown (text/markdown) or JSON","content":{"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","description":"format=markdown returns text/markdown; format=json returns this object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"date":{"type":["string","null"]},"siteName":{"type":["string","null"]},"description":{"type":["string","null"]},"contentType":{"type":"string","enum":["html","pdf"]},"markdown":{"type":"string"},"text":{"type":"string"},"wordCount":{"type":"number"},"links":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"href":{"type":"string"}}}},"tables":{"type":"array","items":{"type":"object","properties":{"caption":{"type":"string"},"headers":{"type":"array"},"rows":{"type":"array"}}}}}}}}},"402":{"description":"Free quota/credits exhausted; x402 payment accepted"}}}},"/v1/keys":{"post":{"operationId":"createKey","summary":"Issue an empty API key (holds prepaid credits; no free calls)","security":[],"responses":{"201":{"description":"{ apiKey }"}}}},"/v1/balance":{"get":{"operationId":"getBalance","summary":"Prepaid credits for an API key","security":[],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer ar_..."}],"responses":{"200":{"description":"Balance"}}}},"/v1/credits/bundles":{"get":{"operationId":"listBundles","summary":"Credit bundles","security":[],"responses":{"200":{"description":"Bundles"}}}}}}