{"uid":"cap_2_hswd9u1RVgkY3GVqg0V","slug":"toll402-schema-constrained-web-extraction-e0573e00","name":"Toll402 Schema-Constrained Web Extraction","description":"Turn a web page or raw text into JSON that matches YOUR JSON Schema. LLM-powered, schema-constrained output — no parsing needed.","url":"https://toll402.dev/v1/extract","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":["schema"],"properties":{"url":{"type":"string","format":"uri","description":"Page to read and extract from"},"text":{"type":"string","maxLength":400000,"description":"Raw text/markdown/HTML to extract from (alternative to url)"},"schema":{"type":"object","description":"JSON Schema (object) describing the output you want","additionalProperties":true},"instructions":{"type":"string","maxLength":4000,"description":"Extra guidance, e.g. 'prices in USD', 'dates as ISO 8601'"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"ms":{"type":"integer"},"ok":{"type":"boolean"},"tool":{"type":"string"},"result":{"type":"object","properties":{"data":{"type":"object","properties":{"stories":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"points":{"type":"integer"}}}}}},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"}}}}}}}}}}},"responseSchema":{"type":"json","example":{"data":{"stories":[{"title":"Show HN: ...","points":120}]},"usage":{"inputTokens":5400,"outputTokens":320}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.06","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.06/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.06","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xTXyrTWX_NI_tmZixJial","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.06","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured JSON from a web page or raw text, constrained to a caller-supplied JSON Schema, using an LLM backend — no post-processing required.","exampleAgentPrompt":"Fetch this product page — https://example.com/products/widget-42 — and extract the product name, price in USD, availability status, and list of features into a JSON object matching this schema: {name: string, price: number, available: boolean, features: string[]}. Output dates as ISO 8601.","exampleUseCases":[{"title":"Product page to structured catalog entry","prompt":"Go to https://www.bhphotovideo.com/c/product/123456/camera.html and extract the product name, brand, price in USD, sensor resolution in megapixels, and whether it's in stock — return it as a clean JSON object with keys: name, brand, priceUsd, megapixels, inStock."},{"title":"Job listing extraction for ATS import","prompt":"Here's the raw HTML of a job posting — pull out the job title, company name, location, salary range, and a list of required skills from it and return structured JSON with keys: title, company, location, salaryRange, requiredSkills."},{"title":"Event scraping from a venue page","prompt":"Fetch https://www.brooklynsteel.com/events and extract a list of upcoming events — for each event I need the name, date as ISO 8601, headlining artist, and ticket price in USD, returned as a JSON array matching this schema: {events: [{name, date, artist, ticketPriceUsd}]}."}],"resultDescription":"A JSON object that strictly matches the caller-supplied JSON Schema. Fields are populated by an LLM reading the source page or text, with no extra parsing step needed. The response is ready to use directly in application logic.","failureModes":["URL is not publicly accessible or returns a non-200 status — extraction fails with an error","Requested schema fields are not present in the source content — missing fields may be null or omitted","Source page is behind authentication or a JavaScript-heavy SPA — content may not be fully retrieved","Schema is malformed or too complex — LLM may produce incomplete or invalid JSON","Text input exceeds 400,000 character limit — request rejected","LLM hallucination of values not actually present in source — possible when instructions are ambiguous"],"whenToPreferThis":"Choose this endpoint when you have a specific JSON Schema in mind and want schema-constrained structured output from a URL or raw text without writing any parsing or post-processing code. It is especially valuable when the source is semi-structured or natural language (articles, product pages, job listings) and you need guaranteed-typed JSON back. Prefer alternatives if you only need raw page content (use a markdown fetch endpoint) or a plain summary (use a summarization endpoint).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:47:02.285Z","isFirstParty":false}