{"uid":"cap_4V9mVc7tIJ108xgXsf-Ap","slug":"get402-ai-url-to-markdown-fetcher-e5f1bdb6","name":"get402.ai URL to Markdown Fetcher","description":"Agent-native fetch API","url":"https://get402.ai/v1/fetch?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Absolute http or https URL to fetch."},"fresh":{"type":"string","description":"1 or true bypasses the cache and fetches now. Same price."},"max_bytes":{"type":"string","description":"Cap on the downloaded body size. The server enforces its own maximum regardless."},"timeout_ms":{"type":"string","description":"Hint. The server enforces its own upper bound."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"path":"/v1/fetch","price":{"asset":"USDC","payTo":"0xB3b5Fb04B2Aef15baf18b121F49fF1DfD100Dd2E","amount":"0.005","network":"base"},"errors":[{"code":"payment_required","when":"No payment proof was sent.","status":402,"message":"Payment is required."},{"code":"payment_invalid","when":"A proof was sent but verification failed.","status":402,"message":"The payment proof could not be verified."},{"code":"invalid_url","when":"Missing, relative, or malformed url.","status":400,"message":"The url parameter must be an absolute http or https URL."},{"code":"blocked_target","when":"Non-http(s) scheme, a private, link-local, or metadata address, or a host on the deny list, at any redirect hop.","status":400,"message":"Private, link-local and metadata addresses are not fetchable."},{"code":"blocked_by_robots","when":"robots.txt disallows the get402 user agent for the path.","status":403,"message":"The target's robots.txt disallows this user agent for that path."},{"code":"rate_limited","when":"Per-caller, per-target-host, or per-payer limit hit. Retry-After gives the seconds to wait. Never charged.","status":429,"message":"Rate limit exceeded."},{"code":"upstream_failed","when":"DNS, connect, TLS, or read failure. A timeout uses the same code with HTTP 504.","status":502,"message":"The upstream request failed before a response."},{"code":"upstream_error","when":"The target answered with 4xx or 5xx. meta.upstream_status carries that status.","status":502,"message":"The target returned an error."},{"code":"too_large","when":"The hard cap was hit before extraction could succeed.","status":422,"message":"The body exceeded the size cap before enough content was read to extract."},{"code":"unsupported_content","when":"The body is not HTML or plain text.","status":422,"message":"Only HTML and plain text can be extracted."},{"code":"extraction_empty","when":"The fetch succeeded but extraction found no article body.","status":422,"message":"The page had no usable main content."},{"code":"not_found","when":"Unknown request_id on the receipts route.","status":404,"message":"No request exists with that id."},{"code":"unavailable","when":"Health check failed. error.message names the dependency.","status":503,"message":"A dependency is unavailable."},{"code":"internal","when":"Unexpected failure in this service.","status":500,"message":"get402 failed while handling the request."}],"method":"GET","params":[{"name":"url","required":true,"description":"Absolute http or https URL to fetch."},{"name":"fresh","required":false,"description":"1 or true bypasses the cache and fetches now. Same price."},{"name":"max_bytes","required":false,"description":"Cap on the downloaded body size. The server enforces its own maximum regardless."},{"name":"timeout_ms","required":false,"description":"Hint. The server enforces its own upper bound."}],"example_error":{"data":null,"meta":{"cached":false,"payment":null,"cached_at":null,"cost_usdc":"0","request_id":"00000000-0000-4000-8000-000000000002","upstream_status":null},"error":{"code":"blocked_target","message":"Private, link-local and metadata addresses are not fetchable."}},"example_success":{"data":{"url":"https://example.com/page","title":"Page title","markdown":"# Page title\n\nExample body.","final_url":"https://example.com/page","truncated":false,"fetched_at":"2026-09-19T12:00:00.000Z","word_count":5,"description":null,"content_type":"text/html; charset=utf-8"},"meta":{"cached":false,"payment":{"asset":"USDC","payer":"0x1111111111111111111111111111111111111111","network":"base","settlement_ref":"0x1111111111111111111111111111111111111111111111111111111111111111"},"cached_at":null,"cost_usdc":"0.005","request_id":"00000000-0000-4000-8000-000000000001","upstream_status":200},"error":null}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WrNAvV0f5hjL1F5I5KfOd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a public URL and returns its main article content converted to clean markdown text.","exampleAgentPrompt":"Can you fetch the content of https://openai.com/blog/gpt-4o and give me the main article text as markdown?","exampleUseCases":[{"title":"Research article summarization","prompt":"Grab the full article text from https://www.nature.com/articles/s41586-024-07487-w and give it to me as markdown so I can summarize the key findings."},{"title":"Competitor blog monitoring","prompt":"Fetch the latest post at https://blog.anthropic.com/claude-3-5-sonnet and pull out the main content as markdown — I want to see what they announced."},{"title":"Documentation ingestion for agent","prompt":"Retrieve the content from https://docs.stripe.com/api/charges and convert it to markdown so I can feed it into my knowledge base."}],"resultDescription":"Returns the main readable content of the target webpage converted to markdown, stripping navigation, ads, and boilerplate. Includes the extracted article body as structured markdown text. On failure, returns a structured error with a code, HTTP status, and human-readable message describing what went wrong (e.g. payment required, blocked by robots.txt, upstream error, unsupported content type, or empty extraction).","failureModes":["payment_required (402): No payment proof provided — must include x402 payment header","payment_invalid (402): Payment proof sent but verification failed","invalid_url (400): URL missing, relative, or malformed — must be absolute http/https","blocked_target (400): Target is a private, link-local, or metadata IP address, or on deny list","blocked_by_robots (403): Target's robots.txt disallows the get402 user agent","rate_limited (429): Per-caller, per-host, or per-payer rate limit hit — check Retry-After header","upstream_failed (502/504): DNS, connect, TLS, or read failure before a response was received","upstream_error (502): Target server returned a 4xx or 5xx response","too_large (422): Body exceeded the size cap before content could be extracted","unsupported_content (422): Body is not HTML or plain text","extraction_empty (422): Page fetched successfully but no article body could be extracted"],"whenToPreferThis":"Choose this endpoint when you need to retrieve and read the main textual content of a public webpage and want it returned in clean markdown format, without building your own scraping infrastructure. It is ideal for agents that need to ingest web articles, documentation pages, or blog posts for summarization, analysis, or knowledge base ingestion. Prefer it over raw HTTP fetch tools when you want automatic boilerplate removal and markdown conversion in a single call. Not suitable for pages behind authentication, private IP ranges, or non-HTML content like PDFs or binary files.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:37:13.697Z","isFirstParty":false,"canonicalSlug":"get402-ai-url-to-markdown-fetcher-e5f1bdb6"}