{"uid":"cap_b6a_J-bPvK3xpKQJCPRBU","slug":"extract-headings-as-json-5b3ca85f","name":"extract-headings-as-json","description":"Extract the page's headings as json: fetches the URL, pulls every headings element and returns them as a JSON array, with a count. Structured, one-element-type extraction for agents and pipelines; no browser needed. $0.01 per page.","url":"https://page.intel.rallylive.ca/page/headings/json?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","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_W0vfZhzOGvGtEcPzZEpO5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a web page and extracts all heading elements (h1–h6) as a structured JSON array with a count.","exampleAgentPrompt":"Can you fetch https://example.com/blog/post and pull out all the headings as a JSON array so I can see the page's structure?","exampleUseCases":[{"title":"Audit article structure for SEO","prompt":"Grab all the headings from https://myblog.com/how-to-grow-tomatoes and give me them as JSON — I want to check whether the h1 and h2 hierarchy makes sense for SEO."},{"title":"Build a table of contents from a page","prompt":"Pull all the headings from https://docs.myproject.io/getting-started as JSON so I can automatically generate a table of contents for that documentation page."},{"title":"Validate competitor page outline","prompt":"Fetch https://competitor.com/product and extract every heading element as a JSON array — I want to see how they've structured their product page compared to ours."}],"resultDescription":"A JSON array of heading objects found on the fetched page, each containing the heading text and its level (h1–h6), plus a total count of headings extracted.","failureModes":["URL is unreachable or returns a non-200 status — endpoint returns an error or empty result","Page uses JavaScript-rendered content that requires a browser — headings may be missing since no browser is used","URL parameter is missing or malformed — request fails with a validation error","Page has no heading elements — returns an empty array with count of zero","Network timeout on slow or large pages — may return a timeout error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, structured JSON extraction of only heading elements from a static or server-rendered web page, without spinning up a browser. Ideal for agents and pipelines that need to analyze page structure, generate tables of contents, or audit heading hierarchies at $0.01 per page. Prefer alternatives if the page is JavaScript-rendered, if you need all text content (use extract-text-as-text), or if you need bulk processing of many URLs at once (use the bulk or watch variants).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T18:46:08.235Z","isFirstParty":false,"canonicalSlug":"extract-headings-as-json-5b3ca85f"}