{"openapi":"3.1.0","info":{"title":"x402 Web Tools","version":"1.0.0","description":"Web tools for agents, paid per call in USDC on Base: read a page as clean Markdown, watch a page for changes, page metadata, links, RSS and Atom feeds, sitemaps, PDF text, HTTP and TLS checks, DNS records and QR codes. Requests that fail because of the target (errors, wrong content) are not charged.","x-guidance":"Every endpoint is a GET with query parameters. Use /v1/read to read a page, /v1/watch to see what changed since your last check, /v1/pdf-text for PDFs. A 422 answer means the target could not be read; no payment is settled for it."},"servers":[{"url":"https://web.kagurazaka.dev"}],"paths":{"/v1/read":{"get":{"operationId":"getRead","summary":"Read a web page as clean Markdown","description":"Fetch a public web page and return its main content as clean Markdown (Mozilla Readability, as in Firefox Reader View, then Markdown with absolute links and tables), with title, byline, site name, published date, language, excerpt and a token estimate. Navigation, ads and footers are left out. Pages that cannot be read (errors, not HTML) are not charged.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{},"title":{},"lang":{},"markdown":{},"chars":{},"tokens_estimate":{},"truncated":{}}},"example":{"url":"https://en.wikipedia.org/wiki/HTTP_402","title":"List of HTTP status codes","lang":"en","markdown":"This article lists standard and notable non-standard [HTTP response status codes](https://en.wikipedia.org/wiki/HTTP#response-status-code)...","chars":50000,"tokens_estimate":12500,"truncated":true}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the page"}},{"name":"max_chars","in":"query","required":false,"schema":{"type":"integer","description":"cut the Markdown at this many characters (1000-200000, default 50000)"}}]}},"/v1/watch":{"get":{"operationId":"getWatch","summary":"Detect changes on a web page since your last check","description":"Check a web page for changes: each call compares the page's readable text with your previous check of the same URL (kept per paying wallet for 90 days) and returns whether it changed, when you last checked, and the added and removed lines. The first call records the page. Use name to keep several watches of one URL apart.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{},"first_check":{},"changed":{},"checked_at":{},"previous_checked_at":{},"diff":{}}},"example":{"url":"https://www.x402.org/","first_check":false,"changed":true,"checked_at":"2026-10-25T09:00:00Z","previous_checked_at":"2026-10-24T09:00:00Z","diff":{"added_lines":2,"removed_lines":1,"changes":[{"type":"added","text":"## 75.41M"}]}}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the page"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","description":"optional name to keep separate watches of the same URL (up to 64 characters)"}}]}},"/v1/metadata":{"get":{"operationId":"getMetadata","summary":"Metadata of a web page","description":"Title, description, canonical URL, language, author, published and modified dates, favicon, RSS and Atom feeds, Open Graph and Twitter card tags, JSON-LD structured data and the h1/h2 outline of a public web page.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"title":{},"description":{},"canonical":{},"lang":{},"open_graph":{},"json_ld":{},"feeds":{}}},"example":{"title":"x402","description":"x402 is the internet's payment standard.","canonical":"https://x402.org/","lang":"en-US","open_graph":{"title":"x402","image":"https://x402.org/og.png"},"json_ld":[],"feeds":[]}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the page"}}]}},"/v1/links":{"get":{"operationId":"getLinks","summary":"Links on a web page","description":"Every distinct link on a public web page as absolute URLs with their anchor text, marked internal or external and nofollow, up to 500.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"unique":{},"internal":{},"external":{},"links":{}}},"example":{"unique":19,"internal":2,"external":17,"links":[{"url":"https://github.com/x402-foundation/x402","text":"GitHub","internal":false,"nofollow":false}]}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the page"}},{"name":"only","in":"query","required":false,"schema":{"type":"string","enum":["all","internal","external"],"description":"which links to return (default all)"}}]}},"/v1/feed":{"get":{"operationId":"getFeed","summary":"Read an RSS or Atom feed as JSON","description":"The items of an RSS, Atom or RDF feed as JSON (title, link, id, published date, author, plain-text summary). Given a web page instead of a feed, it finds the feed the page links to.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"format":{},"title":{},"total_items":{},"items":{}}},"example":{"format":"rss","title":"The Cloudflare Blog","total_items":20,"items":[{"title":"...","link":"https://blog.cloudflare.com/...","published":"2026-10-24T13:00:00.000Z","summary":"..."}]}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the feed, or of a page that links to one"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"how many items (1-100, default 20)"}}]}},"/v1/sitemap":{"get":{"operationId":"getSitemap","summary":"URLs in a site's sitemap","description":"The URLs a sitemap lists, with last modified dates, or the sitemaps a sitemap index lists. Given a site instead of a sitemap, it finds the sitemap from robots.txt or /sitemap.xml. Gzipped sitemaps are read too.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{},"kind":{},"total":{},"truncated":{},"urls":{}}},"example":{"url":"https://www.cloudflare.com/sitemap.xml","kind":"urlset","total":1200,"truncated":true,"urls":[{"url":"https://www.cloudflare.com/learning/","lastmod":"2026-10-01T00:00:00.000Z"}]}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of a sitemap, or of the site"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"how many URLs (1-1000, default 200)"}}]}},"/v1/pdf-text":{"get":{"operationId":"getPdfText","summary":"Text of a PDF","description":"Extract the text of a PDF at a public URL, page by page, with its title, author and page count. Up to 10 MB; scanned PDFs without a text layer return little text.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pages_total":{},"pages_returned":{},"title":{},"chars":{},"pages":{}}},"example":{"pages_total":1,"pages_returned":1,"title":null,"chars":14,"pages":[{"page":1,"text":"Dummy PDF file"}]}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the PDF"}},{"name":"max_pages","in":"query","required":false,"schema":{"type":"integer","description":"pages to return (1-200, default 50)"}},{"name":"max_chars","in":"query","required":false,"schema":{"type":"integer","description":"characters to return in all (1000-500000, default 100000)"}}]}},"/v1/http-check":{"get":{"operationId":"getHttpCheck","summary":"Check a URL: status, redirects, headers and TLS certificate","description":"Request an https URL and report whether it is reachable, its status, every redirect hop with timings, key and security headers (HSTS, CSP and others), and the TLS certificate with its issuer, the names it covers and the days until it expires. An unreachable URL is a result too, with the reason.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"reachable":{},"final_url":{},"status":{},"redirects":{},"total_ms":{},"tls":{}}},"example":{"reachable":true,"final_url":"https://www.x402.org/","status":200,"redirects":1,"total_ms":180,"tls":{"issuer":"Let's Encrypt, E7","valid_to":"2026-12-20T00:00:00.000Z","days_left":56,"expires_soon":false}}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"https URL of the page"}}]}},"/v1/dns":{"get":{"operationId":"getDns","summary":"DNS records of a domain","description":"A, AAAA, CNAME, MX, TXT, NS, CAA and SOA records of a domain from public resolvers (Cloudflare and Google), or just the types you ask for, and whether the domain exists.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{},"exists":{},"records":{}}},"example":{"name":"x402.org","exists":true,"records":{"A":["104.21.0.1"],"MX":[{"exchange":"mx.example","priority":10}],"TXT":["v=spf1 -all"]}}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"domain name, such as example.com"}},{"name":"types","in":"query","required":false,"schema":{"type":"string","description":"comma separated record types (default all of A, AAAA, CNAME, MX, TXT, NS, CAA, SOA)"}}]}},"/v1/qr":{"get":{"operationId":"getQr","summary":"Make a QR code","description":"Encode text or a URL as a QR code: PNG (base64 and a data URL) or SVG, with the size and error correction level you choose.","tags":["Web"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"format":{},"size":{},"bytes":{},"png_base64":{},"data_url":{}}},"example":{"format":"png","size":300,"bytes":1200,"png_base64":"iVBORw0KGgo...","data_url":"data:image/png;base64,iVBORw0KGgo..."}}}},"400":{"description":"The query is invalid. No payment is settled."},"402":{"description":"Payment Required"},"422":{"description":"The target could not be read. No payment is settled."},"502":{"description":"The tool failed. No payment is settled."}},"parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","description":"what to encode (up to 2000 characters)"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","description":"width in pixels (64-1024, default 300)"}},{"name":"level","in":"query","required":false,"schema":{"type":"string","enum":["L","M","Q","H"],"description":"error correction level (default M)"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["png","svg"],"description":"image format (default png)"}}]}}}}