Cloudflare Web Search API: Providers, Pricing, Setup and Examples
Quick answer: Cloudflare’s Web Search API is a beta search layer for AI agents and applications that returns normalized web results through AI Gateway. It lets developers call supported search providers including Ceramic.ai, Exa and Linkup through one interface, while using Cloudflare’s logging, analytics, billing controls and security tooling.
What is Cloudflare Web Search API?
Cloudflare Web Search is a new API designed for applications that need current information from the public web. Instead of integrating several search vendors separately, developers can send a request to a Cloudflare endpoint, choose a provider, and receive a consistent result format containing fields such as title, URL and description.
The feature is currently in beta, so interfaces, provider availability and pricing behavior can change. Production teams should pin their integration to current documentation and monitor Cloudflare’s changelog before depending on it for critical workloads.
Why this matters for AI agents
Language models have fixed training cutoffs and can hallucinate when asked about current events, prices, documentation or niche facts. A web-search tool gives an agent a way to retrieve fresh sources before answering. The useful part of Cloudflare’s approach is that search is integrated with AI Gateway rather than deployed as a completely separate infrastructure stack.
That means a team can place search alongside model calls, track usage, apply access policies and inspect request behavior from one Cloudflare account.
Supported search providers
Cloudflare’s current beta documentation lists three provider options:
| Provider | Best fit | Notes |
|---|---|---|
| Ceramic.ai | General web retrieval | Available through the unified provider interface |
| Exa | Semantic and AI-oriented search | Useful for research agents and discovery |
| Linkup | Web search for LLM applications | Available through the same normalized response layer |
Provider support may expand during the beta. Developers should avoid hard-coding business logic that assumes this exact list will remain unchanged.
How pricing works
Cloudflare says Web Search requests use AI Gateway credits at the selected provider’s list API price, with no additional Cloudflare markup for the search itself. Developers can also use their own provider credentials where supported.
This creates two practical billing patterns: use Cloudflare-managed credits for a simpler setup, or bring a provider key when an organization already has a direct commercial relationship or negotiated quota.
Always verify live prices with the provider and Cloudflare before estimating a production budget, because beta pricing and provider plans can change.
API endpoint and permissions
The REST interface is exposed under an AI web-search endpoint such as POST /ai/websearch/. Cloudflare also documents a Workers AI binding path for applications already running on Workers.
Current setup requires account permissions that include Workers AI read access and AI Gateway read access. Organizations using scoped API tokens should grant the minimum permissions needed rather than reusing a broad account-wide token.
Basic request workflow
- Create or select an AI Gateway in your Cloudflare account.
- Enable the permissions required for Web Search.
- Choose a supported provider.
- Send the user’s query to the Web Search endpoint.
- Read the normalized results.
- Pass only the useful snippets or fetched pages into your language model.
- Store source URLs so the final answer can cite where its information came from.
Example architecture for a research agent
A robust research agent can use the following pipeline:
- Query planning: the model rewrites a broad user question into focused search queries.
- Web Search: Cloudflare retrieves candidate pages from the selected provider.
- Filtering: the app removes duplicates and low-authority results.
- Source fetch: the most promising pages are fetched and parsed.
- Grounded generation: the model answers only from retrieved evidence.
- Citation: the application returns URLs with the answer.
This is preferable to pasting every search result into a model. Search results are discovery signals; the strongest applications still verify the underlying pages when accuracy matters.
Structured response format
A unified result shape is one of the main developer benefits. Without an abstraction layer, changing providers can require rewriting parsers, error handling and ranking logic. Cloudflare normalizes core fields so the rest of an application can remain more stable.
You should still preserve provider-specific metadata when it has value. A normalized schema can hide useful signals such as ranking scores, publication dates or content categories if an application discards them too early.
Privacy and Zero Data Retention
Cloudflare says requests processed through its layer support Zero Data Retention behavior on Cloudflare’s side. The company also says participating providers commit to its verified-bot standards. Developers should still review each provider’s terms, because privacy obligations depend on the full data path, not only Cloudflare’s portion.
Do not send secrets, passwords, private customer records or confidential source material in web-search queries unless your legal and security teams have explicitly approved the design.
Cloudflare-managed key vs bring your own key
| Approach | Advantages | Considerations |
|---|---|---|
| AI Gateway credits | Fast setup, centralized usage | Dependent on Cloudflare credit/billing flow |
| Bring your own provider key | Existing provider contract and quota | More credential management |
What should developers measure?
Search quality is not simply “did the request succeed?” A production evaluation should track:
- relevance of the top results;
- freshness for breaking queries;
- coverage of niche or technical topics;
- duplicate-result rate;
- latency;
- cost per successful grounded answer;
- citation accuracy;
- provider-specific failure rates.
Run the same benchmark queries through several providers before selecting a default. The cheapest provider can be more expensive overall if poor retrieval forces more searches or produces bad answers.
Common implementation mistakes
Sending only one broad query
Complex questions often need several searches. Query decomposition usually produces better evidence than a single long search string.
Treating snippets as authoritative
A snippet may be truncated or out of context. For high-stakes claims, retrieve and verify the source page itself.
Ignoring prompt injection on retrieved pages
Web pages are untrusted input. An agent should never treat page text as system instructions or allow retrieved content to override tool permissions.
Failing to cite sources
If search is used to ground a factual response, preserve the URLs and surface them to the user wherever possible.
Who should use Cloudflare Web Search?
The beta is most attractive for teams already using Workers or AI Gateway, especially research assistants, support agents, coding tools, shopping/search products and monitoring systems. A small application using only one search vendor may prefer a direct integration if it does not need Cloudflare’s gateway layer.
Related AVARIXO coverage
For another current Cloudflare incident and infrastructure explainer, see our October 6 Cloudflare outage timeline. Developers building AI workflows can also see our OpenAI Decisions API guide, our ChatGPT custom MCP servers update, and the llama.cpp v0.6.0 guide.
Frequently asked questions
Is Cloudflare Web Search generally available?
No. The current product is documented as a beta.
Which providers are supported?
Current documentation lists Ceramic.ai, Exa and Linkup.
Does Cloudflare add a markup to provider search pricing?
Cloudflare says requests use provider list API pricing through AI Gateway credits without an additional search markup. Check current billing docs before production use.
Can I use my own search-provider key?
Cloudflare documents a bring-your-own-key path for supported providers.
Sources
Features and setup were verified against Cloudflare’s official Web Search documentation, usage guide, and launch announcement.
