Skip to content
Start here

Namespaces

List namespaces
aisearch.namespaces.list(NamespaceListParams**kwargs) -> SyncV4PagePaginationArray[NamespaceListResponse]
GET/accounts/{account_id}/ai-search/namespaces
Create a namespace
aisearch.namespaces.create(NamespaceCreateParams**kwargs) -> NamespaceCreateResponse
POST/accounts/{account_id}/ai-search/namespaces
Get a namespace
aisearch.namespaces.read(strname, NamespaceReadParams**kwargs) -> NamespaceReadResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}
Update a namespace
aisearch.namespaces.update(strname, NamespaceUpdateParams**kwargs) -> NamespaceUpdateResponse
PUT/accounts/{account_id}/ai-search/namespaces/{name}
Delete a namespace
aisearch.namespaces.delete(strname, NamespaceDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/ai-search/namespaces/{name}
Multi-Instance Search
aisearch.namespaces.search(strname, NamespaceSearchParams**kwargs) -> NamespaceSearchResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/search
Multi-Instance Chat Completions
aisearch.namespaces.chat_completions(strname, NamespaceChatCompletionsParams**kwargs) -> NamespaceChatCompletionsResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/chat/completions
ModelsExpand Collapse
class NamespaceListResponse:
created_at: datetime
formatdate-time
name: str
description: Optional[str]

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
instances_allowed: Optional[List[str]]

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[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

class NamespaceCreateResponse:
created_at: datetime
formatdate-time
name: str
description: Optional[str]

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
instances_allowed: Optional[List[str]]

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[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

class NamespaceReadResponse:
created_at: datetime
formatdate-time
name: str
description: Optional[str]

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
instances_allowed: Optional[List[str]]

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[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

class NamespaceUpdateResponse:
created_at: datetime
formatdate-time
name: str
description: Optional[str]

Optional description for the namespace. Max 256 characters.

maxLength256
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
instances_allowed: Optional[List[str]]

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[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

class NamespaceSearchResponse:
chunks: List[Chunk]
id: str
instance_id: str
score: float
maximum1
minimum0
text: str
type: str
item: Optional[ChunkItem]
key: str
metadata: Optional[Dict[str, object]]
timestamp: Optional[float]
scoring_details: Optional[ChunkScoringDetails]
fusion_method: Optional[Literal["rrf", "max"]]
One of the following:
"rrf"
"max"
keyword_rank: Optional[float]
keyword_score: Optional[float]
minimum0
reranking_score: Optional[float]
maximum1
minimum0
vector_rank: Optional[float]
vector_score: Optional[float]
maximum1
minimum0
query_kind: Literal["text", "image", "multimodal"]
One of the following:
"text"
"image"
"multimodal"
errors: Optional[List[Error]]
instance_id: str
message: str
search_query: Optional[str]
class NamespaceChatCompletionsResponse:
choices: List[Choice]
message: ChoiceMessage
content: Union[str, List[ChoiceMessageContentUnionMember1], null]
One of the following:
str
List[ChoiceMessageContentUnionMember1]
One of the following:
class ChoiceMessageContentUnionMember1UnionMember0:
text: str
minLength1
type: Literal["text"]
class ChoiceMessageContentUnionMember1UnionMember1:
image_url: ChoiceMessageContentUnionMember1UnionMember1ImageURL
url: str
maxLength20971520
minLength1
type: Literal["image_url"]
class ChoiceMessageContentUnionMember1UnionMember2:
file: ChoiceMessageContentUnionMember1UnionMember2File
filename: str
maxLength255
minLength1
file_data: Optional[str]
maxLength13981144
minLength1
file_id: Optional[str]
type: Literal["file"]
role: Literal["system", "developer", "user", 2 more]
One of the following:
"system"
"developer"
"user"
"assistant"
"tool"
index: Optional[int]
chunks: List[Chunk]
id: str
instance_id: str
score: float
maximum1
minimum0
text: str
type: str
item: Optional[ChunkItem]
key: str
metadata: Optional[Dict[str, object]]
timestamp: Optional[float]
scoring_details: Optional[ChunkScoringDetails]
fusion_method: Optional[Literal["rrf", "max"]]
One of the following:
"rrf"
"max"
keyword_rank: Optional[float]
keyword_score: Optional[float]
minimum0
reranking_score: Optional[float]
maximum1
minimum0
vector_rank: Optional[float]
vector_score: Optional[float]
maximum1
minimum0
id: Optional[str]
errors: Optional[List[Error]]
instance_id: str
message: str
model: Optional[str]
object: Optional[str]

NamespacesInstances

List AI Search instances.
aisearch.namespaces.instances.list(strname, InstanceListParams**kwargs) -> SyncV4PagePaginationArray[InstanceListResponse]
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances
Create an AI Search instance.
aisearch.namespaces.instances.create(strname, InstanceCreateParams**kwargs) -> InstanceCreateResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances
Get an AI Search instance.
aisearch.namespaces.instances.read(strid, InstanceReadParams**kwargs) -> InstanceReadResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Update an AI Search instance.
aisearch.namespaces.instances.update(strid, InstanceUpdateParams**kwargs) -> InstanceUpdateResponse
PUT/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Delete an AI Search instance.
aisearch.namespaces.instances.delete(strid, InstanceDeleteParams**kwargs) -> InstanceDeleteResponse
DELETE/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Get instance statistics.
aisearch.namespaces.instances.stats(strid, InstanceStatsParams**kwargs) -> InstanceStatsResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/stats
Search
aisearch.namespaces.instances.search(strid, InstanceSearchParams**kwargs) -> InstanceSearchResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/search
Chat Completions
aisearch.namespaces.instances.chat_completions(strid, InstanceChatCompletionsParams**kwargs) -> InstanceChatCompletionsResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/chat/completions
ModelsExpand Collapse
class InstanceListResponse:
id: str
ai_gateway_id: Optional[str]
aisearch_model: Optional[str]
cache: bool
cache_threshold: Optional[Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]]
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: Literal[600, 1800, 3600, 7 more]
One of the following:
600
1800
3600
7200
21600
43200
86400
172800
259200
518400
chunk: bool
chunk_overlap: Optional[float]
chunk_size: Optional[float]
created_at: datetime
formatdate-time
created_by: Optional[str]
custom_metadata: Optional[List[CustomMetadata]]
data_type: Literal["text", "number", "boolean", "datetime"]
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: str
embedding_model: Optional[str]
enable: bool
engine_version: float
fusion_method: Literal["max", "rrf"]
One of the following:
"max"
"rrf"
hybrid_search_enabled: bool
index_method: IndexMethod
keyword: bool
vector: bool
indexing_options: Optional[IndexingOptions]
keyword_tokenizer: Optional[Literal["porter", "trigram"]]
One of the following:
"porter"
"trigram"
last_activity: Optional[datetime]
formatdate-time
max_num_results: Optional[float]
metadata: Optional[Metadata]
created_from_aisearch_wizard: Optional[bool]
worker_domain: Optional[str]
modified_at: datetime
formatdate-time
modified_by: Optional[str]
namespace: str
paused: bool
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]
custom_domains: Optional[List[str]]
default_domain_enabled: Optional[bool]
enabled: Optional[bool]
mcp: Optional[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]
rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]
reranking: bool
reranking_model: Optional[str]
retrieval_options: Optional[RetrievalOptions]
boost_by: Optional[List[RetrievalOptionsBoostBy]]
field: str
maxLength64
minLength1
data_type: Optional[Literal["number", "datetime", "text", "boolean"]]
One of the following:
"number"
"datetime"
"text"
"boolean"
direction: Optional[Literal["asc", "desc", "exists", "not_exists"]]
One of the following:
"asc"
"desc"
"exists"
"not_exists"
keyword_match_mode: Optional[Literal["and", "or"]]
One of the following:
"and"
"or"
rewrite_model: Optional[str]
rewrite_query: bool
score_threshold: Optional[float]
source: Optional[str]
source_params: Optional[SourceParams]
exclude_items: Optional[List[str]]
include_items: Optional[List[str]]
prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
discover_options: Optional[SourceParamsWebCrawlerDiscoverOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
limit: Optional[float]

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[float]
maximum604800
minimum0
source: Optional[Literal["all", "sitemaps", "links"]]
One of the following:
"all"
"sitemaps"
"links"
parse_options: Optional[SourceParamsWebCrawlerParseOptions]
content_selector: Optional[List[SourceParamsWebCrawlerParseOptionsContentSelector]]
path: str
maxLength200
minLength1
selector: str
maxLength200
minLength1
include_headers: Optional[Dict[str, str]]
include_images: Optional[bool]
specific_sitemaps: Optional[List[str]]
use_browser_rendering: Optional[bool]
parse_type: Optional[Literal["sitemap", "discover"]]
One of the following:
"sitemap"
"discover"
status: str
summarization: bool
summarization_model: Optional[str]
sync_interval: Literal[900, 1800, 3600, 5 more]
One of the following:
900
1800
3600
7200
14400
21600
43200
86400
system_prompt_index_summarization: Optional[str]
system_prompt_rewrite_query: Optional[str]
token_id: Optional[str]
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceCreateResponse:
id: str

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

maxLength64
minLength1
created_at: datetime
formatdate-time
modified_at: datetime
formatdate-time
ai_gateway_id: Optional[str]
aisearch_model: Optional[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
cache_threshold: Optional[Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]]
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: Optional[Literal[600, 1800, 3600, 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[int]
maximum30
minimum0
chunk_size: Optional[int]
minimum64
created_by: Optional[str]
custom_metadata: Optional[List[CustomMetadata]]
data_type: Literal["text", "number", "boolean", "datetime"]
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: str
maxLength64
minLength1
embedding_model: Optional[Literal["@cf/qwen/qwen3-embedding-0.6b", "@cf/qwen/qwen3-vl-embedding-2b", "@cf/baai/bge-m3", 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[bool]
engine_version: Optional[float]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: Optional[bool]

Deprecated — use index_method instead.

index_method: Optional[IndexMethod]

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

keyword: bool

Enable keyword (BM25) storage backend.

vector: bool

Enable vector (embedding) storage backend.

indexing_options: Optional[IndexingOptions]
keyword_tokenizer: Optional[Literal["porter", "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[datetime]
formatdate-time
max_num_results: Optional[int]
maximum50
minimum1
metadata: Optional[Metadata]
created_from_aisearch_wizard: Optional[bool]
worker_domain: Optional[str]
modified_by: Optional[str]
namespace: Optional[str]
paused: Optional[bool]
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
mcp: Optional[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

reranking: Optional[bool]
reranking_model: Optional[Literal["@cf/baai/bge-reranker-base", ""]]
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: Optional[RetrievalOptions]
boost_by: Optional[List[RetrievalOptionsBoostBy]]

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: str

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[Literal["asc", "desc", "exists", "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[Literal["and", "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[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
score_threshold: Optional[float]
maximum1
minimum0
source: Optional[str]
source_params: Optional[SourceParams]
exclude_items: Optional[List[str]]

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[List[str]]

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[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
discover_options: Optional[SourceParamsWebCrawlerDiscoverOptions]

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

depth: Optional[float]

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: Optional[bool]

Follow links to subdomains of the source host.

limit: Optional[float]

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

maximum100000
minimum1
max_age: Optional[float]

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

maximum604800
minimum0
source: Optional[Literal["all", "sitemaps", "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[SourceParamsWebCrawlerParseOptions]
content_selector: Optional[List[SourceParamsWebCrawlerParseOptionsContentSelector]]

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: str

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

maxLength200
minLength1
selector: str

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[Dict[str, str]]

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[bool]
specific_sitemaps: Optional[List[str]]

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

use_browser_rendering: Optional[bool]
parse_type: Optional[Literal["sitemap", "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[str]
sync_interval: Optional[Literal[900, 1800, 3600, 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[str]
formatuuid
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceReadResponse:
id: str

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

maxLength64
minLength1
created_at: datetime
formatdate-time
modified_at: datetime
formatdate-time
ai_gateway_id: Optional[str]
aisearch_model: Optional[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
cache_threshold: Optional[Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]]
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: Optional[Literal[600, 1800, 3600, 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[int]
maximum30
minimum0
chunk_size: Optional[int]
minimum64
created_by: Optional[str]
custom_metadata: Optional[List[CustomMetadata]]
data_type: Literal["text", "number", "boolean", "datetime"]
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: str
maxLength64
minLength1
embedding_model: Optional[Literal["@cf/qwen/qwen3-embedding-0.6b", "@cf/qwen/qwen3-vl-embedding-2b", "@cf/baai/bge-m3", 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[bool]
engine_version: Optional[float]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: Optional[bool]

Deprecated — use index_method instead.

index_method: Optional[IndexMethod]

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

keyword: bool

Enable keyword (BM25) storage backend.

vector: bool

Enable vector (embedding) storage backend.

indexing_options: Optional[IndexingOptions]
keyword_tokenizer: Optional[Literal["porter", "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[datetime]
formatdate-time
max_num_results: Optional[int]
maximum50
minimum1
metadata: Optional[Metadata]
created_from_aisearch_wizard: Optional[bool]
worker_domain: Optional[str]
modified_by: Optional[str]
namespace: Optional[str]
paused: Optional[bool]
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
mcp: Optional[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

reranking: Optional[bool]
reranking_model: Optional[Literal["@cf/baai/bge-reranker-base", ""]]
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: Optional[RetrievalOptions]
boost_by: Optional[List[RetrievalOptionsBoostBy]]

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: str

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[Literal["asc", "desc", "exists", "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[Literal["and", "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[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
score_threshold: Optional[float]
maximum1
minimum0
source: Optional[str]
source_params: Optional[SourceParams]
exclude_items: Optional[List[str]]

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[List[str]]

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[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
discover_options: Optional[SourceParamsWebCrawlerDiscoverOptions]

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

depth: Optional[float]

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: Optional[bool]

Follow links to subdomains of the source host.

limit: Optional[float]

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

maximum100000
minimum1
max_age: Optional[float]

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

maximum604800
minimum0
source: Optional[Literal["all", "sitemaps", "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[SourceParamsWebCrawlerParseOptions]
content_selector: Optional[List[SourceParamsWebCrawlerParseOptionsContentSelector]]

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: str

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

maxLength200
minLength1
selector: str

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[Dict[str, str]]

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[bool]
specific_sitemaps: Optional[List[str]]

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

use_browser_rendering: Optional[bool]
parse_type: Optional[Literal["sitemap", "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[str]
sync_interval: Optional[Literal[900, 1800, 3600, 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[str]
formatuuid
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceUpdateResponse:
id: str

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

maxLength64
minLength1
created_at: datetime
formatdate-time
modified_at: datetime
formatdate-time
ai_gateway_id: Optional[str]
aisearch_model: Optional[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
cache_threshold: Optional[Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]]
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: Optional[Literal[600, 1800, 3600, 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[int]
maximum30
minimum0
chunk_size: Optional[int]
minimum64
created_by: Optional[str]
custom_metadata: Optional[List[CustomMetadata]]
data_type: Literal["text", "number", "boolean", "datetime"]
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: str
maxLength64
minLength1
embedding_model: Optional[Literal["@cf/qwen/qwen3-embedding-0.6b", "@cf/qwen/qwen3-vl-embedding-2b", "@cf/baai/bge-m3", 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[bool]
engine_version: Optional[float]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: Optional[bool]

Deprecated — use index_method instead.

index_method: Optional[IndexMethod]

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

keyword: bool

Enable keyword (BM25) storage backend.

vector: bool

Enable vector (embedding) storage backend.

indexing_options: Optional[IndexingOptions]
keyword_tokenizer: Optional[Literal["porter", "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[datetime]
formatdate-time
max_num_results: Optional[int]
maximum50
minimum1
metadata: Optional[Metadata]
created_from_aisearch_wizard: Optional[bool]
worker_domain: Optional[str]
modified_by: Optional[str]
namespace: Optional[str]
paused: Optional[bool]
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
mcp: Optional[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

reranking: Optional[bool]
reranking_model: Optional[Literal["@cf/baai/bge-reranker-base", ""]]
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: Optional[RetrievalOptions]
boost_by: Optional[List[RetrievalOptionsBoostBy]]

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: str

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[Literal["asc", "desc", "exists", "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[Literal["and", "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[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
score_threshold: Optional[float]
maximum1
minimum0
source: Optional[str]
source_params: Optional[SourceParams]
exclude_items: Optional[List[str]]

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[List[str]]

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[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
discover_options: Optional[SourceParamsWebCrawlerDiscoverOptions]

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

depth: Optional[float]

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: Optional[bool]

Follow links to subdomains of the source host.

limit: Optional[float]

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

maximum100000
minimum1
max_age: Optional[float]

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

maximum604800
minimum0
source: Optional[Literal["all", "sitemaps", "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[SourceParamsWebCrawlerParseOptions]
content_selector: Optional[List[SourceParamsWebCrawlerParseOptionsContentSelector]]

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: str

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

maxLength200
minLength1
selector: str

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[Dict[str, str]]

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[bool]
specific_sitemaps: Optional[List[str]]

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

use_browser_rendering: Optional[bool]
parse_type: Optional[Literal["sitemap", "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[str]
sync_interval: Optional[Literal[900, 1800, 3600, 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[str]
formatuuid
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceDeleteResponse:
id: str

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

maxLength64
minLength1
created_at: datetime
formatdate-time
modified_at: datetime
formatdate-time
ai_gateway_id: Optional[str]
aisearch_model: Optional[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
cache_threshold: Optional[Literal["super_strict_match", "close_enough", "flexible_friend", "anything_goes"]]
One of the following:
"super_strict_match"
"close_enough"
"flexible_friend"
"anything_goes"
cache_ttl: Optional[Literal[600, 1800, 3600, 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[int]
maximum30
minimum0
chunk_size: Optional[int]
minimum64
created_by: Optional[str]
custom_metadata: Optional[List[CustomMetadata]]
data_type: Literal["text", "number", "boolean", "datetime"]
One of the following:
"text"
"number"
"boolean"
"datetime"
field_name: str
maxLength64
minLength1
embedding_model: Optional[Literal["@cf/qwen/qwen3-embedding-0.6b", "@cf/qwen/qwen3-vl-embedding-2b", "@cf/baai/bge-m3", 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[bool]
engine_version: Optional[float]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
Deprecatedhybrid_search_enabled: Optional[bool]

Deprecated — use index_method instead.

index_method: Optional[IndexMethod]

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

keyword: bool

Enable keyword (BM25) storage backend.

vector: bool

Enable vector (embedding) storage backend.

indexing_options: Optional[IndexingOptions]
keyword_tokenizer: Optional[Literal["porter", "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[datetime]
formatdate-time
max_num_results: Optional[int]
maximum50
minimum1
metadata: Optional[Metadata]
created_from_aisearch_wizard: Optional[bool]
worker_domain: Optional[str]
modified_by: Optional[str]
namespace: Optional[str]
paused: Optional[bool]
public_endpoint_id: Optional[str]
public_endpoint_params: Optional[PublicEndpointParams]
authorized_hosts: Optional[List[str]]
chat_completions_endpoint: Optional[PublicEndpointParamsChatCompletionsEndpoint]
disabled: Optional[bool]

Disable chat completions endpoint for this public endpoint

custom_domains: Optional[List[str]]

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[bool]

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[bool]
mcp: Optional[PublicEndpointParamsMcp]
description: Optional[str]
disabled: Optional[bool]

Disable MCP endpoint for this public endpoint

rate_limit: Optional[PublicEndpointParamsRateLimit]
period_ms: Optional[int]
maximum3600000
minimum60000
requests: Optional[int]
minimum1
technique: Optional[Literal["fixed", "sliding"]]
One of the following:
"fixed"
"sliding"
search_endpoint: Optional[PublicEndpointParamsSearchEndpoint]
disabled: Optional[bool]

Disable search endpoint for this public endpoint

reranking: Optional[bool]
reranking_model: Optional[Literal["@cf/baai/bge-reranker-base", ""]]
One of the following:
"@cf/baai/bge-reranker-base"
""
retrieval_options: Optional[RetrievalOptions]
boost_by: Optional[List[RetrievalOptionsBoostBy]]

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: str

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[Literal["asc", "desc", "exists", "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[Literal["and", "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[Literal["@cf/meta/llama-3.3-70b-instruct-fp8-fast", "@cf/zai-org/glm-4.7-flash", "@cf/meta/llama-3.1-8b-instruct-fast", 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[bool]
score_threshold: Optional[float]
maximum1
minimum0
source: Optional[str]
source_params: Optional[SourceParams]
exclude_items: Optional[List[str]]

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[List[str]]

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[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
discover_options: Optional[SourceParamsWebCrawlerDiscoverOptions]

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

depth: Optional[float]

Maximum link-follow depth from the seed URL.

maximum100000
minimum1
include_subdomains: Optional[bool]

Follow links to subdomains of the source host.

limit: Optional[float]

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

maximum100000
minimum1
max_age: Optional[float]

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

maximum604800
minimum0
source: Optional[Literal["all", "sitemaps", "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[SourceParamsWebCrawlerParseOptions]
content_selector: Optional[List[SourceParamsWebCrawlerParseOptionsContentSelector]]

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: str

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

maxLength200
minLength1
selector: str

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[Dict[str, str]]

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[bool]
specific_sitemaps: Optional[List[str]]

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

use_browser_rendering: Optional[bool]
parse_type: Optional[Literal["sitemap", "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[str]
sync_interval: Optional[Literal[900, 1800, 3600, 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[str]
formatuuid
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceStatsResponse:
completed: Optional[int]
degraded: Optional[bool]

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

engine: Optional[Engine]

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

r2: Optional[EngineR2]

R2 bucket storage usage in bytes.

metadata_size_bytes: int
object_count: int
payload_size_bytes: int
vectorize: Optional[EngineVectorize]

Vectorize index metadata (dimensions, vector count).

dimensions: int
vectors_count: int
error: Optional[int]
file_embed_errors: Optional[Dict[str, object]]
index_source_errors: Optional[Dict[str, object]]
last_activity: Optional[datetime]
formatdate-time
outdated: Optional[int]
queued: Optional[int]
running: Optional[int]
skipped: Optional[int]
class InstanceSearchResponse:
chunks: List[Chunk]
id: str
score: float
maximum1
minimum0
text: str
type: str
item: Optional[ChunkItem]
key: str
metadata: Optional[Dict[str, object]]
timestamp: Optional[float]
scoring_details: Optional[ChunkScoringDetails]
fusion_method: Optional[Literal["rrf", "max"]]
One of the following:
"rrf"
"max"
keyword_rank: Optional[float]
keyword_score: Optional[float]
minimum0
reranking_score: Optional[float]
maximum1
minimum0
vector_rank: Optional[float]
vector_score: Optional[float]
maximum1
minimum0
query_kind: Literal["text", "image", "multimodal"]
One of the following:
"text"
"image"
"multimodal"
search_query: Optional[str]
class InstanceChatCompletionsResponse:
choices: List[Choice]
message: ChoiceMessage
content: Union[str, List[ChoiceMessageContentUnionMember1], null]
One of the following:
str
List[ChoiceMessageContentUnionMember1]
One of the following:
class ChoiceMessageContentUnionMember1UnionMember0:
text: str
minLength1
type: Literal["text"]
class ChoiceMessageContentUnionMember1UnionMember1:
image_url: ChoiceMessageContentUnionMember1UnionMember1ImageURL
url: str
maxLength20971520
minLength1
type: Literal["image_url"]
class ChoiceMessageContentUnionMember1UnionMember2:
file: ChoiceMessageContentUnionMember1UnionMember2File
filename: str
maxLength255
minLength1
file_data: Optional[str]
maxLength13981144
minLength1
file_id: Optional[str]
type: Literal["file"]
role: Literal["system", "developer", "user", 2 more]
One of the following:
"system"
"developer"
"user"
"assistant"
"tool"
index: Optional[int]
chunks: List[Chunk]
id: str
score: float
maximum1
minimum0
text: str
type: str
item: Optional[ChunkItem]
key: str
metadata: Optional[Dict[str, object]]
timestamp: Optional[float]
scoring_details: Optional[ChunkScoringDetails]
fusion_method: Optional[Literal["rrf", "max"]]
One of the following:
"rrf"
"max"
keyword_rank: Optional[float]
keyword_score: Optional[float]
minimum0
reranking_score: Optional[float]
maximum1
minimum0
vector_rank: Optional[float]
vector_score: Optional[float]
maximum1
minimum0
id: Optional[str]
model: Optional[str]
object: Optional[str]

NamespacesInstancesJobs

List Jobs
aisearch.namespaces.instances.jobs.list(strid, JobListParams**kwargs) -> SyncV4PagePaginationArray[JobListResponse]
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs
Create new job
aisearch.namespaces.instances.jobs.create(strid, JobCreateParams**kwargs) -> JobCreateResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs
Get a Job Details
aisearch.namespaces.instances.jobs.get(strjob_id, JobGetParams**kwargs) -> JobGetResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}
Cancel an indexing job.
aisearch.namespaces.instances.jobs.update(strjob_id, JobUpdateParams**kwargs) -> JobUpdateResponse
PATCH/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}
List Job Logs
aisearch.namespaces.instances.jobs.logs(strjob_id, JobLogsParams**kwargs) -> JobLogsResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/jobs/{job_id}/logs
ModelsExpand Collapse
class JobListResponse:
id: str
source: Literal["user", "schedule"]
One of the following:
"user"
"schedule"
description: Optional[str]
end_reason: Optional[str]
ended_at: Optional[str]
last_seen_at: Optional[str]
started_at: Optional[str]
class JobCreateResponse:
id: str
source: Literal["user", "schedule"]
One of the following:
"user"
"schedule"
description: Optional[str]
end_reason: Optional[str]
ended_at: Optional[str]
last_seen_at: Optional[str]
started_at: Optional[str]
class JobGetResponse:
id: str
source: Literal["user", "schedule"]
One of the following:
"user"
"schedule"
description: Optional[str]
end_reason: Optional[str]
ended_at: Optional[str]
last_seen_at: Optional[str]
started_at: Optional[str]
class JobUpdateResponse:
id: str
source: Literal["user", "schedule"]
One of the following:
"user"
"schedule"
description: Optional[str]
end_reason: Optional[str]
ended_at: Optional[str]
last_seen_at: Optional[str]
started_at: Optional[str]
List[JobLogsResponseItem]
id: int
created_at: float
message: str
message_type: int

NamespacesInstancesItems

Items List.
aisearch.namespaces.instances.items.list(strid, ItemListParams**kwargs) -> SyncV4PagePaginationArray[ItemListResponse]
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Upload Item.
aisearch.namespaces.instances.items.upload(strid, ItemUploadParams**kwargs) -> ItemUploadResponse
POST/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Create or Update Item.
aisearch.namespaces.instances.items.create_or_update(strid, ItemCreateOrUpdateParams**kwargs) -> ItemCreateOrUpdateResponse
PUT/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items
Get Item.
aisearch.namespaces.instances.items.get(stritem_id, ItemGetParams**kwargs) -> ItemGetResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Sync Item.
aisearch.namespaces.instances.items.sync(stritem_id, ItemSyncParams**kwargs) -> ItemSyncResponse
PATCH/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Delete Item.
aisearch.namespaces.instances.items.delete(stritem_id, ItemDeleteParams**kwargs) -> ItemDeleteResponse
DELETE/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}
Download Item Content.
aisearch.namespaces.instances.items.download(stritem_id, ItemDownloadParams**kwargs) -> BinaryResponseContent
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/download
Item Logs.
aisearch.namespaces.instances.items.logs(stritem_id, ItemLogsParams**kwargs) -> ItemLogsResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/logs
List Item Chunks.
aisearch.namespaces.instances.items.chunks(stritem_id, ItemChunksParams**kwargs) -> ItemChunksResponse
GET/accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/items/{item_id}/chunks
ModelsExpand Collapse
class ItemListResponse:
id: str
checksum: str
chunks_count: Optional[int]
created_at: datetime
formatdate-time
file_size: Optional[float]
key: str
last_seen_at: datetime
formatdate-time
metadata: Optional[Dict[str, Union[str, float, bool]]]

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

One of the following:
str
float
bool
namespace: str
next_action: Optional[Literal["INDEX", "DELETE"]]
One of the following:
"INDEX"
"DELETE"
source_id: Optional[str]

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

status: Literal["queued", "running", "completed", 3 more]
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: Optional[str]
class ItemUploadResponse:
id: str
checksum: str
chunks_count: Optional[int]
created_at: datetime
formatdate-time
file_size: Optional[float]
key: str
last_seen_at: datetime
formatdate-time
metadata: Optional[Dict[str, Union[str, float, bool]]]

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

One of the following:
str
float
bool
namespace: str
next_action: Optional[Literal["INDEX", "DELETE"]]
One of the following:
"INDEX"
"DELETE"
source_id: Optional[str]

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

status: Literal["queued", "running", "completed", 3 more]
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: Optional[str]
class ItemCreateOrUpdateResponse:
id: str
checksum: str
chunks_count: Optional[int]
created_at: datetime
formatdate-time
file_size: Optional[float]
key: str
last_seen_at: datetime
formatdate-time
metadata: Optional[Dict[str, Union[str, float, bool]]]

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

One of the following:
str
float
bool
namespace: str
next_action: Optional[Literal["INDEX", "DELETE"]]
One of the following:
"INDEX"
"DELETE"
source_id: Optional[str]

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

status: Literal["queued", "running", "completed", 3 more]
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: Optional[str]
class ItemGetResponse:
id: str
checksum: str
chunks_count: Optional[int]
created_at: datetime
formatdate-time
file_size: Optional[float]
key: str
last_seen_at: datetime
formatdate-time
metadata: Optional[Dict[str, Union[str, float, bool]]]

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

One of the following:
str
float
bool
namespace: str
next_action: Optional[Literal["INDEX", "DELETE"]]
One of the following:
"INDEX"
"DELETE"
source_id: Optional[str]

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

status: Literal["queued", "running", "completed", 3 more]
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: Optional[str]
class ItemSyncResponse:
id: str
checksum: str
chunks_count: Optional[int]
created_at: datetime
formatdate-time
file_size: Optional[float]
key: str
last_seen_at: datetime
formatdate-time
metadata: Optional[Dict[str, Union[str, float, bool]]]

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

One of the following:
str
float
bool
namespace: str
next_action: Optional[Literal["INDEX", "DELETE"]]
One of the following:
"INDEX"
"DELETE"
source_id: Optional[str]

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

status: Literal["queued", "running", "completed", 3 more]
One of the following:
"queued"
"running"
"completed"
"error"
"skipped"
"outdated"
error: Optional[str]
class ItemDeleteResponse:
key: str
List[ItemLogsResponseItem]
action: str
chunk_count: Optional[int]
error_type: Optional[str]
file_key: str
message: Optional[str]
processing_time_ms: Optional[int]
timestamp: datetime
formatdate-time
List[ItemChunksResponseItem]
id: str
item: ItemChunksResponseItemItem
key: str
metadata: Optional[Dict[str, object]]
timestamp: Optional[float]
text: str
end_byte: Optional[float]
start_byte: Optional[float]