{"uid":"cap_tEEKeiH7egJBYyhqkRdVp","slug":"readfetch-section-extractor-3e6de501","name":"ReadFetch Section Extractor","description":"One heading or one selector instead of the whole page. A heading that is not found returns 200, an empty body and the list of headings that do exist.","url":"https://readfetch.com/v1/section?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public page URL to extract from."},"mode":{"enum":["fast","render"],"type":"string","default":"render","description":"fast = HTTP-first; render = one browser pass when plain HTTP fails (default)."},"format":{"enum":["markdown","text"],"type":"string","default":"markdown","description":"Output flavour for the matched section (markdown default)."},"heading":{"anyOf":[{"type":"string"},{"type":"null"}],"example":"Introduction","description":"Heading text to match (case-insensitive, whitespace-normalised). Required unless `selector` is set — send exactly one of `heading` or `selector`, not both."},"selector":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS selector; up to 20 matches concatenated. Required unless `heading` is set — use selector when the section has no stable heading text."},"max_chars":{"type":"number","default":8000,"maximum":20000,"minimum":100,"description":"Truncate matched text after this many characters."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fURdJbQ8XBU8QeJ0QZ-Yf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts a specific heading section or CSS-selected element from a webpage, returning only the targeted content as Markdown or plain text instead of the full page.","exampleAgentPrompt":"Grab just the 'Pricing' section from https://example.com/product using render mode so JavaScript loads, and return it as markdown — cap it at 5000 characters.","exampleUseCases":[{"title":"Extracting FAQ from documentation site","prompt":"Pull out only the 'FAQ' section from https://docs.someproduct.io/getting-started as markdown, using render mode so the page fully loads."},{"title":"Competitive pricing intelligence","prompt":"Fetch just the 'Pricing' heading section from https://competitor.com/plans as plain text — use residential egress in case they block datacenters."},{"title":"Scraping a specific element with CSS selector","prompt":"From https://news.site.com/article/123, extract the element matching the CSS selector '.article-summary' and return the result as markdown, up to 3000 characters."}],"resultDescription":"Returns the content of the specified heading section or CSS-selected elements as Markdown or plain text, up to the configured character limit. If the heading is not found, returns HTTP 200 with an empty body plus a list of all headings that exist on the page. If a CSS selector is used, returns up to 20 matched elements concatenated.","failureModes":["Heading not found: 200 response with empty body and list of available headings","URL unreachable or returns non-200: error response indicating fetch failure","JavaScript-heavy page content missing when using 'fast' mode instead of 'render'","CSS selector matches no elements: empty result returned","Datacenter IP blocked by target site when not using residential egress","Content exceeds max_chars and is truncated at the limit","Invalid CSS selector syntax causing a parse error"],"whenToPreferThis":"Choose this endpoint when you only need a specific section or element from a page rather than the full content — it's more token-efficient and cheaper than fetching the whole page. Ideal when the target content is organized under a known heading or identifiable CSS class. Prefer the full-page scrape endpoints when the structure is unknown or you need the complete document. Use residential egress mode when the target site blocks datacenter IPs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:39:57.633Z","isFirstParty":false,"canonicalSlug":"readfetch-section-extractor-3e6de501"}