UStackUStack
Cloudflare Web Search API icon

Cloudflare Web Search API

Cloudflare Web Search API gives AI agents and applications live web search through AI Gateway, returning structured URLs, titles, and descriptions for grounding responses in current information. It supports Ceramic.ai, Exa, and Linkup through REST or the Workers AI binding.

Cloudflare Web Search API

Cloudflare Web Search API

Cloudflare Web Search API is an open-beta API for giving AI agents and applications access to live web search. It routes searches through AI Gateway and returns structured results—titles, URLs, and descriptions—so applications can ground model responses in current web information rather than relying only on a model’s training data or guessed URLs.

The service supports Ceramic.ai, Exa, and Linkup through a shared request interface, and can be used from any backend with the REST API or from a Cloudflare Worker through the Workers AI binding. Search requests are included in AI Gateway logs and analytics, while billing can use AI Gateway credits or a provider key stored on the gateway.

Web Search API features

Multiple search providers

Choose Ceramic.ai, Exa, or Linkup with one provider parameter. Each provider returns a common result format, allowing provider changes without changing the rest of the integration.

Gateway observability

Searches are routed through AI Gateway and appear alongside model inference requests in gateway logs and analytics, with the gateway's access controls and operational visibility.

Flexible billing paths

When using AI Gateway credits, searches are charged at the selected provider's list API price with no additional markup. Existing provider accounts can be used through stored gateway keys instead.

Structured, cited results

Results include source URLs, titles, and descriptions that can be passed into a model context. Provider-specific descriptions may be long page descriptions, highlights, or raw search-result snippets.

Agent and application workflows

The API can be called from backend applications through REST or from Workers using the AI binding. A model can also invoke a web_search tool that triggers a search and returns results for a follow-up completion.

Provider-specific data and crawling terms

Ceramic.ai and Linkup are listed with Zero Data Retention, while Exa is listed without Zero Data Retention in the provider comparison. All three providers commit to Cloudflare's verified bot requirements.

Web Search API use cases

  • Grounding agent answers

    Define a web_search tool for a model, execute the requested search through Web Search API, and pass the structured results into a follow-up model completion.

  • Current-information applications

    Use current web results to answer questions about events, places, products, or other subjects where information may have changed since a model’s training data was collected.

  • Provider-tailored retrieval

    Run repeated searches from an agent workflow and select a provider based on the desired result style, such as long descriptions, query-relevant highlights, or fast raw snippets.

  • Cited application results

    Use the returned URLs, titles, and descriptions as a source-aware retrieval layer for applications that need to show or retain links to the web pages behind generated responses.

Pros and Cons

Pros

  • A single API interface supports three search providers and a common result format.
  • REST and Workers AI binding access support both general backend applications and Cloudflare Worker deployments.
  • AI Gateway logging and analytics provide visibility into search requests alongside model inference traffic.
  • Responses include source links and descriptions that can be supplied directly to an AI model for grounding.

Cons

  • The product is documented as being in open beta, so production suitability should be evaluated against the current beta documentation and operational requirements.
  • Provider behavior and data terms differ: for example, Exa is listed without Zero Data Retention, while Ceramic.ai and Linkup are listed with it.
  • Search results are limited to 10 per request, and the API requires an AI Gateway plus either credits or configured provider credentials.

FAQ

What is required to start using Web Search API?

You need a Cloudflare account, an AI Gateway, and either AI Gateway credits or a provider API key stored on the gateway. REST API requests require a Cloudflare API token with Account > Workers AI > Read and Account > AI Gateway > Read permissions.

How can I call Web Search API?

You can send a POST request to the /ai/websearch/ endpoint from any backend, or call websearch() through the Workers AI binding from a Worker. Both routes use an AI Gateway.

What does Web Search API return?

A request returns a standard Response object. After parsing it with response.json(), the response contains items with a URL, title, and description, plus metadata such as the query, request ID, and latency when provided by the provider.

Which search providers and result limits are supported?

Set the provider parameter to ceramic, exa, or linkup. If you omit it, Ceramic.ai is used by default. The limit parameter accepts from 1 to 10 results and defaults to 10.

Can I use my own provider API key?

Yes. Store a provider key and alias in the AI Gateway Provider Keys settings, then pass the provider and byokAlias in the request. With BYOK, the provider bills you directly. If byokAlias is explicitly set but unavailable, the request fails rather than falling back to AI Gateway credits.

Quick Facts

Category
AI developer tool
Platform
Cloudflare AI Gateway and Workers AI
Availability
Open beta
Providers
Ceramic.ai, Exa, and Linkup
Access methods
REST API and Workers AI binding
Default provider
Ceramic.ai

Альтернативы Cloudflare Web Search API

ClayHog icon

ClayHog

ClayHog — платформа для AI-поиска, которая помогает отслеживать видимость бренда в ChatGPT, Gemini, Perplexity, Claude и Google AI Overviews из одной панели.

Grok AI Assistant icon

Grok AI Assistant

Grok — это бесплатный ИИ-помощник, разработанный xAI, который ставит во главу угла правдивость и объективность, предлагая расширенные возможности, такие как доступ к информации в реальном времени и генерация изображений.

qbrin icon

qbrin

qbrin is an enterprise AI search and governed agent platform that turns company knowledge into cited answers and can abstain when evidence is missing. It is built for teams that need source-backed responses, policy controls, and traceable AI actions.

Octen icon

Octen

Octen is a search infrastructure product for AI applications that need live web context, structured answers, and retrieval tools for agents, copilots, and chatbots. It combines search, extraction, multimodal retrieval, and developer access paths such as API, SDKs, Skills, MCP, and CLI.

Scite icon

Scite

Scite — AI-платформа для поиска статей, проверки контекста цитирования и ответов на основе научной литературы.

Wikiwand icon

Wikiwand

Агрегатор вики на основе ИИ, созданный для улучшения пользовательского опыта на Wikipedia путем упрощения потребления знаний.