{"uid":"cap_QFQcG5kGTy6JQolhlfs3x","slug":"x402-web-extraction-structured-field-extractor-e04f82ab","name":"X402 Web Extraction - Structured Field Extractor","description":"Pay-per-request data tools for AI agents.","url":"https://x402.feld-feder.at/v1/web/extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","title":"WebExtractRequest","required":["url","fields"],"properties":{"url":{"type":"string","title":"Url","maxLength":4096,"minLength":1},"fields":{"type":"array","items":{"type":"object","title":"ExtractionFieldRequest","required":["name","selector_type","selector"],"properties":{"name":{"type":"string","title":"Name","maxLength":64,"minLength":1},"selector":{"type":"string","title":"Selector","maxLength":8192,"minLength":1},"selector_type":{"enum":["css","xpath"],"type":"string","title":"Selector Type"}},"additionalProperties":false},"title":"Fields","maxItems":100,"minItems":1}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"ResponseEnvelope[StructuredExtractionResult]","required":["data"],"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"type":"object","title":"StructuredExtractionResult","required":["fields"],"properties":{"fields":{"type":"array","items":{"type":"object","title":"StructuredFieldResult","required":["name","values"],"properties":{"name":{"type":"string","title":"Name"},"values":{"type":"array","items":{"type":"string"},"title":"Values"}},"additionalProperties":false},"title":"Fields"}},"additionalProperties":false},"cache":{"anyOf":[{"type":"object","title":"CacheInfo","required":["hit"],"properties":{"hit":{"type":"boolean","title":"Hit"},"age_seconds":{"type":"integer","title":"Age Seconds","default":0,"minimum":0}}},{"type":"null"}],"default":null},"source":{"anyOf":[{"type":"object","title":"SourceInfo","required":["requested_url","final_url","retrieved_at"],"properties":{"final_url":{"type":"string","title":"Final Url"},"status_code":{"anyOf":[{"type":"integer","maximum":599,"minimum":100},{"type":"null"}],"title":"Status Code","default":null},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash","default":null},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","default":null},"retrieved_at":{"type":"string","title":"Retrieved At","format":"date-time"},"requested_url":{"type":"string","title":"Requested Url"},"redirect_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Redirect Count","default":null}}},{"type":"null"}],"default":null},"_payment":{"anyOf":[{"type":"object","title":"PaymentInfo","required":["amount_usdc","network"],"properties":{"network":{"type":"string","title":"Network"},"amount_usdc":{"anyOf":[{"type":"number","minimum":0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount Usdc"},"transaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction","default":null}}},{"type":"null"}],"default":null},"warnings":{"type":"array","items":{"type":"object","title":"WarningInfo","required":["code","message"],"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}}},"title":"Warnings"},"provenance":{"type":"array","items":{"type":"string"},"title":"Provenance"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"fields":[]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","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_cNubd5AbYbQg-5L6UTGJ7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured data fields from a web page URL using CSS or XPath selectors, returning named field values as arrays of strings.","exampleAgentPrompt":"Go to https://news.ycombinator.com and extract the top story titles and their point scores using CSS selectors — '.titleline > a' for titles and '.score' for points — and return them as named fields 'title' and 'score'.","exampleUseCases":[{"title":"E-commerce price and title scraping","prompt":"Go to https://www.example-shop.com/product/widget-pro and extract the product name using the CSS selector 'h1.product-title' and the price using '.price-now', and return them as fields named 'product_name' and 'price'."},{"title":"News article metadata extraction","prompt":"Scrape https://techcrunch.com/2024/01/15/some-article/ and pull out the article headline using the CSS selector 'h1.article__title' and the author name using 'div.article__byline a', returning them as 'headline' and 'author'."},{"title":"Job listing details extraction","prompt":"From the job posting at https://jobs.example.com/posting/12345, extract the job title using XPath '//h1[@class=\"job-title\"]' and the salary range using XPath '//span[@data-field=\"salary\"]', and give me the results as 'job_title' and 'salary'."}],"resultDescription":"A JSON object with an 'ok' boolean and a 'data' object containing a 'fields' array. Each element in the array has a 'name' (matching the requested field name) and a 'values' array of strings containing all matched content for that selector. May also include cache metadata indicating whether the result was served from cache and its age.","failureModes":["URL unreachable or returns non-200 status — field values may be empty or error returned","Selector matches no elements — field returned with empty 'values' array","Malformed CSS or XPath selector — request rejected with validation error","URL exceeds 4096 character limit — request rejected","More than 100 fields requested — request rejected","Payment of $0.01 USDC not provided or rejected — 402 Payment Required response","Webpage requires JavaScript rendering — static extractor may miss dynamically loaded content"],"whenToPreferThis":"Choose this endpoint when you need to extract specific named fields from a known web page URL using precise CSS or XPath selectors, and you want structured, machine-readable output per field. Prefer this over general web search when you already know the page URL and the DOM structure. Best for structured scraping tasks where selector-based extraction is reliable (static HTML pages). Not suitable for JavaScript-heavy SPAs or full-page crawling.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T16:26:00.113Z","isFirstParty":false,"canonicalSlug":"x402-web-extraction-structured-field-extractor-e04f82ab"}