Cloudflare's Search for Agents Turns Your Site Into a Self-Advertising Search API for AI Agents
Tu Aran · Frontend and agent engineer · Technical author · 2aran.com →
The original text is the official Cloudflare blog post Introducing Search for Agents, by Celso Martinho, Gabriel Massadas, and Nelson Duarte, published on 2026-11-25. This is a full Chinese translation, with images and code kept in the original order; code is not translated. Notes marked 「译注」 are supplementary explanations, and commentary is placed at the end.
1. What is Search for Agents
AI Search is a Cloudflare service: it indexes your content, letting you add search to any application or agent without building your own retrieval infrastructure. It has long supported using your website as a data source, automatically crawling, transforming, and indexing pages.
However, setting up an AI Search instance for a website previously required manual creation and configuration, followed by all the integration work: making the search endpoint accessible from your domain and ensuring agents know where the index is and how to use it.
Today we are launching Search for Agents, which packs this configuration into a single toggle in the Cloudflare dashboard. Turn it on for your zone, and our service creates an AI Search instance, starts indexing your content, and makes search discoverable and callable under your own domain.
译注: a zone is Cloudflare's billing and configuration unit, usually corresponding to a root domain and its subdomains.
2. How it works
This follows naturally from Markdown for Agents. With Markdown for Agents, the Cloudflare network converts any HTML page to Markdown in real time for enabled zones via content negotiation request headers. Similarly, Search for Agents uses AI Search to automatically index your zone and expose an API under your domain that any AI agent can discover and use to search your website. All of this happens at the network layer.
You can enable Search for Agents via API, or from the 'Quick Actions' section on the zone's page in the dashboard:
Image: Enabling Search for Agents in the dashboard
Search for Agents is available to all customers, including the free tier (with usage limits). Once enabled, Cloudflare automatically creates an AI Search instance and begins crawling and indexing the content of the zone. For details on the crawling process, see our developer documentation.
You can access the instance directly from this page, or find it in the AI > AI Search instance list in your account:
Image: The AI Search instance corresponding to Search for Agents
The AI Search instance created for a zone uses default settings, but you can enable reranking or modify cache settings at any time. See the documentation for the full set of options.
After AI Search finishes indexing your content, you or any agent on the Internet can start using Search for Agents, subject to your domain's settings such as Bot Management, AI Crawl Control, and the Web Application Firewall (WAF).
Discoverability
Search is useless if agents don't know it exists. To make it discoverable, Search for Agents automatically declares the search endpoint on every page of your website.
For example, for HTML responses, we add metadata in the page's <head>:
<meta name="agent:instructions" content="Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown.">
<meta name="agent:endpoint" content="https://developers.cloudflare.com/.well-known/search?q={query}">
<meta name="agent:method" content="GET">
<meta name="agent:documentation" content="https://developers.cloudflare.com/ai-search/how-to/search-for-agents/">
If you also have Markdown for Agents enabled, then agents that request pages with Accept: text/markdown will receive the same information in YAML front matter:
---
agent:
instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
endpoint: "https://developers.cloudflare.com/.well-known/search?q={query}"
method: "GET"
documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---
Agents can easily read these instructions and know how to search your website next.
译注:
instructionsmeans "Use this search API to find relevant content across this site with keywords or natural-language queries instead of crawling individual pages; results are returned in Markdown."
Searching content
Once an agent knows your website has a search endpoint, it can start calling it:
$ curl "https://developers.cloudflare.com/.well-known/search?q=cloudflare+artifacts"
# Search results for: "cloudflare artifacts"
## docs/artifacts/api/workers-binding/index.md (score: 1.000)
# Workers binding · Artifacts · Cloudflare Artifacts docs
Call Artifacts from a Worker binding.
---
## docs/artifacts/index.md (score: 0.951)
# Artifacts · Cloudflare Artifacts docs
Store, version, and share filesystem artifacts across Workers, APIs, and Git-compatible tools.
...
Depending on your AI Search configuration, agents can also ask the search endpoint natural-language questions:
$ curl --get "https://developers.cloudflare.com/.well-known/search" --data-urlencode "q=What is the maximum push size for Cloudflare Artifacts?"
# Search results for: "What is the maximum push size for Cloudflare Artifacts?"
## docs/artifacts/platform/limits/index.limits-cloudflare-artifacts-docs.md (score: 1.000)
# Limits · Cloudflare Artifacts docs
Section: Limits · Cloudflare Artifacts docs
title: Limits
description: Review Artifacts platform limits.
pcx_content_type: reference
products:
- artifacts
Limits that apply to creating, importing, cloning, and pushing Artifacts are detailed below.
These limits cover naming rules, storage, request rates for control-plane and Git operations, and the size of each push.
FeatureLimitControl-plane request rate2,000 requests per 10 seconds per Artifacts namespaceGit request rate, per artifact2,000 requests per 10 seconds per artifactMaximum storage per repository1 GB for repos created on or after 2026-09-29. Repos created earlier have a 10 GB limit. See size limit change.Maximum storage per account1 TB (can be raised on request)Maximum number of repositoriesUnlimitedMaximum number of namespacesUnlimitedNamespace name length2–63 charactersNamespace and repo namesStart with a letter or digit. Remaining characters may include letters, digits, ., _, and -.Maximum push size64 MiB per push. Includes all data sent in the push. Split larger work into several smaller pushes.Maximum objects per push50,000 objects, such as file versions, folders, and commits.Maximum file size32 MiB per file. Already-compressed files, like images, video, or zip archives, may be rejected slightly below 32 MiB.Maximum ref updates per push1 MiB of branch and tag updates per push.Maximum entries per folder100,000 files and subfolders in a single folder.
...
Note that this search endpoint returns retrieved Markdown content, not generated answers. Agents themselves already have AI models and are already talking to the user; they just need relevant information from your website, and don't need another AI model to answer on their behalf.
Supporting a new HTTP method: QUERY
The new HTTP QUERY method is an IETF Proposed Standard, and, incidentally, one of the co-authors is our colleague James Snell, published in June 2026 as RFC 10008. QUERY allows clients to send search criteria in the request body, and is safe and idempotent, not modifying server state. This makes it well suited for AI search.
QUERY adoption is progressing: major browser vendors are discussing the RFC, and several frameworks and clients have already adopted it (for example, curl and undici), or are discussing whether to adopt it.
Search for Agents natively supports QUERY, and the request body can be plain text or JSON:
# Plain text
curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \
--data 'What is the maximum payload size per ingestion request in Basin Pipelines?'
# JSON
curl -X QUERY 'https://developers.cloudflare.com/.well-known/search' \
--header 'Content-Type: application/json' \
--data '{"q":"How many bulk import requests per minute does Email Service allow?"}'
译注: undici is the HTTP client behind Node.js's built-in
fetch.
In practice
Let's see how it behaves in an agent session. Our developer documentation already has Search for Agents enabled. We opened an OpenCode session and asked "What is the maximum push size for Cloudflare Artifacts?". From the logs, you can see the agent first discovers the search endpoint on the homepage, then requests /.well-known/search with the question to get search results.
Image: A Search for Agents request
A few seconds later the answer returns, and it is correct.
Image: OpenCode gets the answer via Search for Agents
Once an agent has discovered the search API, in the same session whenever it needs to look up content on the same website, it will likely call it repeatedly.
We had already enabled Search for Agents for the developer documentation before this release. We observed that agents discover and use this search API well when performing tasks.
Image: Sample of Search for Agents requests on developer docs
It's still an AI Search instance
Search for Agents is powered by an AI Search instance in your account, so you get access to all the standard configuration options and features. For example, you can enable the public REST API or MCP endpoint, call it from Workers, or even embed AI Search into your website for human visitors.
Image: AI Search snippet embedded in Cloudflare blog
Get started with Search for Agents
From today, Search for Agents is available to all customers. Usage is billed at AI Search pricing, covering content ingestion, indexed content storage, and query service, and is subject to the usage and limits included in your account's Workers free and paid plans.
We also recommend checking the Agent Readiness page (see the announcement) to learn how to make your website more agent-friendly: from guiding agents through authentication, to controlling what content agents can see, in what format, and how to pay for your content.
Image: Agent Readiness check for Search for Agents
For more information, see the developer documentation for Search for Agents. Feel free to follow us on X or join the Cloudflare Developer Discord. We'd love to hear feedback from site owners who make their content searchable by agents.
3. Commentary
It fills the "finding" step
Markdown for Agents solves "reading": it reduces HTML noise and token cost once an agent has a URL. It doesn't solve "which URL to read". Agents previously used a general-purpose search engine to find entry points, or crawled internal links page by page, wasting time on many pages with low hit rates, and site owners had to bear that crawl traffic. Search for Agents hands site-internal retrieval to the site itself, letting an agent get ranked snippets in one request. The OpenCode example in the original post shows this path: the agent reads meta on the homepage, then directly queries /.well-known/search without digging through the docs index.
For documentation sites, knowledge bases, and long-form blogs, where there is a lot of content but each page has a clear answer, this saves the most round trips.
The discovery mechanism is Cloudflare's own convention
The agent:instructions, agent:endpoint meta names, and the agent: field in front matter, are not attributed to any standard in the original post; they read as Cloudflare-defined syntax. Whether it works depends on two things:
- The agent must first fetch some page of the site and read the
<head>or Markdown front matter. Agents that only get summaries via a general search API and never directly visit a page won't see this declaration. - Agents or their tooling must recognize these fields. The demo in the original uses OpenCode, relying on the model itself to understand the English
instructionstext. The advantage is that no client-side code changes are needed; the cost is that whether it gets used depends on the model's judgment at the moment.
Comparing with llms.txt makes this clearer. llms.txt is a static directory written or generated by the site owner, telling the model "what's on the site"; Search for Agents is a query-returning interface that answers "which paragraphs correspond to this question". The two can coexist. My personal site 2aran.com already has a /llms.txt route listing titles, links, and summaries of public articles; if I also enable a search endpoint, both directory and query are covered.
Returns snippets, not generated answers
This is the part of the design I agree with most. The endpoint returns original snippets with scores, and the calling model organizes the answer. The benefits are threefold: the site doesn't pay a generation cost for each query; content wording stays with the site owner and is not rewritten by another model before being cited; and the caller can see the source path, so the answer can attach links.
The cost is also directly shown in the original example. The second curl returns the Limits page, which is originally a table; in the search results, the header and cells got squeezed into a single line (FeatureLimitControl-plane request rate2,000 requests…), losing all separators. A model can probably still read it, but numbers like "64 MiB per push" pressed next to surrounding text are more likely to be misread than in a table. For table-heavy pages, it's worth checking a few queries after enabling to see the chunking effect.
QUERY method: right direction, but don't rely on it yet
GET stuffs the query into the URL, which hits URL length limits for long questions and leaves the query in access logs, proxy logs, and browser history. QUERY puts the query in the request body while preserving GET's safe, idempotent semantics, so it can be cached. For carrying natural-language questions, this semantics is appropriate.
The practical problem is in the middle layer. Many WAF rules, reverse proxies, load balancers, and enterprise egress gateways only allow common methods and will reject unrecognized ones. The client support listed in the original is also early: curl and undici have caught up, but the browser Fetch specification is still under discussion. Agents will mostly use GET for a long time, with QUERY as a supplement for long queries.
Three things for site owners to check before enabling
- What content gets indexed. The crawler will ingest any page it can crawl under the zone. If your site has paid content, member-only content, or pages meant only for humans, first confirm whether that content is server-side rendered into the HTML; content hidden only by frontend code can still be read by the crawler. My personal site has a paywall for articles using Ran Coin, so I need to check this before enabling.
- Access policies on search endpoints. The original states that search is subject to Bot Management, AI Crawl Control, and WAF configurations. Sites that previously added rules to block AI crawlers may find agents can't search after enabling; conversely, relaxing rules to make search available will also relax crawling of the pages themselves. The two must be considered together.
- Billing follows AI Search. Ingestion, storage, and queries are all metered, and the free tier has limits. For sites with large or frequently updated content, observe usage for a week or two after enabling before deciding whether to keep it.
My judgment
Cloudflare has released several pieces this year on "how a site faces agents": Markdown for Agents handles format, AI Crawl Control handles who can crawl and whether to charge, Agent Readiness does detection, and Search for Agents handles retrieval. Each piece alone is simple; together they form an "agent access layer" that the CDN provides at the network layer on the site owner's behalf. The site owner's job is reduced to toggling switches and setting rules, which is most attractive to small and medium sites without engineering resources.
The real determinant of how far it goes is whether the agent:* declaration gets adopted by agent clients outside Cloudflare and by other CDNs. If only some models occasionally read it, it becomes a nice Cloudflare feature; if mainstream coding agents and browser agents all look for search entries according to it, it becomes a de facto site convention.
Continuous verification
- Whether mainstream agent clients (Claude Code, Codex, Cursor, etc.) explicitly recognize
agent:endpointat the tool layer, or still rely on the model reading it on the fly. - Whether
/.well-known/searchand theagent:*fields get submitted to the IETF or W3C to form a specification.
Information as of 2026-11-26; the body follows the original Cloudflare blog post; images are copyrighted by Cloudflare and reproduced only for translation and commentary.