{"openapi":"3.1.0","x-discovery":{"ownershipProofs":["0x1a6c978b30baa4052f361c2ba71177dc7bc38107b878d2415c49e0cc82bff842171dbac2d9e79e35e55a310b27a612cec7e6b9a0a7e3259411d84703cf65874a1c"]},"info":{"title":"get402","version":"0.1.0","contact":{"email":"contact@get402.ai"},"description":"Fetch a public URL and return its main content as markdown. Paid per call over x402. Free routes: GET /v1, GET /v1/health, GET /v1/receipts/{request_id}. Human docs: https://get402.ai/docs."},"servers":[{"url":"https://get402.ai"}],"paths":{"/v1/fetch":{"get":{"operationId":"fetch","summary":"Fetch a public URL and return its main content as markdown.","parameters":[{"name":"url","in":"query","required":true,"description":"Absolute http or https URL to fetch.","schema":{"type":"string"}},{"name":"fresh","in":"query","required":false,"description":"1 or true bypasses the cache and fetches now. Same price.","schema":{"type":"string"}},{"name":"max_bytes","in":"query","required":false,"description":"Cap on the downloaded body size. The server enforces its own maximum regardless.","schema":{"type":"string"}},{"name":"timeout_ms","in":"query","required":false,"description":"Hint. The server enforces its own upper bound.","schema":{"type":"string"}}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"network":"base","asset":"USDC","payTo":"0xB3b5Fb04B2Aef15baf18b121F49fF1DfD100Dd2E"},"responses":{"200":{"description":"Markdown for the requested URL. Charged only on this status.","content":{"application/json":{"example":{"data":{"url":"https://example.com/page","final_url":"https://example.com/page","title":"Page title","description":null,"content_type":"text/html; charset=utf-8","markdown":"# Page title\n\nExample body.","word_count":5,"truncated":false,"fetched_at":"2026-09-19T12:00:00.000Z"},"error":null,"meta":{"request_id":"00000000-0000-4000-8000-000000000001","cost_usdc":"0.005","cached":false,"cached_at":null,"upstream_status":200,"payment":{"network":"base","asset":"USDC","payer":"0x1111111111111111111111111111111111111111","settlement_ref":"0x1111111111111111111111111111111111111111111111111111111111111111"}}}}}},"400":{"description":"invalid_url: Missing, relative, or malformed url.\nblocked_target: Non-http(s) scheme, a private, link-local, or metadata address, or a host on the deny list, at any redirect hop.","content":{"application/json":{"example":{"data":null,"error":{"code":"blocked_target","message":"Private, link-local and metadata addresses are not fetchable."},"meta":{"request_id":"00000000-0000-4000-8000-000000000002","cost_usdc":"0","cached":false,"cached_at":null,"upstream_status":null,"payment":null}}}}},"402":{"description":"payment_required: No payment proof was sent.\npayment_invalid: A proof was sent but verification failed.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 challenge, base64 JSON.","schema":{"type":"string"}}}},"403":{"description":"blocked_by_robots: robots.txt disallows the get402 user agent for the path."},"404":{"description":"not_found: Unknown request_id on the receipts route."},"422":{"description":"too_large: The hard cap was hit before extraction could succeed.\nunsupported_content: The body is not HTML or plain text.\nextraction_empty: The fetch succeeded but extraction found no article body."},"429":{"description":"rate_limited: Per-caller, per-target-host, or per-payer limit hit. Retry-After gives the seconds to wait. Never charged."},"500":{"description":"internal: Unexpected failure in this service."},"502":{"description":"upstream_failed: DNS, connect, TLS, or read failure. A timeout uses the same code with HTTP 504.\nupstream_error: The target answered with 4xx or 5xx. meta.upstream_status carries that status."},"503":{"description":"unavailable: Health check failed. error.message names the dependency."}}}}}}