{"openapi":"3.1.0","info":{"title":"switch402","version":"0.3.0","description":"Pay-per-call web scraping for agents: send a URL, get clean markdown; plus site map, page metadata, screenshots, web search and PDF to text. No signup needed: pay per call with x402 (USDC on Base), or use an optional prepaid credits key. Routes to a healthy provider with automatic failover; charged only on a successful page. If no third-party provider is available, a request may fall back to a service we operate; the result says so (own_service: true).","x-guidance":"POST /v1/scrape {\"url\": \"<page>\"} ($0.008) or /v1/scrape/lite ($0.003). Free quote: GET /v1/quote?url=<page>. Site tools: /v1/map (same-site links + sitemap URLs) and /v1/metadata (title, description, OpenGraph/Twitter, canonical, JSON-LD), map and metadata $0.001 each. Screenshot: POST {\"url\": \"<page>\"} to /v1/screenshot ($0.008, viewport) or /v1/screenshot/full ($0.012, whole page); returns a base64 PNG (max 8 MB). Search: POST {\"q\": \"<query>\", \"limit\": 10} to /v1/search ($0.008; query up to 400 characters, up to 10 results). PDF to text: POST {\"url\": \"<pdf>\", \"pages\": [1, 2]} to /v1/pdf ($0.008; up to 10 MB with a declared size and 50 pages, text-based PDFs; scanned or password-protected PDFs return an error and are not charged). Optional prepaid API keys: Buy: POST https://api.switch402.com/v1/credits/buy/{5|20|50|monthly} (x402; the key is shown once). Balance: GET https://api.switch402.com/v1/credits (Bearer key). Recover: POST https://api.switch402.com/v1/credits/recover/nonce {\"key_id\"} -> sign \"switch402 recover <key_id> <nonce>\" with the buying wallet -> POST https://api.switch402.com/v1/credits/recover {\"key_id\",\"nonce\",\"signature\"}."},"servers":[{"url":"https://api.switch402.com"}],"paths":{"/v1/scrape":{"get":{"operationId":"scrape","summary":"Page to clean markdown ($0.008, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"}],"responses":{"200":{"description":"Page as markdown (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"own_service":{"type":"boolean"},"ms":{"type":"number"},"attempts":{"type":"integer"},"tier":{"type":"string"}},"required":["url","markdown","own_service"]},"example":{"url":"https://example.com/","title":"Example Domain","markdown":"# Example Domain\n\nThis domain is for use in documentation examples without needing permission.","own_service":false,"ms":1800,"attempts":1}}}},"400":{"description":"Invalid URL on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned content (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"scrape_post","summary":"Same as GET, POST {\"url\": \"...\"}","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) page to convert to markdown"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Page as markdown (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"own_service":{"type":"boolean"},"ms":{"type":"number"},"attempts":{"type":"integer"},"tier":{"type":"string"}},"required":["url","markdown","own_service"]},"example":{"url":"https://example.com/","title":"Example Domain","markdown":"# Example Domain\n\nThis domain is for use in documentation examples without needing permission.","own_service":false,"ms":1800,"attempts":1}}}},"400":{"description":"Invalid URL on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned content (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/scrape/lite":{"get":{"operationId":"scrape_lite","summary":"/v1/scrape/lite: $0.003 per page. Page to clean markdown ($0.003, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"3000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"}],"responses":{"200":{"description":"Page as markdown (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"own_service":{"type":"boolean"},"ms":{"type":"number"},"attempts":{"type":"integer"},"tier":{"type":"string"}},"required":["url","markdown","own_service"]},"example":{"url":"https://example.com/","title":"Example Domain","markdown":"# Example Domain\n\nThis domain is for use in documentation examples without needing permission.","own_service":false,"ms":1800,"attempts":1}}}},"400":{"description":"Invalid URL on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned content (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"scrape_lite_post","summary":"/v1/scrape/lite: $0.003 per page. Same as GET, POST {\"url\": \"...\"}","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"3000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) page to convert to markdown"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Page as markdown (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"own_service":{"type":"boolean"},"ms":{"type":"number"},"attempts":{"type":"integer"},"tier":{"type":"string"}},"required":["url","markdown","own_service"]},"example":{"url":"https://example.com/","title":"Example Domain","markdown":"# Example Domain\n\nThis domain is for use in documentation examples without needing permission.","own_service":false,"ms":1800,"attempts":1}}}},"400":{"description":"Invalid URL on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned content (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/map":{"get":{"operationId":"map","summary":"Site map: same-site links on the page plus sitemap URLs (robots.txt Sitemap lines or /sitemap.xml), deduped ($0.001, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000},"description":"Max URLs (default 200)"}],"responses":{"200":{"description":"Site map: same-site links on the page plus sitemap URLs (robots.txt Sitemap lines or /sitemap.xml), deduped (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":["string","null"]},"page_status":{"type":["integer","null"]},"count":{"type":"integer"},"truncated":{"type":"boolean"},"limit":{"type":"integer"},"urls":{"type":"array","items":{"type":"string"}},"sources":{"type":"object"},"ms":{"type":"number"}},"required":["url","count","urls"]},"example":{"url":"https://example.com/","final_url":"https://example.com/","page_status":200,"count":2,"truncated":false,"limit":200,"urls":["https://example.com/about","https://example.com/blog/"],"sources":{"page_links":1,"sitemap_urls":1,"sitemaps":["https://example.com/sitemap.xml"]},"ms":420}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"422":{"description":"Nothing usable (not an HTML page, or no URLs found); not charged"},"502":{"description":"The page could not be fetched (timeout, error status, too many redirects); not charged"},"503":{"description":"Paused (not charged)"}}},"post":{"operationId":"map_post","summary":"Same as GET, POST {\"url\": \"...\"}","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) page or site root"},"limit":{"type":"integer","minimum":1,"maximum":1000,"description":"Max URLs returned (default 200)"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Site map: same-site links on the page plus sitemap URLs (robots.txt Sitemap lines or /sitemap.xml), deduped (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":["string","null"]},"page_status":{"type":["integer","null"]},"count":{"type":"integer"},"truncated":{"type":"boolean"},"limit":{"type":"integer"},"urls":{"type":"array","items":{"type":"string"}},"sources":{"type":"object"},"ms":{"type":"number"}},"required":["url","count","urls"]},"example":{"url":"https://example.com/","final_url":"https://example.com/","page_status":200,"count":2,"truncated":false,"limit":200,"urls":["https://example.com/about","https://example.com/blog/"],"sources":{"page_links":1,"sitemap_urls":1,"sitemaps":["https://example.com/sitemap.xml"]},"ms":420}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"422":{"description":"Nothing usable (not an HTML page, or no URLs found); not charged"},"502":{"description":"The page could not be fetched (timeout, error status, too many redirects); not charged"},"503":{"description":"Paused (not charged)"}}}},"/v1/metadata":{"get":{"operationId":"metadata","summary":"Page metadata: title, meta description, canonical, lang, OpenGraph and Twitter tags, JSON-LD blocks ($0.001, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"}],"responses":{"200":{"description":"Page metadata: title, meta description, canonical, lang, OpenGraph and Twitter tags, JSON-LD blocks (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"canonical":{"type":["string","null"]},"lang":{"type":["string","null"]},"og":{"type":"object"},"twitter":{"type":"object"},"json_ld":{"type":"array"},"json_ld_invalid":{"type":"integer"},"truncated":{"type":"boolean"},"ms":{"type":"number"}},"required":["url","final_url","og","twitter","json_ld"]},"example":{"url":"https://example.com/","final_url":"https://example.com/","title":"Example Domain","description":"An example page.","canonical":"https://example.com/","lang":"en","og":{"title":"Example Domain","type":"website"},"twitter":{"card":"summary"},"json_ld":[{"@context":"https://schema.org","@type":"WebSite","name":"Example"}],"json_ld_invalid":0,"truncated":false,"ms":310}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"422":{"description":"Nothing usable (not an HTML page, or no URLs found); not charged"},"502":{"description":"The page could not be fetched (timeout, error status, too many redirects); not charged"},"503":{"description":"Paused (not charged)"}}},"post":{"operationId":"metadata_post","summary":"Same as GET, POST {\"url\": \"...\"}","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) HTML page"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Page metadata: title, meta description, canonical, lang, OpenGraph and Twitter tags, JSON-LD blocks (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"final_url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"canonical":{"type":["string","null"]},"lang":{"type":["string","null"]},"og":{"type":"object"},"twitter":{"type":"object"},"json_ld":{"type":"array"},"json_ld_invalid":{"type":"integer"},"truncated":{"type":"boolean"},"ms":{"type":"number"}},"required":["url","final_url","og","twitter","json_ld"]},"example":{"url":"https://example.com/","final_url":"https://example.com/","title":"Example Domain","description":"An example page.","canonical":"https://example.com/","lang":"en","og":{"title":"Example Domain","type":"website"},"twitter":{"card":"summary"},"json_ld":[{"@context":"https://schema.org","@type":"WebSite","name":"Example"}],"json_ld_invalid":0,"truncated":false,"ms":310}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"422":{"description":"Nothing usable (not an HTML page, or no URLs found); not charged"},"502":{"description":"The page could not be fetched (timeout, error status, too many redirects); not charged"},"503":{"description":"Paused (not charged)"}}}},"/v1/screenshot":{"get":{"operationId":"screenshot","summary":"Screenshot of the visible page (1280x800, JavaScript rendered) as a base64 PNG ($0.008, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"}],"responses":{"200":{"description":"Screenshot of the visible page (1280x800, JavaScript rendered) as a base64 PNG (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"full_page":{"type":"boolean"},"format":{"const":"png"},"content_type":{"const":"image/png"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"},"image_base64":{"type":"string"},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","content_type","image_base64"]},"example":{"url":"https://example.com/","full_page":false,"format":"png","content_type":"image/png","width":1280,"height":800,"bytes":48213,"image_base64":"iVBORw0KGgoAAAANSUhEUgAA...","ms":2400,"attempts":1}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"screenshot_post","summary":"Same as GET, JSON body","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) page to capture"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Screenshot of the visible page (1280x800, JavaScript rendered) as a base64 PNG (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"full_page":{"type":"boolean"},"format":{"const":"png"},"content_type":{"const":"image/png"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"},"image_base64":{"type":"string"},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","content_type","image_base64"]},"example":{"url":"https://example.com/","full_page":false,"format":"png","content_type":"image/png","width":1280,"height":800,"bytes":48213,"image_base64":"iVBORw0KGgoAAAANSUhEUgAA...","ms":2400,"attempts":1}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/screenshot/full":{"get":{"operationId":"screenshot_full","summary":"Full-page screenshot (whole scrollable page, JavaScript rendered) as a base64 PNG ($0.012, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.012"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"12000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"}],"responses":{"200":{"description":"Full-page screenshot (whole scrollable page, JavaScript rendered) as a base64 PNG (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"full_page":{"type":"boolean"},"format":{"const":"png"},"content_type":{"const":"image/png"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"},"image_base64":{"type":"string"},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","content_type","image_base64"]},"example":{"url":"https://example.com/","full_page":true,"format":"png","content_type":"image/png","width":1280,"height":3200,"bytes":48213,"image_base64":"iVBORw0KGgoAAAANSUhEUgAA...","ms":2400,"attempts":1}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"screenshot_full_post","summary":"Same as GET, JSON body","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.012"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"12000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) page to capture"}},"required":["url"]},"example":{"url":"https://example.com/"}}}},"responses":{"200":{"description":"Full-page screenshot (whole scrollable page, JavaScript rendered) as a base64 PNG (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"full_page":{"type":"boolean"},"format":{"const":"png"},"content_type":{"const":"image/png"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"},"image_base64":{"type":"string"},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","content_type","image_base64"]},"example":{"url":"https://example.com/","full_page":true,"format":"png","content_type":"image/png","width":1280,"height":3200,"bytes":48213,"image_base64":"iVBORw0KGgoAAAANSUhEUgAA...","ms":2400,"attempts":1}}}},"400":{"description":"URL not allowed (non-http(s), private or reserved address, credentials, non-default port); not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/search":{"get":{"operationId":"search","summary":"Web search: up to 10 ranked results (title, URL, snippet) ($0.008, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":400},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10},"description":"Max results (default 10)"}],"responses":{"200":{"description":"Web search: up to 10 ranked results (title, URL, snippet) (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"title":{"type":["string","null"]},"url":{"type":"string"},"snippet":{"type":["string","null"]}},"required":["rank","url"]}},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["query","count","results"]},"example":{"query":"x402 payment protocol","count":1,"results":[{"rank":1,"title":"x402: HTTP-native payments","url":"https://www.x402.org/","snippet":"An open protocol for internet-native payments..."}],"ms":1300,"attempts":1}}}},"400":{"description":"Invalid query or limit on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"search_post","summary":"Same as GET, JSON body","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":400,"description":"Search query (1-400 characters)"},"limit":{"type":"integer","minimum":1,"maximum":10,"description":"Max results (default 10)"}},"required":["q"]},"example":{"q":"x402 payment protocol","limit":10}}}},"responses":{"200":{"description":"Web search: up to 10 ranked results (title, URL, snippet) (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"title":{"type":["string","null"]},"url":{"type":"string"},"snippet":{"type":["string","null"]}},"required":["rank","url"]}},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["query","count","results"]},"example":{"query":"x402 payment protocol","count":1,"results":[{"rank":1,"title":"x402: HTTP-native payments","url":"https://www.x402.org/","snippet":"An open protocol for internet-native payments..."}],"ms":1300,"attempts":1}}}},"400":{"description":"Invalid query or limit on a paid attempt (not charged)"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"502":{"description":"No provider returned a result (not charged)"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/pdf":{"get":{"operationId":"pdf","summary":"PDF to text, page by page (up to 50 pages, 10 MB) ($0.008, charged only on success)","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) URL of a PDF"},{"name":"pages","in":"query","required":false,"schema":{"type":"string","maxLength":400},"description":"Optional pages, e.g. 1-3,7 (up to 50)"}],"responses":{"200":{"description":"PDF to text, page by page (up to 50 pages, 10 MB) (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_count":{"type":["integer","null"]},"pages_returned":{"type":"integer"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"truncated":{"type":"boolean"},"text":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer"},"text":{"type":"string"}},"required":["page","text"]}},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","text","pages"]},"example":{"url":"https://raw.githubusercontent.com/mozilla/pdf.js/aa89148aed549a93c5aba3ca85d81711c7e5803a/examples/learning/helloworld.pdf","page_count":1,"pages_returned":1,"title":null,"author":null,"truncated":false,"text":"Hello, world!","pages":[{"page":1,"text":"Hello, world!"}],"ms":900,"attempts":1}}}},"400":{"description":"URL not allowed (same rules as screenshot) or invalid pages; not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"413":{"description":"PDF larger than 10 MB (not charged)"},"415":{"description":"The URL did not return a PDF (not charged)"},"422":{"description":"The server did not declare the PDF size (no Content-Length or Content-Range), or the PDF is password-protected, unreadable, has no text layer, expands too much when decompressed, or none of the requested pages exist; not charged"},"429":{"description":"Too many failed PDF calls from this payer in the last 10 minutes; retry after Retry-After seconds (not charged)"},"502":{"description":"The PDF could not be fetched or decoded in time, or no readable text came back; not charged"},"503":{"description":"Paused or at capacity (not charged)"}}},"post":{"operationId":"pdf_post","summary":"Same as GET, JSON body","tags":["paid"],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.008"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"8000"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) URL of a PDF (up to 10 MB)"},"pages":{"description":"Optional page numbers, up to 50: an array like [1, 2] or a string like \"1-3,7\" (default: from page 1, up to 50 pages)","oneOf":[{"type":"array","items":{"type":"integer","minimum":1,"maximum":10000},"minItems":1,"maxItems":50},{"type":"string","maxLength":400}]}},"required":["url"]},"example":{"url":"https://raw.githubusercontent.com/mozilla/pdf.js/aa89148aed549a93c5aba3ca85d81711c7e5803a/examples/learning/helloworld.pdf","pages":[1]}}}},"responses":{"200":{"description":"PDF to text, page by page (up to 50 pages, 10 MB) (payment settled)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_count":{"type":["integer","null"]},"pages_returned":{"type":"integer"},"title":{"type":["string","null"]},"author":{"type":["string","null"]},"truncated":{"type":"boolean"},"text":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer"},"text":{"type":"string"}},"required":["page","text"]}},"ms":{"type":"number"},"attempts":{"type":"integer"}},"required":["url","text","pages"]},"example":{"url":"https://raw.githubusercontent.com/mozilla/pdf.js/aa89148aed549a93c5aba3ca85d81711c7e5803a/examples/learning/helloworld.pdf","page_count":1,"pages_returned":1,"title":null,"author":null,"truncated":false,"text":"Hello, world!","pages":[{"page":1,"text":"Hello, world!"}],"ms":900,"attempts":1}}}},"400":{"description":"URL not allowed (same rules as screenshot) or invalid pages; not charged"},"402":{"description":"Payment Required: x402 v2 terms in the PAYMENT-REQUIRED header, the same terms as JSON in the body"},"413":{"description":"PDF larger than 10 MB (not charged)"},"415":{"description":"The URL did not return a PDF (not charged)"},"422":{"description":"The server did not declare the PDF size (no Content-Length or Content-Range), or the PDF is password-protected, unreadable, has no text layer, expands too much when decompressed, or none of the requested pages exist; not charged"},"429":{"description":"Too many failed PDF calls from this payer in the last 10 minutes; retry after Retry-After seconds (not charged)"},"502":{"description":"The PDF could not be fetched or decoded in time, or no readable text came back; not charged"},"503":{"description":"Paused or at capacity (not charged)"}}}},"/v1/quote":{"get":{"operationId":"quote","summary":"Free: our price for a tier, healthy-provider count, estimated latency, payment status","security":[],"parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","maxLength":2048},"description":"Public http(s) page, e.g. https://example.com/"},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["standard","lite"]}}],"responses":{"200":{"description":"Quote"},"400":{"description":"Invalid URL or tier"}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP Streamable HTTP (JSON-RPC, stateless). Tools: scrape ($0.008), scrape_lite ($0.003), map and metadata ($0.001 each), screenshot ($0.008), screenshot_full ($0.012), search ($0.008), pdf ($0.008), quote (free). Paid tools return x402 terms as an isError result; retry with params._meta[\"x402/payment\"]","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"const":"2.0"},"id":{},"method":{"type":"string"},"params":{"type":"object"}},"required":["jsonrpc","method"]}}}},"responses":{"200":{"description":"JSON-RPC response"},"202":{"description":"Notification accepted"},"400":{"description":"Invalid JSON-RPC"},"413":{"description":"Request too large"}}}},"/health":{"get":{"operationId":"health","summary":"Free: status, payment status, healthy-provider count","security":[],"responses":{"200":{"description":"Health"}}}},"/v1/credits/buy/5":{"post":{"operationId":"credits_buy_5","summary":"Buy the $5 pack ($5 of balance); returns an API key shown once","tags":["credits","paid"],"security":[],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"5"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"5000000"},"responses":{"200":{"description":"Settled: { key (shown once), key_id, credit_usd }"},"402":{"description":"Payment Required (x402 v2 terms), or payment_not_settled (no key issued, nothing charged)"},"409":{"description":"Payment already used"},"429":{"description":"Purchase limit for this wallet today"},"503":{"description":"Credits unavailable or sales paused (nothing charged)"}}}},"/v1/credits/buy/20":{"post":{"operationId":"credits_buy_20","summary":"Buy the $20 pack ($21 of balance); returns an API key shown once","tags":["credits","paid"],"security":[],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"20"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"20000000"},"responses":{"200":{"description":"Settled: { key (shown once), key_id, credit_usd }"},"402":{"description":"Payment Required (x402 v2 terms), or payment_not_settled (no key issued, nothing charged)"},"409":{"description":"Payment already used"},"429":{"description":"Purchase limit for this wallet today"},"503":{"description":"Credits unavailable or sales paused (nothing charged)"}}}},"/v1/credits/buy/50":{"post":{"operationId":"credits_buy_50","summary":"Buy the $50 pack ($55 of balance); returns an API key shown once","tags":["credits","paid"],"security":[],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"50"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"50000000"},"responses":{"200":{"description":"Settled: { key (shown once), key_id, credit_usd }"},"402":{"description":"Payment Required (x402 v2 terms), or payment_not_settled (no key issued, nothing charged)"},"409":{"description":"Payment already used"},"429":{"description":"Purchase limit for this wallet today"},"503":{"description":"Credits unavailable or sales paused (nothing charged)"}}}},"/v1/credits/buy/monthly":{"post":{"operationId":"credits_buy_monthly","summary":"Buy the monthly plan ($10 for 30 days); returns an API key shown once","tags":["credits","paid"],"security":[],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"10"}},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"10000000"},"responses":{"200":{"description":"Settled: { key (shown once), key_id, credit_usd }"},"402":{"description":"Payment Required (x402 v2 terms), or payment_not_settled (no key issued, nothing charged)"},"409":{"description":"Payment already used"},"429":{"description":"Purchase limit for this wallet today"},"503":{"description":"Credits unavailable or sales paused (nothing charged)"}}}},"/v1/credits":{"get":{"operationId":"credits_balance","summary":"Free with your key: balance and monthly plan status","tags":["credits"],"security":[{"creditKey":[]}],"responses":{"200":{"description":"{ key_id, balance_usd, balance_raw, plan_active_until }"},"401":{"description":"Invalid or revoked key"},"503":{"description":"Credits unavailable"}}}},"/v1/credits/recover/nonce":{"post":{"operationId":"credits_recover_nonce","summary":"Lost key, step 1: a single-use challenge (valid 10 min) for a key_id","tags":["credits"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key_id":{"type":"string","pattern":"^k_[0-9a-f]{12}$"}},"required":["key_id"]}}}},"responses":{"200":{"description":"{ key_id, nonce, message, expires_in_s }"},"400":{"description":"Invalid key_id"},"404":{"description":"Unknown key_id"}}}},"/v1/credits/recover":{"post":{"operationId":"credits_recover","summary":"Lost key, step 2: the buying wallet signs the message (EIP-191); the balance moves to a new key shown once","tags":["credits"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key_id":{"type":"string"},"nonce":{"type":"string","pattern":"^[0-9a-f]{32}$"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]{130}$"}},"required":["key_id","nonce","signature"]}}}},"responses":{"200":{"description":"{ key (shown once), key_id, balance_usd }"},"400":{"description":"Missing fields"},"403":{"description":"Wrong wallet, used, expired or mismatched challenge"}}}}},"components":{"securitySchemes":{"creditKey":{"type":"http","scheme":"bearer","description":"Optional prepaid API key. Prepaid credits (optional). Buy a $5, $20 (+5% credit) or $50 (+10% credit) pack once with x402 and get an API key. Send it as `Authorization: Bearer <key>`. Each call debits that endpoint's own price, only when it succeeds: `/v1/scrape/lite` $0.003 per page, `/v1/scrape` $0.008 per page, `/v1/map` and `/v1/metadata` $0.001 per call, `/v1/screenshot` $0.008, `/v1/screenshot/full` $0.012, `/v1/search` $0.008 and `/v1/pdf` $0.008 per call. Failed calls cost nothing. Monthly plan, $10 for 30 days. During the period, lite pages bill at the plan rate: $10 covers 4,000 lite pages. You pay for pages you actually use. Nothing expires: leftover balance stays on your key and is debited at the normal endpoint prices after the period ends. Limits: 60 calls per minute per key, 3,000 calls per day, $5 spend per day; 3 purchases per wallet per day, at most 1 $50 pack."}}}}