Type the untyped, with the receipts.
A JSON schema in, typed records out, and the passage each value was drawn from.
What it costs
- Per URL extracted
- 5 credits
- A page that could not be read
- Free
- The page’s own structured data
- 1 credit
[ The problem ]
Selectors rot and models invent
Hand-written selectors break the week a site redesigns. Handing raw HTML to a model instead trades that for a subtler problem: output that is well-formed, plausible, and occasionally not on the page at all.
- CSS selectors are per-site work that has to be redone on every redesign
- A model given raw HTML will fill a required field whether or not the page supports it
- Without provenance you cannot tell a real value from a confident guess
Step 01
Send your schema with the URLs. The shape you describe is the shape you get back.
curl -X POST https://api.hydrafetch.com/v1/web/extract \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com/pricing"],
"schema": {
"type": "object",
"properties": {
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"monthlyUsd": { "type": "number" }
}
}
}
}
},
"showSources": true,
"showConfidence": true
}' Step 02
Every field can carry the passage it came from and a confidence figure, so you can gate on evidence instead of trusting the whole record.
const { data } = await res.json();
const trusted = data.json.plans.filter((plan, i) => {
const field = data.sources?.[`plans[${i}].monthlyUsd`];
return field && field.confidence > 0.8;
}); [ Worth knowing ]
If a page publishes its own structured data, a plain scrape returns it for one credit with no model involved. Reach for extract when the page does not.
Pass several URLs in one call and mergeEntities will reconcile records that describe the same thing.
Other use cases
RAG pipelines
Crawl a whole site on a schedule and pipe clean Markdown straight into your embeddings.
Agents
Search mid-conversation and get results that are already scraped, not a list of links to go and fetch.
Brand data
Logos that work on light and dark, the real colours ranked by how the site uses them, fonts and socials.
[ Start ]
Clean web data is one call away.
250 free credits, no card required. Failures are never billed.