Pages arrive as they finish
Nothing waits for the slowest page in the list.
The batch API takes a list of URLs, up to 25,000 in one request, and reads each one as clean markdown in the background. Poll for the pages or have each one sent to you as it finishes. A page read costs 1 credit, and a page we cannot read costs nothing.
5 completed0 failed
# Context
The `Context` object is instantiated for each request and kept until the response is returned. You can put values in it, set headers and a status code you want to return, and access HonoRequest and Response objects.
## status()
You can set an HTTP status code with `c.status()`
{
"status": "completed",
"completed": 5,
"failed": 0,
"creditsUsed": 5
}01Options
curl https://api.hydrafetch.com/v1/web/batch \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://hono.dev/docs/api/hono",
"https://hono.dev/docs/api/routing"
]
}'{
"batchId": "019e8a3c-9f0b-7c12-88ab-1d2e3f4a5b6c",
"status": "queued"
}02Handled
Nothing waits for the slowest page in the list.
Read progress when you like, or get a callback per page.
You pay for the pages that came back.
Map the site first, then send the pages you picked.
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/batch \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://hono.dev/docs/api/hono", "https://hono.dev/docs/api/routing"]}'import { Hydrafetch } from "@hydrafetch/node-sdk";
const hf = new Hydrafetch(process.env.HYDRAFETCH_API_KEY);
const batch = await hf.batchAndWait([
"https://hono.dev/docs/api/hono",
"https://hono.dev/docs/api/routing",
]);
for (const page of batch.pages) console.log(page.url);from hydrafetch import Hydrafetch
hf = Hydrafetch()
batch = hf.batch([
"https://hono.dev/docs/api/hono",
"https://hono.dev/docs/api/routing",
])
for page in batch["pages"]:
print(page["url"])Working in a coding agent? Hand it this.
04Price
05Questions
It reads a list of URLs you already have. Each page comes back as clean markdown with its quality signal and metadata, the same as a single scrape.
1 credit for each page read and nothing for a page we cannot read.
Up to 25,000 in one request. Entries that are not valid URLs are skipped and returned to you in invalidUrls.
A batch returns an id straight away. Poll that id for progress and pages, or register a webhook and receive each page as it finishes.
When you do not have the URLs. Crawl starts from one page and follows the links, while batch reads exactly the list you send.