Introducing Web Search API via AI Gateway

Cloudflare announced a Web Search API delivered through its AI Gateway, launching with three search partners: Ceramic.ai, Exa, and Linkup. The company framed the product as a fix for a common agent failure mode, in which an agent that needs a live page guesses a URL and issues a fetch tool call, sometimes landing on a 404 Not Found when the guess is wrong. The Web Search API instead lets an agent issue a search query and receive structured snippets from the live web that can be injected into a model's context.
Cloudflare positions this as a dynamic context layer for inference pipelines. Models are trained and frozen at a point in time, so they operate only on information that existed before a knowledge cutoff, which makes recent events, changing APIs, and fast-moving news hard to discuss. By retrieving fresh results and grounding responses on them, applications can answer about things the base model never saw.
The flagship integration point is AI Gateway, which Cloudflare describes as the control plane for applications, bundling observability, unified billing, security, and access controls. Web search calls show up in existing AI Gateway observability logs, and queries draw down from the AI Gateway credit balance. Cloudflare says it offers web search directly at the partners' list API pricing with no additional markup, and that it will identify partners supporting Zero Data Retention so customers know their data is not retained. Bring-Your-Own-Key is supported for web search providers, matching how Cloudflare handles model inference providers, so teams can reuse existing provider accounts and organizational setup.
There are two main ways to call the product today besides the gateway itself. A direct REST endpoint accepts an AI Gateway token, a provider name, a query, a result limit, and a gateway identifier. Cloudflare's published example posts to the account-scoped path /client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/websearch/ with a JSON body containing a query, provider "ceramic", limit 5, and options.gateway.id set to "default". Outcomes are returned as web search results. For teams building on Cloudflare Workers, a binding is available: calling env.AI.websearch with a gatewayId, query, provider such as "exa", and a limit, then reading the JSON from the response.
Cloudflare also outlined a server-tools roadmap. Native Server Tools are being built into AI Gateway so developers will not have to define the tool schema by hand; web search is slated to be among the first tools in that stack. Until then, the announcement shows how to wire web search as a self-orchestrated server tool: run a model such as @cf/google/gemma-4-26b-a4b-it with a function tool named web_search, read completion.tool_calls[0], call env.AI.websearch with the arguments from the tool call, and send the serialized results back to the model as a tool message for a final response.
On governance, Cloudflare said its search partners have committed to its bot crawling standards. The provider's crawler must comply with Cloudflare's publicly stated requirements for Verified bots, and search responses must include a link to the location of the crawled content. Cloudflare described the rules as net-positive for a fair Internet and as giving creators a say in how their data is used, and said partners uphold the standards by identifying crawlers, respecting robots.txt, and supplying the source of results. This matters to site owners because search-grounded agents depend on crawlable content, and the verification and attribution requirements are the mechanism Cloudflare is using to keep that pipeline transparent.
In practice, adding search retrieval changes the shape of an agent loop. Instead of a blind fetch, the model produces a query, retrieval returns citable snippets, and the final answer is conditioned on them. That can reduce 404 loops and hallucinated URLs, and it also means answers carry source links, which is useful for verification. The trade-offs developers should weigh include added latency from a search round trip, per-query cost drawn from gateway credits, and the fact that result quality and freshness now depend on the selected provider, so teams may want to compare Ceramic.ai, Exa, and Linkup rather than committing to one. Relying on third-party snippets also means grounding quality is only as good as the retrieved passages, and any prompt-injection risk present in web content remains a consideration for agents that act on retrieved text.
Pricing is stated as provider list pricing with no Cloudflare markup, and billing flows through AI Gateway credits. Those with BYOK arrangements can use their own provider keys. Web search can be tried through AI Gateway, the standalone REST API, the Workers binding, and the AI Playground with an AI Gateway account and key; Cloudflare says other formats will follow.
Why it matters: Teams building agents on Cloudflare can now add live web grounding with a REST call or a Workers binding rather than shipping their own search-scraping and URL-guessing logic, and can meter, log, and gate provider access through AI Gateway alongside model inference. The bot-standard commitments also set expectations for site owners whose content grounds these answers. The main open questions, based on what Cloudflare has disclosed, are how providers compare on freshness and relevance, and how server tools change the integration once they ship.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Cloudflare AI Gateway now supports native web search API integration in partnership with Ceramic.ai, Exa, and Linkup. Developers can now inject real-time web context into model inference calls via AI Gateway, REST APIs, or Workers bindings.