{"uid":"cap_5GR_kaBPZzO4NNVQKjKzo","slug":"webextract-web-page-to-markdown-structured-json-api-36d4ec7b","name":"WebExtract — Web Page to Markdown + Structured JSON API","description":"Markdown only: fetch a public web page (robots.txt respected) and return clean Markdown plus title/word count. Cheaper than /v1/extract when you do not need structured product/table JSON.","url":"https://api.webextract.dev/v1/markdown?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"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Public http(s) URL to convert to Markdown"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["url","final_url","markdown"],"properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"markdown":{"type":"string"},"final_url":{"type":"string"},"fetched_at":{"type":"string"},"word_count":{"type":"integer"},"content_source":{"enum":["raw_html","rendered"],"type":"string","description":"Where the content came from: raw_html = the HTTP response body, no JavaScript executed (/v1/extract, /v1/markdown); rendered = the page was loaded in a headless browser with JavaScript executed (/v1/render/extract, /v1/render/markdown)"},"markdown_truncated":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"url":"https://example.com/article","title":"Example","markdown":"# Example\n...","final_url":"https://example.com/article","word_count":120,"markdown_truncated":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lUZvKrVeImTlvXOG63S1S","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches any public URL and returns clean Markdown plus structured JSON (title, word count, truncation status) for AI agent consumption","exampleAgentPrompt":"Can you fetch the content of https://techcrunch.com/2024/01/15/openai-news/ and give me the full article as clean markdown text with the title and word count?","exampleUseCases":[{"title":"Article ingestion for RAG pipeline","prompt":"Pull the full text from https://www.bbc.com/news/technology-12345678 and convert it to markdown so I can add it to my knowledge base — I need the title, word count, and the cleaned content."},{"title":"Product price extraction from e-commerce","prompt":"Grab the page at https://www.amazon.com/dp/B0EXAMPLE and convert it to structured markdown so I can extract the product name and price."},{"title":"Research summary from a blog post","prompt":"Fetch https://martinfowler.com/articles/microservices.html and return it as clean markdown so I can summarize the key points for my team."}],"resultDescription":"Returns a JSON object with the original URL, the page title, the full page content as cleaned Markdown, the final (possibly redirected) URL, word count of the markdown, and a boolean indicating whether the markdown was truncated due to length limits.","failureModes":["URL is not publicly accessible or requires authentication — returns error","robots.txt disallows crawling — request may be blocked","Invalid or malformed URL in query parameter — returns 400-level error","Page is very large and markdown is truncated (markdown_truncated: true)","Network timeout fetching the target URL — returns error","URL points to non-HTML content (PDF, binary) — markdown conversion may fail or be partial"],"whenToPreferThis":"Choose this endpoint when you need to convert a single public web page into LLM-ready Markdown with structured metadata (title, word count) in one API call. It is ideal for AI pipelines that need clean, readable text from arbitrary URLs without managing a browser or HTML parser. Prefer it over raw HTML fetching when your downstream task is text analysis, summarization, or RAG ingestion. It respects robots.txt, making it suitable for compliant automated agents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T00:38:25.899Z","isFirstParty":false,"canonicalSlug":"webextract-web-page-to-markdown-structured-json-api-36d4ec7b"}