Skip to main content
Prefetch speaks the Model Context Protocol, so an AI agent can call the API directly instead of you writing HTTP glue for it. There is nothing to install. The MCP server is the API — one endpoint, POST /mcp, authenticated with the same key you already use.

Connect

Verify it connected:
Put your key in your client’s secret storage or an environment variable — never in the URL. URLs end up in logs, shell history, and shared config files.

Try it

Once connected, ask for what you want in plain language:
Get me the brand colors and industry category for stripe.com
Find every pricing page on vercel.com and summarise what changed
Crawl the /docs section of fastapi.tiangolo.com and list the endpoints it documents
Your agent picks the right tool, calls it, and reads the result.

The ten tools

See the tool reference for every parameter. Credits work exactly as they do over REST — same costs, same “only successful requests are charged” rule. See Credits.

How crawling works

A crawl takes minutes, which is longer than an agent wants to sit on a tool call. So prefetch_crawl starts the crawl and waits for it, up to wait_seconds (60 by default). If the crawl finishes in time, you get the pages back immediately. If it does not, you get the crawl id and an instruction:
Two things worth knowing:
  • Polling is free. Pages are billed as they complete, claimed atomically, so checking twice never charges twice.
  • Disconnecting cancels the crawl. If your client hangs up while prefetch_crawl is still waiting, the crawl is stopped rather than left running and billing pages nobody will read.

Response size

Tool results go straight into your agent’s context window, so content is capped at 50,000 characters per result — well below the 1 MB cap the REST API uses. A full Wikipedia article in raw_html is roughly 240,000 characters; one uncapped call like that would crowd out most of what the agent knows. Truncation is always announced, never silent:
To fit more signal into less space:

Target the content

Pass include_selectors with the part of the page you actually want, like ["article"].

Ask for a summary

Use formats: ["summary"] instead of ["markdown"] when you only need the gist.

Errors

Failures come back as readable tool results rather than transport faults, so your agent can read the message and correct itself:
Authentication is the exception and fails at the HTTP layer: 401 with no key, 403 with an invalid one. See Error handling for the full list.

Good to know

Both run the identical pipeline, so credits, caching, rate limits, and the blocklist behave the same either way. An MCP scrape even hits the cache a REST scrape warmed, because both build the same cache key.
Every request is self-contained — there are no MCP sessions to manage. All ten tools are one-shot request/response, so nothing is lost. GET and DELETE on /mcp return 405; use POST.
RapidAPI meters usage from a response header that has to be set before the response body is written, and over MCP the cost of a call is not known until after the tool has run. Rather than under-bill silently, /mcp returns 400 for RapidAPI traffic.Everything is available over REST through RapidAPI exactly as documented. MCP needs a direct Prefetch key from the dashboard.
Each tool’s description tells the agent when to reach for it and when to reach for something else, so this mostly takes care of itself. Two patterns are worth knowing:
  • prefetch_enrich beats three separate calls. It is one page fetch instead of three, and costs less than prefetch_brand + prefetch_company + prefetch_classify combined.
  • Map then scrape usually beats crawling. prefetch_map is cheap and tells you which pages exist; scraping the three you actually want costs far less than crawling fifty.

Next steps

Tool reference

Every tool, every parameter.

Credits

What each call costs.

Authentication

Keys, headers, and error codes.

REST API

The same capabilities over HTTP.