AI Search
Search primitive for your agents
Connect your data and deliver natural language search in your applications without worrying about infrastructure.
Atomic search unit for platforms
Always up to date
Any source, format, and language
Agent file search
Multimodal search
Per-tenant or per-agent file search
Website and code search
Call AI Search from anywhere
Query from a Worker binding, call it from your backend with an SDK, embed a ready-made UI, or connect an MCP client.
export interface Env { AI_SEARCH: AiSearchNamespace;}
export default { async fetch(request, env): Promise<Response> { // Create a dedicated AI Search instance for the tenant at runtime. const instance = await env.AI_SEARCH.create({ id: 'tenant-a', });
// Upload a file and wait for it to finish indexing. await instance.items.uploadAndPoll('handbook.pdf', file);
// Search only that tenant's AI Search instance. const results = await instance.search({ query: 'What does the handbook say about travel approvals?', });
return Response.json(results); },} satisfies ExportedHandler<Env>;from cloudflare import Cloudflare
client = Cloudflare()
# Upload and index content into an existing instance.item = client.aisearch.namespaces.instances.items.upload( id="my-instance", account_id=account_id, name="default", file=file,)
# Search the instance with a natural language query.results = client.aisearch.namespaces.instances.search( id="my-instance", account_id=account_id, name="default", query="How does AI Search handle uploaded content?",)import '@cloudflare/ai-search-snippet';
export default function App() { // Prebuilt search bar web component, wired to your AI Search endpoint return ( <search-bar-snippet apiUrl="https://<PUBLIC_ID>.search.ai.cloudflare.com/" placeholder="Search..." maxResults={50} maxRenderResults={10} show-url="true" show-date="true" /> );}// Add AI Search to your MCP client config{ "mcpServers": { "ai-search": { "url": "https://<PUBLIC_ID>.search.ai.cloudflare.com/mcp", }, },}Sentry
"
AI Search has been a cheat code for building AI at Sentry. It is so remarkably simple that even our non-technical teams are building and deploying production-ready features. "
Powerful primitives, seamlessly integrated
Built on systems powering 20% of the Internet, AI Search runs on the same infrastructure Cloudflare uses to build Cloudflare. Enterprise-grade reliability, security, and performance are standard.
Build without boundaries
Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free — no credit card required.