Skip to content
Start here

AI Search

AI SearchNamespaces

List namespaces
GET/accounts/{account_id}/ai-search/namespaces
Create a namespace
POST/accounts/{account_id}/ai-search/namespaces
Get a namespace
GET/accounts/{account_id}/ai-search/namespaces/{name}
Update a namespace
PUT/accounts/{account_id}/ai-search/namespaces/{name}
Delete a namespace
DELETE/accounts/{account_id}/ai-search/namespaces/{name}
Multi-Instance Search
POST/accounts/{account_id}/ai-search/namespaces/{name}/search
Multi-Instance Chat Completions
POST/accounts/{account_id}/ai-search/namespaces/{name}/chat/completions
ModelsExpand Collapse
NamespaceListResponse object { created_at, name, description, 2 more }
created_at: string
formatdate-time
name: string
description: optional string

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 6 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
instances_allowed: optional array of string

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

NamespaceCreateResponse object { created_at, name, description, 2 more }
created_at: string
formatdate-time
name: string
description: optional string

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 6 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
instances_allowed: optional array of string

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

NamespaceReadResponse object { created_at, name, description, 2 more }
created_at: string
formatdate-time
name: string
description: optional string

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 6 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
instances_allowed: optional array of string

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

NamespaceUpdateResponse object { created_at, name, description, 2 more }
created_at: string
formatdate-time
name: string
description: optional string

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 6 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
instances_allowed: optional array of string

Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must be an existing instance in this namespace, and the list cannot exceed the account’s multi-instance search limit.

mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

NamespaceDeleteResponse = unknown
NamespaceSearchResponse object { chunks, query_kind, errors, search_query }
chunks: array of object { id, instance_id, score, 4 more }
id: string
instance_id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
query_kind: "text" or "image" or "multimodal"
One of the following:
"text"
"image"
"multimodal"
errors: optional array of object { instance_id, message }
instance_id: string
message: string
search_query: optional string
NamespaceChatCompletionsResponse object { choices, chunks, id, 3 more }
choices: array of object { message, index }
message: object { content, role }
content: string or array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
string
array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
object { text, type }
text: string
minLength1
type: "text"
object { image_url, type }
image_url: object { url }
url: string
maxLength20971520
minLength1
type: "image_url"
object { file, type }
file: object { filename, file_data, file_id }
filename: string
maxLength255
minLength1
file_data: optional string
maxLength13981144
minLength1
file_id: optional string
type: "file"
role: "system" or "developer" or "user" or 2 more
One of the following:
"system"
"developer"
"user"
"assistant"
"tool"
index: optional number
chunks: array of object { id, instance_id, score, 4 more }
id: string
instance_id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
id: optional string
errors: optional array of object { instance_id, message }
instance_id: string
message: string
model: optional string
object: optional string

AI SearchNamespacesInstances

List AI Search instances.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances
Create an AI Search instance.
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances
Get an AI Search instance.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Update an AI Search instance.
PUT/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Delete an AI Search instance.
DELETE/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Get instance statistics.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/stats
Search
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/search
Chat Completions
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/chat/completions
ModelsExpand Collapse
InstanceListResponse object { id, ai_gateway_id, ai_search_model, 42 more }
id: string
ai_gateway_id: string
ai_search_model: string
cache: boolean
cache_threshold: "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: 600 or 1800 or 3600 or 7 more
One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk: boolean
chunk_overlap: number
chunk_size: number
created_at: string
formatdate-time
created_by: string
custom_metadata: array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
embedding_model: string
enable: boolean
engine_version: number
fusion_method: "max" or "rrf"
One of the following:
"max"
"rrf"
hybrid_search_enabled: boolean
index_method: object { keyword, vector }
keyword: boolean
vector: boolean
indexing_options: object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"
One of the following:
"porter"
"trigram"
last_activity: string
formatdate-time
max_num_results: number
metadata: object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_at: string
formatdate-time
modified_by: string
namespace: string
paused: boolean
public_endpoint_id: string
public_endpoint_params: object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean
custom_domains: optional array of string
default_domain_enabled: optional boolean
enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean
rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean
reranking: boolean
reranking_model: string
retrieval_options: object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, dataType, direction }
field: string
maxLength64
minLength1
dataType: optional "number" or "datetime" or "text" or "boolean"
One of the following:
"number"
"datetime"
"text"
"boolean"
direction: optional "asc" or "desc" or "exists" or "not_exists"
One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"
One of the following:
"and"
"or"
rewrite_model: string
rewrite_query: boolean
score_threshold: number
source: string
source_params: object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string
include_items: optional array of string
prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }
depth: optional number
maximum100000
minimum1
include_subdomains: optional boolean
limit: optional number

Maximum number of pages to crawl. New values are capped at 100000; instances configured before that cap may report a higher stored value, which the crawler clamps at run time.

maximum100000
minimum1
max_age: optional number
maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"
One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }
path: string
maxLength200
minLength1
selector: string
maxLength200
minLength1
include_headers: optional map[string]
include_images: optional boolean
specific_sitemaps: optional array of string
use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"
One of the following:
"sitemap"
"discover"
status: string
summarization: boolean
summarization_model: string
sync_interval: 900 or 1800 or 3600 or 5 more
One of the following:
900
1800
3600
7200
14400
21600
43200
86400
system_prompt_index_summarization: string
system_prompt_rewrite_query: string
token_id: string
type: "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceCreateResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceReadResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceUpdateResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceDeleteResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceStatsResponse object { completed, degraded, engine, 8 more }
completed: optional number
degraded: optional boolean

True when status counts are unavailable (e.g. legacy stats query exceeded D1 statement-size limit). Counts are omitted in this case.

engine: optional object { r2, vectorize }

Engine-specific metadata. Present only for managed (v3) instances.

r2: optional object { metadataSizeBytes, objectCount, payloadSizeBytes }

R2 bucket storage usage in bytes.

metadataSizeBytes: number
objectCount: number
payloadSizeBytes: number
vectorize: optional object { dimensions, vectorsCount }

Vectorize index metadata (dimensions, vector count).

dimensions: number
vectorsCount: number
error: optional number
file_embed_errors: optional map[unknown]
index_source_errors: optional map[unknown]
last_activity: optional string
formatdate-time
outdated: optional number
queued: optional number
running: optional number
skipped: optional number
InstanceSearchResponse object { chunks, query_kind, search_query }
chunks: array of object { id, score, text, 3 more }
id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
query_kind: "text" or "image" or "multimodal"
One of the following:
"text"
"image"
"multimodal"
search_query: optional string
InstanceChatCompletionsResponse object { choices, chunks, id, 2 more }
choices: array of object { message, index }
message: object { content, role }
content: string or array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
string
array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
object { text, type }
text: string
minLength1
type: "text"
object { image_url, type }
image_url: object { url }
url: string
maxLength20971520
minLength1
type: "image_url"
object { file, type }
file: object { filename, file_data, file_id }
filename: string
maxLength255
minLength1
file_data: optional string
maxLength13981144
minLength1
file_id: optional string
type: "file"
role: "system" or "developer" or "user" or 2 more
One of the following:
"system"
"developer"
"user"
"assistant"
"tool"
index: optional number
chunks: array of object { id, score, text, 3 more }
id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
id: optional string
model: optional string
object: optional string

AI SearchNamespacesInstancesJobs

List Jobs
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs
Create new job
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs
Get a Job Details
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}
Cancel an indexing job.
PATCH/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}
List Job Logs
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}/logs
ModelsExpand Collapse
JobListResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobCreateResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobGetResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobUpdateResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobLogsResponse = array of object { id, created_at, message, message_type }
id: number
created_at: number
message: string
message_type: number

AI SearchNamespacesInstancesItems

Items List.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Upload Item.
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Create or Update Item.
PUT/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Get Item.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Sync Item.
PATCH/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Delete Item.
DELETE/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Download Item Content.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/download
Item Logs.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/logs
List Item Chunks.
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/chunks
ModelsExpand Collapse
ItemListResponse object { id, checksum, chunks_count, 10 more }
id: string
checksum: string
chunks_count: number
created_at: string
formatdate-time
file_size: number
key: string
last_seen_at: string
formatdate-time
metadata: map[string or number or boolean]

Built-in, configured filterable, and retained source metadata for the item.

One of the following:
string
number
boolean
namespace: string
next_action: "INDEX" or "DELETE"
One of the following:
"INDEX"
"DELETE"
source_id: string

Identifies which data source this item belongs to. “builtin” for uploaded files, “{type}:{source}” for external sources, null for legacy items.

status: "queued" or "running" or "completed" or 3 more
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: optional string
ItemUploadResponse object { id, checksum, chunks_count, 10 more }
id: string
checksum: string
chunks_count: number
created_at: string
formatdate-time
file_size: number
key: string
last_seen_at: string
formatdate-time
metadata: map[string or number or boolean]

Built-in, configured filterable, and retained source metadata for the item.

One of the following:
string
number
boolean
namespace: string
next_action: "INDEX" or "DELETE"
One of the following:
"INDEX"
"DELETE"
source_id: string

Identifies which data source this item belongs to. “builtin” for uploaded files, “{type}:{source}” for external sources, null for legacy items.

status: "queued" or "running" or "completed" or 3 more
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: optional string
ItemCreateOrUpdateResponse object { id, checksum, chunks_count, 10 more }
id: string
checksum: string
chunks_count: number
created_at: string
formatdate-time
file_size: number
key: string
last_seen_at: string
formatdate-time
metadata: map[string or number or boolean]

Built-in, configured filterable, and retained source metadata for the item.

One of the following:
string
number
boolean
namespace: string
next_action: "INDEX" or "DELETE"
One of the following:
"INDEX"
"DELETE"
source_id: string

Identifies which data source this item belongs to. “builtin” for uploaded files, “{type}:{source}” for external sources, null for legacy items.

status: "queued" or "running" or "completed" or 3 more
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: optional string
ItemGetResponse object { id, checksum, chunks_count, 10 more }
id: string
checksum: string
chunks_count: number
created_at: string
formatdate-time
file_size: number
key: string
last_seen_at: string
formatdate-time
metadata: map[string or number or boolean]

Built-in, configured filterable, and retained source metadata for the item.

One of the following:
string
number
boolean
namespace: string
next_action: "INDEX" or "DELETE"
One of the following:
"INDEX"
"DELETE"
source_id: string

Identifies which data source this item belongs to. “builtin” for uploaded files, “{type}:{source}” for external sources, null for legacy items.

status: "queued" or "running" or "completed" or 3 more
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: optional string
ItemSyncResponse object { id, checksum, chunks_count, 10 more }
id: string
checksum: string
chunks_count: number
created_at: string
formatdate-time
file_size: number
key: string
last_seen_at: string
formatdate-time
metadata: map[string or number or boolean]

Built-in, configured filterable, and retained source metadata for the item.

One of the following:
string
number
boolean
namespace: string
next_action: "INDEX" or "DELETE"
One of the following:
"INDEX"
"DELETE"
source_id: string

Identifies which data source this item belongs to. “builtin” for uploaded files, “{type}:{source}” for external sources, null for legacy items.

status: "queued" or "running" or "completed" or 3 more
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: optional string
ItemDeleteResponse object { key }
key: string
ItemLogsResponse = array of object { action, chunkCount, errorType, 4 more }
action: string
chunkCount: number
errorType: string
fileKey: string
message: string
processingTimeMs: number
timestamp: string
formatdate-time
ItemChunksResponse = array of object { id, item, text, 2 more }
id: string
item: object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
text: string
end_byte: optional number
start_byte: optional number

AI SearchInstances

List AI Search instances.
GET/accounts/{account_id}/ai-search/instances
Create an AI Search instance.
POST/accounts/{account_id}/ai-search/instances
Get an AI Search instance.
GET/accounts/{account_id}/ai-search/instances/{id}
Update an AI Search instance.
PUT/accounts/{account_id}/ai-search/instances/{id}
Delete an AI Search instance.
DELETE/accounts/{account_id}/ai-search/instances/{id}
Get instance statistics.
GET/accounts/{account_id}/ai-search/instances/{id}/stats
Search
POST/accounts/{account_id}/ai-search/instances/{id}/search
Chat Completions
POST/accounts/{account_id}/ai-search/instances/{id}/chat/completions
ModelsExpand Collapse
InstanceListResponse object { id, ai_gateway_id, ai_search_model, 42 more }
id: string
ai_gateway_id: string
ai_search_model: string
cache: boolean
cache_threshold: "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: 600 or 1800 or 3600 or 7 more
One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk: boolean
chunk_overlap: number
chunk_size: number
created_at: string
formatdate-time
created_by: string
custom_metadata: array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
embedding_model: string
enable: boolean
engine_version: number
fusion_method: "max" or "rrf"
One of the following:
"max"
"rrf"
hybrid_search_enabled: boolean
index_method: object { keyword, vector }
keyword: boolean
vector: boolean
indexing_options: object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"
One of the following:
"porter"
"trigram"
last_activity: string
formatdate-time
max_num_results: number
metadata: object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_at: string
formatdate-time
modified_by: string
namespace: string
paused: boolean
public_endpoint_id: string
public_endpoint_params: object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean
custom_domains: optional array of string
default_domain_enabled: optional boolean
enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean
rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean
reranking: boolean
reranking_model: string
retrieval_options: object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, dataType, direction }
field: string
maxLength64
minLength1
dataType: optional "number" or "datetime" or "text" or "boolean"
One of the following:
"number"
"datetime"
"text"
"boolean"
direction: optional "asc" or "desc" or "exists" or "not_exists"
One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"
One of the following:
"and"
"or"
rewrite_model: string
rewrite_query: boolean
score_threshold: number
source: string
source_params: object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string
include_items: optional array of string
prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }
depth: optional number
maximum100000
minimum1
include_subdomains: optional boolean
limit: optional number

Maximum number of pages to crawl. New values are capped at 100000; instances configured before that cap may report a higher stored value, which the crawler clamps at run time.

maximum100000
minimum1
max_age: optional number
maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"
One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }
path: string
maxLength200
minLength1
selector: string
maxLength200
minLength1
include_headers: optional map[string]
include_images: optional boolean
specific_sitemaps: optional array of string
use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"
One of the following:
"sitemap"
"discover"
status: string
summarization: boolean
summarization_model: string
sync_interval: 900 or 1800 or 3600 or 5 more
One of the following:
900
1800
3600
7200
14400
21600
43200
86400
system_prompt_index_summarization: string
system_prompt_rewrite_query: string
token_id: string
type: "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceCreateResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceReadResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceUpdateResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceDeleteResponse object { id, created_at, modified_at, 36 more }
id: string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
created_at: string
formatdate-time
modified_at: string
formatdate-time
ai_gateway_id: optional string
ai_search_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
cache: optional boolean
cache_threshold: optional "super_strict_match" or "close_enough" or "flexible_friend" or "anything_goes"
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: optional 600 or 1800 or 3600 or 7 more

Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).

One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk_overlap: optional number
maximum30
minimum0
chunk_size: optional number
minimum64
created_by: optional string
custom_metadata: optional array of object { data_type, field_name }
data_type: "text" or "number" or "boolean" or "datetime"
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: string
maxLength64
minLength1
embedding_model: optional "@cf/qwen/qwen3-embedding-0.6b" or "@cf/qwen/qwen3-vl-embedding-2b" or "@cf/baai/bge-m3" or 8 more
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@cf/qwen/qwen3-vl-embedding-2b"
"@cf/baai/bge-m3"
"@cf/baai/bge-large-en-v1.5"
"@cf/google/embeddinggemma-300m"
"google-ai-studio/gemini-embedding-001"
"google-ai-studio/gemini-embedding-2-preview"
"google-ai-studio/gemini-embedding-2"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: optional boolean
engine_version: optional number
fusion_method: optional "max" or "rrf"
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: optional boolean

Deprecated — use index_method instead.

index_method: optional object { keyword, vector }

Controls which storage backends are used during indexing. Defaults to vector-only.

keyword: boolean

Enable keyword (BM25) storage backend.

vector: boolean

Enable vector (embedding) storage backend.

indexing_options: optional object { keyword_tokenizer }
keyword_tokenizer: optional "porter" or "trigram"

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
"porter"
"trigram"
last_activity: optional string
formatdate-time
max_num_results: optional number
maximum50
minimum1
metadata: optional object { created_from_aisearch_wizard, worker_domain }
created_from_aisearch_wizard: optional boolean
worker_domain: optional string
modified_by: optional string
namespace: optional string
paused: optional boolean
public_endpoint_id: optional string
public_endpoint_params: optional object { authorized_hosts, chat_completions_endpoint, custom_domains, 5 more }
authorized_hosts: optional array of string
chat_completions_endpoint: optional object { disabled }
disabled: optional boolean

Disable chat completions endpoint for this public endpoint

custom_domains: optional array of string

Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).

default_domain_enabled: optional boolean

When false, the instance is reachable only via a registered custom domain and the default <public_endpoint_id>.search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.

enabled: optional boolean
mcp: optional object { description, disabled }
description: optional string
disabled: optional boolean

Disable MCP endpoint for this public endpoint

rate_limit: optional object { period_ms, requests, technique }
period_ms: optional number
maximum3600000
minimum60000
requests: optional number
minimum1
technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
search_endpoint: optional object { disabled }
disabled: optional boolean

Disable search endpoint for this public endpoint

reranking: optional boolean
reranking_model: optional "@cf/baai/bge-reranker-base" or ""
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: optional object { boost_by, keyword_match_mode }
boost_by: optional array of object { field, direction }

Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to ‘asc’ for numeric/datetime fields and ‘exists’ for text/boolean fields. Fields must match ‘timestamp’ or a defined custom_metadata field.

field: string

Metadata field name to boost by. Use ‘timestamp’ for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.

maxLength64
minLength1
direction: optional "asc" or "desc" or "exists" or "not_exists"

Boost direction. ‘desc’ = higher values rank higher (e.g. newer timestamps). ‘asc’ = lower values rank higher. ‘exists’ = boost chunks that have the field. ‘not_exists’ = boost chunks that lack the field. Optional — defaults to ‘asc’ for numeric/datetime fields, ‘exists’ for text/boolean fields.

One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: optional "and" or "or"

Controls which documents are candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to ‘and’.

One of the following:
"and"
"or"
rewrite_model: optional "@cf/meta/llama-3.3-70b-instruct-fp8-fast" or "@cf/zai-org/glm-4.7-flash" or "@cf/meta/llama-3.1-8b-instruct-fast" or 27 more
One of the following:
"@cf/meta/llama-3.3-70b-instruct-fp8-fast"
"@cf/zai-org/glm-4.7-flash"
"@cf/meta/llama-3.1-8b-instruct-fast"
"@cf/meta/llama-3.1-8b-instruct-fp8"
"@cf/meta/llama-4-scout-17b-16e-instruct"
"@cf/qwen/qwen3-30b-a3b-fp8"
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
"@cf/moonshotai/kimi-k2-instruct"
"@cf/google/gemma-3-12b-it"
"@cf/google/gemma-4-26b-a4b-it"
"@cf/moonshotai/kimi-k2.5"
"anthropic/claude-3-7-sonnet"
"anthropic/claude-sonnet-4"
"anthropic/claude-opus-4"
"anthropic/claude-3-5-haiku"
"cerebras/qwen-3-235b-a22b-instruct"
"cerebras/qwen-3-235b-a22b-thinking"
"cerebras/llama-3.3-70b"
"cerebras/llama-4-maverick-17b-128e-instruct"
"cerebras/llama-4-scout-17b-16e-instruct"
"cerebras/gpt-oss-120b"
"google-ai-studio/gemini-2.5-flash"
"google-ai-studio/gemini-2.5-pro"
"grok/grok-4"
"groq/llama-3.3-70b-versatile"
"groq/llama-3.1-8b-instant"
"openai/gpt-5"
"openai/gpt-5-mini"
"openai/gpt-5-nano"
""
rewrite_query: optional boolean
score_threshold: optional number
maximum1
minimum0
source: optional string
source_params: optional object { exclude_items, include_items, prefix, 2 more }
exclude_items: optional array of string

List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.

include_items: optional array of string

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.

prefix: optional string
r2_jurisdiction: optional string
web_crawler: optional object { discover_options, parse_options, parse_type }
discover_options: optional object { depth, include_external_links, include_subdomains, 3 more }

Options for parse_type ‘discover’, where Browser Run discovers URLs by link following and sitemaps. Ignored for ‘sitemap’.

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: optional boolean

Follow links to subdomains of the source host.

limit: optional number

Maximum number of pages to crawl (1-100000).

maximum100000
minimum1
max_age: optional number

Maximum content age in seconds to accept (0–604800).

maximum604800
minimum0
source: optional "all" or "sitemaps" or "links"

Where the crawler looks for URLs: ‘sitemaps’ reads sitemap XML only, ‘links’ follows page links only, ‘all’ does both.

One of the following:
"all"
"sitemaps"
"links"
parse_options: optional object { content_selector, include_headers, include_images, 2 more }
content_selector: optional array of object { path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected.

path: string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
minLength1
selector: string

CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, ). Must target a single element; if multiple elements match, the selector is ignored and the full page is used.

maxLength200
minLength1
include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF).

include_images: optional boolean
specific_sitemaps: optional array of string

List of specific sitemap URLs to use for crawling. Only valid when parse_type is ‘sitemap’.

use_browser_rendering: optional boolean
parse_type: optional "sitemap" or "discover"

How URLs are discovered. ‘sitemap’ reads XML sitemaps; ‘discover’ follows links recursively and requires the source to be a Verified zone on this account.

One of the following:
"sitemap"
"discover"
status: optional string
sync_interval: optional 900 or 1800 or 3600 or 5 more

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
900
1800
3600
7200
14400
21600
43200
86400
token_id: optional string
formatuuid
type: optional "r2" or "web-crawler"
One of the following:
"r2"
"web-crawler"
InstanceStatsResponse object { completed, degraded, engine, 8 more }
completed: optional number
degraded: optional boolean

True when status counts are unavailable (e.g. legacy stats query exceeded D1 statement-size limit). Counts are omitted in this case.

engine: optional object { r2, vectorize }

Engine-specific metadata. Present only for managed (v3) instances.

r2: optional object { metadataSizeBytes, objectCount, payloadSizeBytes }

R2 bucket storage usage in bytes.

metadataSizeBytes: number
objectCount: number
payloadSizeBytes: number
vectorize: optional object { dimensions, vectorsCount }

Vectorize index metadata (dimensions, vector count).

dimensions: number
vectorsCount: number
error: optional number
file_embed_errors: optional map[unknown]
index_source_errors: optional map[unknown]
last_activity: optional string
formatdate-time
outdated: optional number
queued: optional number
running: optional number
skipped: optional number
InstanceSearchResponse object { chunks, query_kind, search_query }
chunks: array of object { id, score, text, 3 more }
id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
query_kind: "text" or "image" or "multimodal"
One of the following:
"text"
"image"
"multimodal"
search_query: optional string
InstanceChatCompletionsResponse object { choices, chunks, id, 2 more }
choices: array of object { message, index }
message: object { content, role }
content: string or array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
string
array of object { text, type } or object { image_url, type } or object { file, type }
One of the following:
object { text, type }
text: string
minLength1
type: "text"
object { image_url, type }
image_url: object { url }
url: string
maxLength20971520
minLength1
type: "image_url"
object { file, type }
file: object { filename, file_data, file_id }
filename: string
maxLength255
minLength1
file_data: optional string
maxLength13981144
minLength1
file_id: optional string
type: "file"
role: "system" or "developer" or "user" or 2 more
One of the following:
"system"
"developer"
"user"
"assistant"
"tool"
index: optional number
chunks: array of object { id, score, text, 3 more }
id: string
score: number
maximum1
minimum0
text: string
type: string
item: optional object { key, metadata, timestamp }
key: string
metadata: optional map[unknown]
timestamp: optional number
scoring_details: optional object { fusion_method, keyword_rank, keyword_score, 3 more }
fusion_method: optional "rrf" or "max"
One of the following:
"rrf"
"max"
keyword_rank: optional number
keyword_score: optional number
minimum0
reranking_score: optional number
maximum1
minimum0
vector_rank: optional number
vector_score: optional number
maximum1
minimum0
id: optional string
model: optional string
object: optional string

AI SearchInstancesJobs

List Jobs
GET/accounts/{account_id}/ai-search/instances/{id}/jobs
Create new job
POST/accounts/{account_id}/ai-search/instances/{id}/jobs
Get a Job Details
GET/accounts/{account_id}/ai-search/instances/{id}/jobs/{job_id}
List Job Logs
GET/accounts/{account_id}/ai-search/instances/{id}/jobs/{job_id}/logs
ModelsExpand Collapse
JobListResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobCreateResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobGetResponse object { id, source, description, 4 more }
id: string
source: "user" or "schedule"
One of the following:
"user"
"schedule"
description: optional string
end_reason: optional string
ended_at: optional string
last_seen_at: optional string
started_at: optional string
JobLogsResponse = array of object { id, created_at, message, message_type }
id: number
created_at: number
message: string
message_type: number

AI SearchTokens

List tokens
GET/accounts/{account_id}/ai-search/tokens
Create a token
POST/accounts/{account_id}/ai-search/tokens
Get a token
GET/accounts/{account_id}/ai-search/tokens/{id}
Update a token
PUT/accounts/{account_id}/ai-search/tokens/{id}
Delete a token
DELETE/accounts/{account_id}/ai-search/tokens/{id}
ModelsExpand Collapse
TokenListResponse object { id, cf_api_id, created_at, 6 more }
id: string
formatuuid
cf_api_id: string
created_at: string
formatdate-time
modified_at: string
formatdate-time
name: string
created_by: optional string
enabled: optional boolean
legacy: optional boolean
modified_by: optional string
TokenCreateResponse object { id, cf_api_id, created_at, 6 more }
id: string
formatuuid
cf_api_id: string
created_at: string
formatdate-time
modified_at: string
formatdate-time
name: string
created_by: optional string
enabled: optional boolean
legacy: optional boolean
modified_by: optional string
TokenReadResponse object { id, cf_api_id, created_at, 6 more }
id: string
formatuuid
cf_api_id: string
created_at: string
formatdate-time
modified_at: string
formatdate-time
name: string
created_by: optional string
enabled: optional boolean
legacy: optional boolean
modified_by: optional string
TokenUpdateResponse object { id, cf_api_id, created_at, 6 more }
id: string
formatuuid
cf_api_id: string
created_at: string
formatdate-time
modified_at: string
formatdate-time
name: string
created_by: optional string
enabled: optional boolean
legacy: optional boolean
modified_by: optional string
TokenDeleteResponse = unknown