# FetchFox — Web scraping API and MCP server

Convert web pages to Markdown, crawl matching URLs, and extract structured data from product listings or job postings with one shared template.

REST API: https://api.fetchfox.ai/api/
MCP endpoint (Streamable HTTP): https://api.fetchfox.ai/mcp

## Get access

Developers can [get an API key](https://fetchfox.ai/dashboard). Agents can follow [auth.md](https://fetchfox.ai/auth.md) to request owner approval for a scoped bearer token. Set FETCHFOX_API_KEY in your shell to the credential you intend to use.

The first 100 verified owners can claim $100 each in agent credits. Agents approved by the same owner share that balance.

## Convert a website to Markdown

Visit reads one URL. The page text is in results[0].markdown.body.

```sh
curl -sS https://api.fetchfox.ai/api/visit \
  -H "Authorization: Bearer $FETCHFOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://fetchfox.ai/docs/mcp",
  "include": [
    "markdown"
  ]
}'
```

## Extract structured data from multiple pages

Extract applies one template to both product pages. Read the title and price for each book from results.items.

```sh
curl -sS https://api.fetchfox.ai/api/extract \
  -H "Authorization: Bearer $FETCHFOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urls": [
    "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
    "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"
  ],
  "template": {
    "title": "Exact book title",
    "price": "Displayed price including currency"
  },
  "perPage": "one"
}'
```

## Discover tools over MCP

Run this in a shell with Node.js and npm. The official MCP client connects over Streamable HTTP and lists tools without an API key.

```sh
npm install @modelcontextprotocol/sdk@1
node --input-type=module <<'JS'
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const client = new Client({ name: 'fetchfox-example', version: '1.0.0' });
await client.connect(new StreamableHTTPClientTransport(
  new URL('https://api.fetchfox.ai/mcp')
));
try {
  const { tools } = await client.listTools();
  console.log(tools.map(tool => tool.name));
} finally {
  await client.close();
}
JS
```

## Resources

- [API reference](https://fetchfox.ai/docs/api)
- [MCP guide](https://fetchfox.ai/docs/mcp)
- [Tool catalog (JSON)](https://fetchfox.ai/docs/tools.json)
- [Agent signup (auth.md)](https://fetchfox.ai/auth.md)
- [Documentation index (llms.txt)](https://fetchfox.ai/llms.txt)

[JavaScript SDK and CLI on GitHub](https://github.com/fetchfox-ai/fetchfox) · [Pricing](https://fetchfox.ai/#pricing)

