Cloudflare quietly shipped one of the more useful pieces of agent infrastructure this month. The new Cloudflare Web Search API went into open beta on October 2, and it does something simple: it gives an AI agent live web results in a predictable format, billed and logged through the same place the agent’s model calls already go.
Search is the part of every RAG and agent stack that nobody wants to own. The model is easy. The vector store is a solved problem with five competing answers. But the actual “go look this up on the internet” step usually means signing up with a search vendor, managing their API key, parsing their proprietary result shape, and wiring their telemetry into your own dashboards. Cloudflare’s bet is that you’d rather skip all of that, and they’re probably right.
What you actually get
The API is a REST endpoint under the AI Gateway product: POST /client/v4/accounts/{account_id}/ai/websearch/. You send a query (up to 1024 characters), a result limit between 1 and 10, and an optional provider. What comes back is normalized across providers: each result has a url, a title, an optional description, and metadata including latency. If you’re already running Workers, there’s a binding for that too: env.AI.websearch() does the same thing without you managing an HTTP client.
Because it runs through AI Gateway, the searches land in the same logs and analytics as your model inference calls. That sounds minor until you’ve tried to answer “why did the agent spend 40 seconds before answering” across a search vendor, a model provider, and your own tracing glue. One log stream for both is genuinely nicer.
Authentication is a Cloudflare API token with Workers AI and AI Gateway read permissions. Requests draw down AI Gateway credits, or you can bring your own provider key, which Cloudflare stores encrypted through Secrets Store. The BYO path matters if you already have an Exa or Linkup account and don’t want to reprice your budget around Cloudflare’s billing.
Three providers, one response shape
At launch there are three search providers, and the differences between them are worth caring about:
- Ceramic.ai, the default, runs an independent index of over 40 billion pages and costs $0.25 per 1,000 requests. It returns long descriptions, up to 8,000 characters, which is handy when the agent needs context without a follow-up fetch.
- Exa costs $7.00 per 1,000 requests and runs its auto search type, returning page highlights as the result description. This is the quality option for query-relevant snippets.
- Linkup costs $5.00 per 1,000 requests and uses its fast search depth, returning raw results without a generated answer.
Cloudflare bills at provider list price with no markup, which is the honest way to do this. Every provider has also committed to Cloudflare’s verified bot standards and to returning a source link per result, which is a small governance win: agents citing pages they actually visited is better than the alternative.
One caveat worth flagging. The changelog says all three providers support Zero Data Retention, but the providers reference table currently lists Exa’s ZDR as No. If your data handling requirements are strict, check the table rather than trusting the blanket claim. That kind of inconsistency is normal in a beta, but it’s the sort of thing that matters the one time you skip the check.
How it stacks up
The obvious comparison is Brave Search API, which charges $5 per 1,000 requests with $5 in monthly free credits and has an AI-optimized endpoint. Serper sells Google SERP queries from roughly $1.00 down to $0.30 per 1,000 depending on tier. On raw price, Ceramic at $0.25 per 1,000 undercuts both.
Price is the wrong axis to compare on, though. The providers optimize for different things: Ceramic for cheap high-volume lookups, Exa for snippets that actually answer the query, Linkup for fast cited calls. Independent quality benchmarks are still sparse, so the practical move is to run your own queries against two providers and read the results yourself. The nice part of Cloudflare’s design is that comparing costs you a one-parameter change.
What Cloudflare is really selling isn’t search quality. It’s the removal of an integration. You get one endpoint, one bill, one log stream, one key store, and the ability to swap vendors without touching your agent code. For a solo developer or a small team, that’s the difference between adding grounded search in an afternoon and putting it on the backlog for a quarter.
Where this goes
Cloudflare says native Server Tools are coming to AI Gateway, with web search as one of the first. That points toward a future where the tool-calling harness, the search provider, and the model all live behind one gateway, and you stop writing the JSON-schema tool definition yourself. For anyone who has hand-rolled a function-calling loop around search recently, that’s a welcome bit of boredom.
Getting started
It’s in open beta now. Create an AI Gateway if you don’t have one, add credits or a provider key, grab an API token with the two read permissions, and point a Worker at env.AI.websearch(). The usage docs include a full example wiring search into a model’s tool set with a Workers AI model, which is enough to get a grounded agent answering questions in under an hour. Watch your spend in the gateway analytics while you tune the limit parameter; there’s no reason to pay for ten results when five does the job.