Cloudflare’s AI Search can now index the rows of a D1 database, according to a changelog post dated 12 November 2026. The D1 data source is in beta, and AI Search billing begins on 1 December 2026.
The @CloudflareDev account announced it on X on 13 November, pitching agents that run RAG (retrieval-augmented generation, where a model answers from documents it looks up) over app data, support bots grounded in a help centre, and semantic search over product catalogues.
Cloudflare AI Search now supports D1 databases as a data source Perfect for building: – Agents that need RAG over your app data – Support bots grounded in your help center – Semantic search over product catalogs
November 13, 2026
How rows become documents
AI Search is Cloudflare’s hosted retrieval service: you give it data, and applications or agents search that data in natural language. Cloudflare’s docs list built-in storage uploads, websites and R2 buckets as the existing data sources. D1, Cloudflare’s SQL database, is an optional extra that sits alongside built-in storage.
You supply a read-only SQL query, and AI Search indexes each row it returns as a separate document. A column named title becomes the document heading and content becomes the body. Columns prefixed meta_ become metadata fields you can filter results on, up to five of them. Four templates (Labelled, Content only, Key-value and JSON) set how a row is written out as a document.

You can create a D1-backed instance from the dashboard, the REST API or the Workers binding. The database has to be in the same account, and the query has to return a unique id column. The API and binding routes also need the token_id of a service API token; Cloudflare says the AI Search Index Engine permission on that token includes D1 Read. In the dashboard, a Test query button runs the query on one row before you create the instance.
What each sync does
D1-backed instances sync on the instance’s schedule. New rows are indexed, changed rows are re-indexed, and rows the query no longer returns are deleted, but only after AI Search has read the full result. If the query fails or returns no rows, the sync ends with an error and the items already indexed stay. The default sync interval is 24 hours, which Cloudflare changed from six hours in a 2 November changelog post.

Every sync reads the full query result at least twice with your service token, once to check the id values and then page by page. Cloudflare’s docs say that counts toward your D1 rows read, which D1 bills under its own pricing.
Query rules and limits
The query has to be a single SELECT or WITH statement. It can’t contain semicolons, SQL comments or bound parameters, and it can’t use ORDER BY or LIMIT, because AI Search reads the result in pages ordered by id. The check for write keywords also runs inside string literals, so the replace() function is rejected too.
| Limit | Value |
|---|---|
| Rows returned by the query | 100,000 |
| Query length | 10,000 characters |
| Rendered document per row | 64 KiB |
meta_ columns | 5 |
| Metadata per row, including the id | 8,000 bytes as JSON |
The regular AI Search limit on files per instance also applies, and the lower of the two caps wins. That limit is 100,000 on Workers Free and 1 million on Workers Paid, or 500,000 on Paid with hybrid search.
What it costs
Cloudflare postponed AI Search billing by a month, so it now begins on 1 December 2026 instead of 1 November. Each account gets 5 million ingestion tokens, 10 GB-month of storage, 1,000 semantic queries and 1,000 full-text queries a month. Usage beyond that is billed at these rates.
| Usage | Price |
|---|---|
| Base ingestion | US$0.75 per million tokens |
| Image processing | Extra US$0.50 per million tokens |
| Storage | US$2.00 per GB-month |
| Semantic, vector and hybrid queries | US$0.75 per 1,000 queries |
| Full-text queries | US$0.10 per 1,000 queries |
Cloudflare says Workers AI embedding and reranking calls made by AI Search are included in that pricing. Ingestion tokens are counted on the final indexed chunks, so overlapping text between neighbouring chunks is counted each time it appears.
Neither the changelog post nor the docs give a date for the D1 data source to leave beta, and neither gives performance figures for large tables. AI Search itself became generally available on 1 October 2026.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




