{"uid":"cap_JuLnLVZDvx_W3r8bsVFnC","slug":"readability-content-extraction-from-html-57e9286c","name":"Readability Content Extraction from HTML","description":"Heuristic main-content extraction from supplied HTML by text density and tag scoring; returns text, title, byline, confidence.","url":"https://markup-tools.x402tookit.com/readability-extract?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":["html"],"properties":{"base":{"type":"string","description":"Optional absolute http(s) URL of the page (kept in the answer for context)"},"html":{"type":"string","description":"Full page HTML, up to 20000 characters (longer is refused with 400)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"text":{"type":["null","string"]},"score":{"type":["null","number"]},"title":{"type":["null","string"]},"byline":{"type":["null","string"]},"source":{"type":["null","string"]},"pageUrl":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"removed":{"type":["null","object"],"properties":{"byTag":{"type":["null","number"]},"hidden":{"type":["null","number"]},"byClassOrId":{"type":["null","number"]}}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"language":{},"container":{"type":["null","object"],"properties":{"id":{"type":["null","string"]},"tag":{"type":["null","string"]},"class":{}}},"wordCount":{"type":["null","number"]},"confidence":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"linkDensity":{"type":["null","number"]},"runnerUpScore":{},"hiddenElements":{"type":["array","null"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_g9TNmQRh5mBs5IkkYKxvu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts the main article content from raw HTML using heuristic text-density and tag scoring, returning cleaned text, title, byline, and a confidence score.","exampleAgentPrompt":"I have the raw HTML of a news article — can you extract just the main article text, the title, and the author byline from it, and tell me how confident the extraction is?","exampleUseCases":[{"title":"News article body extraction","prompt":"Here's the full HTML of this Reuters article — can you pull out just the main article text and the author name, and let me know how confident you are that you got the right content block?"},{"title":"Blog post ingestion for RAG pipeline","prompt":"I'm building a knowledge base and need the clean readable text, title, and word count from this blog post HTML — strip out all the nav, ads, and sidebars and just give me the article body."},{"title":"Content quality audit for scraped pages","prompt":"I scraped this HTML from a product review page — can you extract the main content text and give me the confidence score and link density so I can tell if the page is mostly article or mostly navigation links?"}],"resultDescription":"Returns a JSON object with: extracted plain text of the main content, page title, byline/author, confidence level (e.g. high/medium/low), word count, language, link density ratio, the HTML container element that was identified as main content (tag, id, class), counts of elements removed by tag or class/id heuristics, an optional summary, verdict string, and degraded flag indicating partial extraction. Null fields are returned when data is unavailable.","failureModes":["HTML longer than 20,000 characters returns 400 Bad Request","Highly JavaScript-rendered pages with minimal static HTML may yield low confidence or null text","Pages with no discernible content block may return null text with low confidence score","Malformed HTML may cause degraded=true with partial results","Missing or ambiguous byline results in null byline field","Payment failure or missing x402 payment returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you have raw HTML and need to isolate the main readable content without running a full browser or JavaScript engine. It is ideal for server-side pipelines that scrape static or server-rendered HTML and need article text for downstream NLP, summarization, or indexing. Prefer this over generic HTML-to-text converters when you also need metadata like byline, title, confidence score, and container identification — the scoring heuristics make it more robust than simple tag stripping.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:30:23.929Z","isFirstParty":false,"canonicalSlug":"readability-content-extraction-from-html-57e9286c"}