One schema, many pages
Send up to ten URLs and get one result for each.
The extract API takes up to ten URLs and a JSON schema or a prompt, and returns the fields you asked for as typed JSON. Ask for confidence and each value comes with the passage it was drawn from. Extraction costs 5 credits for each URL that returns data.
{
"type": "object",
"properties": {
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"price": {
"type": "string"
},
"teams": {
"type": "string"
}
}
}
}
}
}{
"plans": [
{
"name": "Free",
"price": "$0",
"teams": "2 teams"
},
{
"name": "Basic",
"price": "$10 per user/month",
"teams": "5 teams"
},
{
"name": "Business",
"price": "$16 per user/month",
"teams": "Unlimited teams"
},
{
"name": "Enterprise",
"price": "Custom",
"teams": "Unlimited"
}
]
}{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"install": {
"type": "string"
},
"runtimes": {
"type": "array",
"items": {
"type": "string"
}
},
"features": {
"type": "array",
"items": {
"type": "string"
}
}
}
}{
"name": "Hono",
"install": "npm create hono@latest",
"runtimes": [
"Cloudflare Workers",
"Fastly Compute",
"Deno",
"Bun",
"Vercel",
"Netlify",
"AWS Lambda",
"Lambda@Edge",
"Node.js"
],
"features": [
"Ultrafast router (RegExpRouter)",
"First-class TypeScript support"
]
}01Options
curl https://api.hydrafetch.com/v1/web/extract \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://linear.app/pricing"],
"schema": {
"type": "object",
"properties": {
"plans": { "type": "array", "items": { "type": "object" } }
}
}
}'{
"data": {
"results": [
{
"url": "https://linear.app/pricing",
"data": {
"plans": [
{ "name": "Free", "price": "$0", "teams": "2 teams" },
{ "name": "Basic", "price": "$10 per user/month", "teams": "5 teams" }
]
},
"error": null
}
]
}
}02Handled
Send up to ten URLs and get one result for each.
Fix the shape yourself, or let a prompt describe it.
Ask for confidence and see the passage behind each field.
The same item on many pages merges into one row with its sources.
03Connect
For agents
One MCP server. Every endpoint is a tool.
Add Hydrafetch from your terminal.
claude mcp add --scope user --transport http hydrafetch https://api.hydrafetch.com/mcpStart Claude Code, run /mcp, choose hydrafetch and then Authenticate. Your browser opens: sign in, pick a workspace and approve.
Open Hydrafetch in Claude's connector directory and choose Connect.
Open in ClaudeSign in to Hydrafetch and approve in the window that opens.
Open Hydrafetch in ChatGPT's apps and choose Connect.
Open in ChatGPTSign in to Hydrafetch and approve.
Add Hydrafetch to ~/.cursor/mcp.json. Create the file if it does not exist.
{
"mcpServers": {
"hydrafetch": { "url": "https://api.hydrafetch.com/mcp" }
}
}Open Cursor Settings, then MCP. Hydrafetch asks you to sign in: choose Connect and approve in your browser.
Add Hydrafetch to .vscode/mcp.json in your workspace.
{
"servers": {
"hydrafetch": { "type": "http", "url": "https://api.hydrafetch.com/mcp" }
}
}Choose Start above the server in that file, then sign in and approve when VS Code asks.
Add Hydrafetch from your terminal.
codex mcp add hydrafetch --url https://api.hydrafetch.com/mcpStart Codex. The first time it uses Hydrafetch, your browser opens to sign in.
Add Hydrafetch from your terminal.
gemini mcp add hydrafetch --url https://api.hydrafetch.com/mcp --scope userStart Gemini CLI. The first time it uses Hydrafetch, your browser opens to sign in.
Open the MCP Servers panel and choose Configure to open the settings file.
Add Hydrafetch to it. Replace hf_your_key with a key from the API keys page.
{
"mcpServers": {
"hydrafetch": {
"type": "streamableHttp",
"url": "https://api.hydrafetch.com/mcp",
"headers": { "Authorization": "Bearer hf_your_key" },
"disabled": false,
"autoApprove": []
}
}
}Add Hydrafetch to your global OpenCode config.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"hydrafetch": { "type": "remote", "url": "https://api.hydrafetch.com/mcp", "enabled": true }
}
}Start OpenCode. It sees that Hydrafetch needs a sign-in and opens your browser.
For your code
An official client in 6 languages, or plain HTTP.
curl https://api.hydrafetch.com/v1/web/extract \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://linear.app/pricing"], "prompt": "The plans with name and price"}'import { Hydrafetch } from "@hydrafetch/node-sdk";
const hf = new Hydrafetch(process.env.HYDRAFETCH_API_KEY);
const { results } = await hf.extract(["https://linear.app/pricing"], {
prompt: "The plans with name and price",
});
console.log(results[0]?.data);from hydrafetch import Hydrafetch
hf = Hydrafetch()
out = hf.extract(
["https://linear.app/pricing"],
prompt="The plans with name and price",
)
print(out["results"][0]["data"])Working in a coding agent? Hand it this.
04Price
05Questions
JSON in the shape you asked for, one result for each URL. Give it a JSON Schema for fixed field names and types, a prompt to describe the fields, or both.
5 credits for each URL that returns data. A URL that fails is not charged.
Set showConfidence. Each field then comes with a confidence score and the exact passage of the page it was drawn from, and a field the page does not carry comes back null.
Yes. End a URL with /* and every page found under that path is extracted. Set mergeEntities to get one deduplicated row per item, with the pages that contributed to it.
Use the structured format on the scrape API. It returns the page's own data as the site published it, at the price of a normal page read.