⏱️ Reading time: 9 min
Cloudflare stopped forcing AI agents to guess URLs or rely on outdated training data: as of October 2, 2026, they can search the web in real time with Web Search API, the new beta service that runs on AI Gateway.
📑 En este artículo
The API connects to three external search providers and charges each one’s list price, with no additional markup from Cloudflare. For any app or Worker already using AI Gateway, adding live search means one more call, not a brand-new integration.
TL;DR
- Cloudflare launched Web Search API in beta on October 2, 2026 for real-time search.
- Three providers available at launch: Ceramic.ai, Exa, and Linkup, all with Zero Data Retention.
- Runs on AI Gateway: it shows up in the logs and bills at the provider’s list price, with no extra markup.
- Developers can use their own provider API key instead of Cloudflare’s.
- The API is called via REST or from a Worker with the env.AI.websearch() binding.
What Web Search API Is
Web Search API is Cloudflare’s beta service that lets AI agents and applications run real web searches, instead of relying solely on the model’s trained knowledge. It runs inside AI Gateway and connects to external search providers under a single interface.
It doesn’t replace the language model: it complements it. The agent still reasons and writes with its usual LLM, but now it can request fresh search results mid-conversation and use them as context before responding.
What Happened
The announcement came on October 2, 2026 in Cloudflare’s official changelog. Web Search API became available in public beta, with no waitlist, for any account that already has an AI gateway configured.
At launch there are three providers to choose from: Ceramic.ai, Exa, and Linkup. All three support Zero Data Retention for requests made through Cloudflare and committed to the company’s verified bot crawling standards. That commitment matters because these are the same search engines that crawl the web to train and feed language models, and declaring how they crawl reduces friction with sites that block generic bots.
Context and History
AI Gateway has existed since 2024 as the layer Cloudflare placed between apps and language model providers. It centralizes logs, caching, spend limits, and retries for any LLM call, without the developer having to instrument anything themselves. Web Search API extends that same layer to a different problem: not inference, but retrieving current information.
The problem it tackles isn’t new. Language models have a training cutoff date, and without web access, they invent URLs or cite outdated data when asked about something recent. ChatGPT, Gemini, and Perplexity already give their agents the ability to search and read results before responding, using their own internal search engines.
This technique is known as retrieval-augmented generation, or RAG. Instead of relying only on the model’s weights, the system retrieves relevant external documents and injects them into the context before generating the final response. Cloudflare’s web search API applies that same idea, but uses the open web as its source instead of a private document base.
Cloudflare’s difference is that it didn’t build its own search engine. It packaged access to three external engines under a single bill and a single log panel, instead of competing with them.
Technical Details
Cloudflare’s web search API is just another endpoint within AI Gateway. The request comes in, Cloudflare routes it to the chosen provider, that provider searches its own index, and the response comes back in JSON with the results. The cost is charged to the account’s AI Gateway credit, at that provider’s list price, with no additional markup from Cloudflare. You can also use your own provider API key instead of paying through Cloudflare.
The direct call uses REST:
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/websearch/ \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"query": "What are some fun things to do in Salt Lake City as fall approaches?",
"provider": "ceramic",
"limit": 5,
"options": { "gateway": { "id": "default" } }
}'
That same call, from a Worker using the AI binding, reduces to a single method:
const response = await env.AI.websearch({
gatewayId: "default",
query: "What are some fun things to do in Salt Lake City as fall approaches?",
provider: "exa",
limit: 5,
});
const resultados = await response.json();
The provider parameter is the only thing that changes between Ceramic, Exa, and Linkup. The request shape is identical, so comparing result quality across providers doesn’t require rewriting code, just that string.
That price visibility is new. Until now, figuring out how much an external search provider charged meant checking each one’s documentation separately. With Cloudflare’s live search tool, the cost of every call lands in the same log a team already uses to audit language model spend.
flowchart TD
A["AI agent or app"] --> B["Cloudflare AI Gateway"]
B --> C["Provider: Ceramic, Exa, or Linkup"]
C --> D[("Provider index")]
D --> C
C --> B
B --> A
| Provider | Zero Data Retention | What sets it apart |
|---|---|---|
| Ceramic.ai | Yes, via Cloudflare | Provider used in the official documentation examples |
| Exa | Yes, via Cloudflare | Search engine built for AI agent consumption |
| Linkup | Yes, via Cloudflare | Third provider available from day one of the beta |
To confirm that a search went through Cloudflare’s live search tool, you need to check the gateway log in the Cloudflare dashboard, inside AI Gateway, under the Logs section. Every call shows up there with the provider used, the latency, and the cost charged. There’s no separate CLI command for this: the gateway log is the only documented way to verify it.
Impact and Analysis
The change matters because it moves search to the same place where inference costs already live. Before, connecting an agent to an external search engine meant a separate integration, a separate bill, and a separate log panel for each provider. Now, someone who already tracks token spend in AI Gateway sees how much they’re spending on search in the same panel.
The promise of not adding a markup over the provider’s price is unusual in a market where several agent platforms charge extra for each bundled service. Microsoft sells its own Bing Search API and Google has its Programmable Search Engine. Perplexity, for its part, charges for access to its internal search engine, and each one sets its own pricing structure.
The underlying problem is still the model’s cutoff date. An LLM trained up to a certain month doesn’t know what happened after that, and asking it about something recent pushes it to make things up. Connecting it to a real search doesn’t fix the model’s reasoning, but it does give it fresh data to reason about something verifiable instead of an approximate memory from its training.
💭 Key takeaway: Cloudflare didn’t build its own search engine for this. It bet on being the single point of billing and logs over third-party engines, the same way it already does with language models inside AI Gateway.
What’s Next
Cloudflare hasn’t published a date for taking Web Search API out of beta, nor confirmed whether it will add more search providers. The AI Gateway documentation does leave the door open to extending the catalog of connected services beyond language models.
For anyone already running agents on Cloudflare, the logical next step is to measure in production which of the three providers returns the best results for their use case. Switching from one to another costs no more than editing a parameter.
The clearest limitation today is that it’s still beta. Cloudflare doesn’t promise an SLA or guaranteed continuity for the three current providers, so it’s worth not building a critical flow that depends on just one without a backup plan.
Try it yourself: if you already have an AI gateway on Cloudflare, send a test search to the /ai/websearch/ endpoint with your favorite provider and check the result in the gateway log.
Frequently Asked Questions
Which providers does Web Search API support at launch?
Three: Ceramic.ai, Exa, and Linkup. All three run with Zero Data Retention when the request goes through Cloudflare, and you can choose which one to use with the provider parameter on each call.
How much does it cost to use Cloudflare’s web search API?
It’s charged to the account’s AI Gateway credit, at the list price each provider publishes, with no additional markup from Cloudflare. You can also use your own provider API key instead of paying through Cloudflare.
Do you need a Worker to use the search service for AI agents?
No. You can call it directly via REST at /accounts/{account_id}/ai/websearch/, or from a Worker with the env.AI.websearch() method of the AI binding.
What happens to the data Cloudflare’s live search tool processes?
Ceramic.ai, Exa, and Linkup committed to Zero Data Retention for requests that come in through Cloudflare, which means they don’t retain the query or the results beyond responding to the request.
Does AI Gateway Web Search replace a normal Google search?
It’s not meant for that. It’s an API for an agent or an app to call programmatically, not for a human user typing into a search box.
References
- Cloudflare Changelog: the official Web Search API announcement, with REST and Workers binding examples.
- Cloudflare AI Gateway Docs: documentation for the logging, caching, and billing layer the new service runs on.
- Exa: one of the three search providers available at launch.
- Linkup: the third search provider integrated in the beta.
📱 Do you like this content? Follow @programacion on Telegram for daily tech content in Spanish: quick summaries, fresh content every day.
Featured image: Foto de GuerrillaBuzz en Unsplash
Did it work for you? Got a different error? Say so below: questions get answered and help the next reader.
Leave a comment
0 Comments