deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Cloudflare's beta Web Search API routes AI agents through Ceramic, Exa and Linkup

Cloudflare's new beta Web Search API fronts three third-party search providers through AI Gateway. Before building on it, developers should weigh unverified pricing and provider terms on storing results.

Cloudflare's beta Web Search API routes AI agents through Ceramic, Exa and Linkup

What Cloudflare actually shipped

On October 2, according to a dev.to write-up, Cloudflare moved a Web Search API into beta, and the story drew immediate attention, passing 540 points on Hacker News within a day. The most useful clarification the post makes is what the product is not: Cloudflare did not build its own search index. The API is a routing layer that forwards queries to one of three third-party providers at launch: Ceramic.ai, Exa and Linkup.

Every request runs through AI Gateway, so search traffic lands in the same logs as the rest of your gateway activity. Citing Cloudflare's changelog, the post reports that billing happens through AI Gateway credits at each provider's standard rate, with no Cloudflare markup, that you can attach your own provider keys, and that all three providers support Zero Data Retention for requests arriving via Cloudflare. In practice, that means one set of credentials, one billing view and one log stream sitting in front of three swappable search backends.

How you call it

There are two integration paths. Over REST, you POST a JSON payload containing a query, a provider name, a result limit and a gateway identifier to an accounts-scoped ai/websearch/ endpoint. Inside a Worker, the same call is available as a binding: env.AI.websearch(). Because the provider is just a parameter, the post notes, moving from one backend to another is a one-string edit.

That design also enables a fallback pattern the author sketches: attempt the cheapest provider first, catch any failure, then try the next provider in line, and inspect gateway logs afterwards to see which one actually served the traffic. The routing logic lives outside the agent itself.

Pricing signals, none of them confirmed

The changelog, as reported by the post, labels the API beta and publishes no pricing tiers, rate limits or regional availability. The only numbers available come from Hacker News commenters and should be treated as unverified: roughly $0.25 per 1,000 requests for Ceramic.ai, which drew quality complaints, and around $7 per 1,000 for Exa. The post also references other recent roundups that place Brave's search API near $5 per 1,000 requests and Exa somewhere between $5 and $15 depending on what you retrieve.

That is a gap of roughly 28x between the cheapest and mid-tier option. For an agent that fires ten searches per task, the post argues, choosing the wrong default provider becomes a visible line item rather than a rounding error.

The catch that demos skip

The comment the author singles out as most useful came from Simon Willison: persisting search results, for example to power a share-transcript feature, conflicts with the terms of most providers. Zero Data Retention is a strong privacy story and a poor fit for products that need to cache or redisplay results later. Another commenter observed that Exa effectively charges extra for not storing your data, while Brave's API was praised for permitting storage at a premium.

The post frames the real decision as three questions: do you need to store results, in which case a direct integration with a provider whose terms allow it may serve you better; do you need spend controls, which one commenter achieved by capping an agent's budget through AI Gateway; and are you comfortable with further platform concentration, a concern commenters raised alongside surveillance, antitrust and the tension of Cloudflare restricting some crawling while operating its own. The post is careful to call those arguments opinion rather than evidence.

Why it matters

The search API itself is a convenience layer. The larger signal is architectural: AI Gateway is turning into the place where tool calls made by agents get logged, billed and rate-limited, with language models first, search now, and plausibly more capabilities to follow. Observability and budget caps arrive essentially for free.

The pragmatic read from the post: use it if you already run on Workers or AI Gateway and want search inside an agent quickly, but treat it cautiously for production. Until Cloudflare publishes pricing and limits, and until you have read the persistence terms of whichever provider you route to, keep the provider name in a config value so you can walk away cheaply if the fine print disagrees with your product.

  • #cloudflare
  • #web-search
  • #ai-agents
  • #api
  • #developer-tools

Related posts