Pages arrive as they finish
Poll for progress, or get a callback for every page.
The crawl API takes a starting URL, follows the site's links and returns every page as clean markdown, up to 500 pages a crawl. It runs in the background and tells you as each page finishes. A page read costs 1 credit, and a page we cannot read costs nothing.
6 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",
"seedUrl": "https://hono.dev/docs/api",
"completed": 6,
"failed": 0,
"creditsUsed": 6,
"pages": [
{
"url": "https://hono.dev/docs/api/context",
"depth": 1,
"discoveredVia": "link"
}
]
}01Options
curl https://api.hydrafetch.com/v1/web/crawl \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hono.dev/docs/api",
"limit": 6,
"maxDepth": 2
}'{
"crawlId": "01a21cea-2774-7006-81c1-2132d0ff39ec",
"status": "queued"
}02Handled
Poll for progress, or get a callback for every page.
A crawl of /docs stays under /docs unless you say otherwise.
The limit is the most a crawl can cost.
Formats, freshness and country apply across the crawl.
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/crawl \
-H "X-API-Key: $HYDRAFETCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://hono.dev/docs/api", "limit": 6}'import { Hydrafetch } from "@hydrafetch/node-sdk";
const hf = new Hydrafetch(process.env.HYDRAFETCH_API_KEY);
const crawl = await hf.crawlAndWait("https://hono.dev/docs/api", {
limit: 6,
});
for (const page of crawl.pages) console.log(page.url);from hydrafetch import Hydrafetch
hf = Hydrafetch()
crawl = hf.crawl("https://hono.dev/docs/api", limit=6)
for page in crawl["pages"]:
print(page["url"])Working in a coding agent? Hand it this.
04Price
05Questions
It starts at a URL, follows the links on the site and returns each page 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. The limit you set is the most a crawl can cost.
A crawl runs in the background and returns an id straight away. Poll that id for progress and pages, or register a webhook and receive each page as it finishes.
Yes. A crawl stays in the section of its starting URL by default, and includePaths, excludePaths and maxDepth narrow it further.
When you want to choose pages before paying to read them. Map lists the URLs for one credit, and you can then read only the ones you pick.