Cloudflare Search for Agents is a one-toggle beta feature that indexes your site and serves a search API at https://<your-domain>/.well-known/search. An agent sends a question with GET ?q= or the HTTP QUERY method and gets ranked Markdown chunks with source paths back, not a generated answer. You turn it on under Quick Actions on your domain’s Overview page, on any plan.
That’s the easy half. The half nobody covers is checking that the endpoint returns the right page for the questions agents actually ask. This guide does both, ending with a regression suite your coding agent builds with Apidog CLI.
What is Cloudflare Search for Agents?
Search for Agents is a Cloudflare feature, launched in beta on November 25, 2026, that creates an AI Search instance for your zone, crawls and indexes your public pages, and exposes a search endpoint at /.well-known/search on your own domain. Cloudflare advertises that endpoint in every page’s <head>, so agents find it on their own.
Three facts shape everything else:
- It returns retrieved content, not answers. As Cloudflare’s announcement post puts it, the agent already has a model; it only needs the relevant text.
- It’s a standard AI Search instance underneath, named
search-for-agents-<ZONE_ID>, so you can tune it later. - Requests stay subject to your AI Crawl Control and WAF rules.
Search for Agents vs llms.txt vs Markdown for Agents
All three target an AI agent that wants your content without scraping HTML. They solve different problems and work together.
| llms.txt | Markdown for Agents | Search for Agents | |
|---|---|---|---|
| What it is | A static file you write | Cloudflare converts one page to Markdown | A search API over your whole site |
| Agent sends | GET /llms.txt |
Accept: text/markdown |
GET ?q= or QUERY |
| Agent gets | A curated list of links | That one page | Ranked chunks from many pages |
| Maintained by | You | Automatic | Cloudflare’s crawler, every 24 hours |
| Best for | Pointing at key pages | Reading a page it already found | Finding a page it doesn’t know about |
Cloudflare’s own docs run all three. If you haven’t written one, our llms.txt guide covers the format, and how to make your API agent-ready covers the wider checklist.
How to turn on /.well-known/search
Your domain has to be onboarded to your Cloudflare account. Then:
- In the Cloudflare dashboard, select your domain and open Overview.
- Under Quick Actions, turn on Search for Agents (marked Beta).
- Review the default settings and pricing notice, then confirm.
- Wait for the crawl and index to finish before you search.
The toggle creates the AI Search instance in the default namespace with https://<YOUR_DOMAIN> as its data source. Cloudflare says you can also enable it through the API.

The defaults that matter most, from the Search for Agents guide:
| Setting | Default |
|---|---|
| Crawl | discover (sitemaps and links), 100,000 pages, depth 5, subdomains off |
| Sync interval | 24 hours |
| Search mode | Hybrid (vector plus keyword) |
| Chunks | 1,024 tokens, 10% overlap |
| Results | 10 chunks, match threshold 0.4 |
| Reranking, query rewriting | Off |
| Similarity cache | On, 48 hours |
You can change most of these in the instance’s Settings tab; the embedding model and data source are fixed.
Cost. Usage counts against AI Search pricing and limits. When we read that page on November 30, 2026, AI Search billing began December 1, 2026, with 5 million ingestion tokens, 10 GB-month of storage, 1,000 semantic queries and 1,000 full-text queries included each month. Hybrid queries bill with semantic ones. On Workers Free, the crawler indexes at most 500 pages a day.
How agents find and call the search endpoint
Discovery happens in the page head. Cloudflare injects four tags into your HTML:
<meta name="agent:instructions" content="Use this search API to find relevant content across this site ...">
<meta name="agent:endpoint" content="https://example.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/">
With Markdown for Agents also on, a request with Accept: text/markdown gets the same block as YAML front matter.

Cloudflare’s developer docs have it on, so you can try it now:
curl --get "https://developers.cloudflare.com/.well-known/search" \
--data-urlencode "q=How do I verify webhook signatures?"
The real response on November 30, 2026, trimmed:
HTTP/2 200
content-type: text/markdown; charset=utf-8
accept-query: text/plain, application/json
# Search results for: "How do I verify webhook signatures?"
## docs/rules/snippets/examples/jwt-validation/index.md (score: 1.000)
# Validate JSON web tokens (JWT) · Cloudflare Rules docs
...
## docs/stream/manage-video-library/using-webhooks/index.verify-webhook-authenticity.md (score: 0.950)
...
Each result is a ## heading with the source path, section and score, then the chunk text. The same search with QUERY:
curl -X QUERY "https://developers.cloudflare.com/.well-known/search" \
--header "Content-Type: text/plain" \
--data "How do I turn on Search for Agents?"
That returned 200 with the Search for Agents guide as the top source. A JSON body ({"q": "AI Search pricing"}) worked too, and a request with no q got 400 Missing query parameter: ?q=. QUERY is the safe, idempotent method with a body, published as RFC 10008 in June 2026; see our HTTP QUERY method guide.
Two things surprised us. Cloudflare’s docs returned 50 chunks per query, so their instance is tuned past the default 10. And the top score was 1.000 on every query, including the nonsense zxqv blorpt fnord, which still returned 50 results. Scores look relative to the best hit, so “it returned results” proves nothing. You have to check which page came back.
Test your search endpoint with Apidog CLI
That’s why you want a test suite, and why your coding agent should build it. You know which page answers “how do I rotate an API key”; the agent turns 10 to 20 of those question-and-page pairs into test cases, and Apidog CLI runs them in your terminal and in CI. Cloudflare provides the endpoint; Apidog’s part is proving it returns the right content.
Set up the CLI once:
npm install -g apidog-cli@latest
apidog login --with-token <YOUR_TOKEN>
npx -y skills add https://apidog.com # pick your agent when prompted
Then give Claude Code, Codex or OpenCode one prompt:
In Apidog project <projectId>, on a new AI branch, build a regression suite for
https://docs.example.com/.well-known/search. Create an environment with that base
URL, a GET endpoint with a required q parameter, and a QUERY endpoint on the same
path with a text/plain body. For each row of questions.csv (question,
expected_path), create a test case asserting status 200, content-type includes
text/markdown, body includes "(score:" and body includes expected_path. Make two
of them QUERY cases. Validate every payload against the CLI schema first, put all
cases in one suite, run it and list any question whose page did not come back.
These are the commands the agent runs, the same ones we ran in a sandbox project against Cloudflare’s docs:
apidog branch create --project <projectId> --type ai --name ai/20261130-from-main-searchForAgents --from main
apidog environment create "Docs site" --project <projectId> --base-url https://docs.example.com
apidog cli-schema validate endpoint-create --file ep-query.json
apidog endpoint create --project <projectId> --branch <aiBranch> --file ep-query.json
apidog test-case create --project <projectId> --branch <aiBranch> --file case-01.json
apidog test-suite create --project <projectId> --branch <aiBranch> --file suite.json
apidog run --test-suite <suiteId> --project <projectId> --branch <aiBranch> -e <envId> -r cli
Two details from that run. Agent writes need a branch (the CLI refused with Automation caller branch required until we gave it one), so the suite lands on an AI branch you review and merge. And the test-case schema’s method list stops at options, so the agent leaves method out of QUERY cases and they inherit it from the endpoint, which does accept query. The run shows Apidog sending a real QUERY with the body:

Then the whole suite:

Six GET questions and one QUERY question, 28 assertions, 0 failures, against Cloudflare’s live endpoint.
In CI, run the same command with -r junit so a failed assertion fails the job. Because the index syncs every 24 hours, a daily scheduled run catches more than a per-commit one. Our Apidog CLI CI/CD guide has ready-made jobs, and the apidog run reference lists every flag.
When this becomes a team habit, Sharkly lets you assign tasks like “add 20 search questions for the new auth docs” to coding agents running on your own computers with your own Claude Code, Codex or OpenCode plan, then review what they ship before it merges. It’s free to start.

What to watch before you turn it on
Private content gets indexed if it’s reachable. The crawler follows sitemaps and links, so staging pages or unlisted drafts can land in the index. Cloudflare says to index only content meant to be public; audit your sitemap and set path filtering first.
Your own rules can block agents. If you block AI crawlers zone-wide through AI Crawl Control, bot management or WAF rules, you may block the agents you just invited. Run the suite from outside your network.
The index is up to a day stale. With a 24-hour sync and crawl cache, a page published this morning may not be searchable until tomorrow, and the 48-hour similarity cache can serve an older result.
Queries cost money past the allowance. Cloudflare says agents tend to reuse the endpoint several times in a session, so a busy docs site can pass 1,000 queries a month fast.
It’s beta. Pin assertions to what you control, like which page comes back, not exact scores or chunk counts.
FAQ
Is Cloudflare Search for Agents free? The toggle is on all plans, including Free, but usage bills under AI Search pricing from December 1, 2026, after the monthly included allowance. Check the limits and pricing page for current rates.
Does it replace llms.txt? No. llms.txt is a map you curate; Search for Agents answers questions over the whole index. You can serve both.
Does it generate answers? No. It returns Markdown chunks with source paths and scores. Generation settings apply only when you call the instance through its chat completions API.
Which agents use it today? Cloudflare hasn’t published a list. Its announcement shows an OpenCode session reading the meta tags on the docs homepage and then calling /.well-known/search, and says agents on its docs “do a good job of discovering the search API.”
Does it support the HTTP QUERY method? Yes, with a plain-text body or JSON with a q field. The accept-query response header lists both.



