{"openapi":"3.1.0","info":{"title":"SmartFetch","version":"1.10.2","description":"Read, fetch, scrape, extract, and browser-render public webpages into agent-ready text, Markdown, links, and metadata.","x-guidance":"Use POST /fetch as a paid fallback when ordinary access to a public HTTP(S) webpage fails or is incomplete, when JavaScript rendering is required, or when clean text or Markdown is needed. Send url and optional max_chars and force_browser. Do not use SmartFetch to bypass CAPTCHAs, authentication, paywalls, robots restrictions, or access controls."},"servers":[{"url":"https://smartfetch-production-ea53.up.railway.app"}],"externalDocs":{"description":"SmartFetch discovery documentation","url":"https://smartfetch-production-ea53.up.railway.app/docs"},"paths":{"/fetch":{"post":{"operationId":"fetchWebpage","summary":"Fetch a public webpage","description":"Paid x402 exact retrieval of one public HTTP or HTTPS URL. The configured price is $0.005 per execution using USDC on Base mainnet.","x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","assetSymbol":"USDC","price":"$0.005","amount":"5000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","pattern":"^https?://","description":"Public HTTP or HTTPS URL to retrieve."},"max_chars":{"type":"integer","minimum":1000,"maximum":50000,"default":20000,"description":"Maximum characters returned for content and Markdown."},"force_browser":{"type":"boolean","default":false,"description":"Start with browser rendering instead of HTTP retrieval."}},"required":["url"]},"example":{"url":"https://example.com/article","max_chars":20000,"force_browser":false}}}},"responses":{"200":{"description":"Successful SmartFetch result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"requested_url":{"type":"string","format":"uri"},"final_url":{"type":"string","format":"uri"},"status_code":{"type":"integer"},"render_method":{"type":"string","enum":["http","browser"]},"elapsed_ms":{"type":"integer","minimum":0},"fallback_reason":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"markdown":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"href":{"type":"string","format":"uri"},"text":{"type":"string"}},"required":["href","text"]}},"word_count":{"type":"integer","minimum":0},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"low_quality":{"type":"boolean"},"truncated":{"type":"boolean"},"original_content_chars":{"type":"integer","minimum":0},"original_markdown_chars":{"type":"integer","minimum":0},"returned_content_chars":{"type":"integer","minimum":0},"returned_markdown_chars":{"type":"integer","minimum":0},"links_returned":{"type":"integer","minimum":0},"max_chars":{"type":"integer","minimum":1000},"request_id":{"type":"string"},"service_version":{"type":"string"}},"required":["success","requested_url","final_url","status_code","render_method","elapsed_ms","title","content","markdown","links","word_count","content_hash","low_quality","truncated","original_content_chars","original_markdown_chars","returned_content_chars","returned_markdown_chars","links_returned","max_chars","request_id","service_version"]},"example":{"success":true,"requested_url":"https://example.com/article","final_url":"https://example.com/article","status_code":200,"render_method":"http","elapsed_ms":54,"title":"SmartFetch local API test","content":"SmartFetch local API test\nThis is useful article content for validating the production API layer. It contains enough text to pass extraction and verifies that navigation boilerplate is removed correctly from the result.\nSecond paragraph with a\nuseful link\n.","markdown":"# SmartFetch local API test\n\nThis is useful article content for validating the production API layer. It contains enough text to pass extraction and verifies that navigation boilerplate is removed correctly from the result.\n\nSecond paragraph with a [useful link](/next).","links":[{"href":"https://example.com/next","text":"useful link"}],"word_count":40,"content_hash":"3ae07fdaa195ad19b590e0bdf032e362ae7d573330dd978027880b0706dc62e7","low_quality":false,"truncated":false,"original_content_chars":257,"original_markdown_chars":269,"returned_content_chars":257,"returned_markdown_chars":269,"links_returned":1,"max_chars":20000,"request_id":"a1b2c3d4e5f60708","service_version":"1.10.2"}}}},"400":{"description":"Invalid request or blocked target","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error_code":{"type":"string"},"error":{"type":"string"},"request_id":{"type":"string"}},"required":["success","error","request_id"]}}}},"402":{"description":"x402 v2 payment required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer","const":2},"error":{"type":"string"},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","const":"exact"},"network":{"type":"string","const":"eip155:8453"},"amount":{"type":"string","example":"5000"},"asset":{"type":"string","const":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"payTo":{"type":"string"}},"required":["scheme","network","amount","asset","payTo"]}},"request_id":{"type":"string"}},"required":["x402Version","accepts","request_id"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error_code":{"type":"string"},"error":{"type":"string"},"request_id":{"type":"string"}},"required":["success","error","request_id"]}}}},"502":{"description":"Upstream fetch failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error_code":{"type":"string"},"error":{"type":"string"},"request_id":{"type":"string"}},"required":["success","error","request_id"]}}}},"503":{"description":"Service is at capacity","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error_code":{"type":"string"},"error":{"type":"string"},"request_id":{"type":"string"}},"required":["success","error","request_id"]}}}},"504":{"description":"Retrieval timed out","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error_code":{"type":"string"},"error":{"type":"string"},"request_id":{"type":"string"}},"required":["success","error","request_id"]}}}}}}}}}