Skip to content
Start here

Instances

List instances.
aisearch.instances.list(InstanceListParams**kwargs) -> SyncV4PagePaginationArray[InstanceListResponse]
GET/accounts/{account_id}/ai-search/instances
Create new instances.
aisearch.instances.create(InstanceCreateParams**kwargs) -> InstanceCreateResponse
POST/accounts/{account_id}/ai-search/instances
Read instances.
aisearch.instances.read(strid, InstanceReadParams**kwargs) -> InstanceReadResponse
GET/accounts/{account_id}/ai-search/instances/{id}
Update instances.
aisearch.instances.update(strid, InstanceUpdateParams**kwargs) -> InstanceUpdateResponse
PUT/accounts/{account_id}/ai-search/instances/{id}
Delete instances.
aisearch.instances.delete(strid, InstanceDeleteParams**kwargs) -> InstanceDeleteResponse
DELETE/accounts/{account_id}/ai-search/instances/{id}
Stats
aisearch.instances.stats(strid, InstanceStatsParams**kwargs) -> InstanceStatsResponse
GET/accounts/{account_id}/ai-search/instances/{id}/stats
Search
aisearch.instances.search(strid, InstanceSearchParams**kwargs) -> InstanceSearchResponse
POST/accounts/{account_id}/ai-search/instances/{id}/search
Chat Completions
aisearch.instances.chat_completions(strid, InstanceChatCompletionsParams**kwargs) -> InstanceChatCompletionsResponse
POST/accounts/{account_id}/ai-search/instances/{id}/chat/completions
ModelsExpand Collapse
class InstanceListResponse:
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", 25 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"
"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"
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/baai/bge-m3", "@cf/baai/bge-large-en-v1.5", 6 more]]
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@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"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: Optional[bool]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
hybrid_search_enabled: Optional[bool]
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]
maxLength32
minLength1
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

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 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 asc/desc directions; text/boolean fields 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["exact_match", "fuzzy_match"]]

Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match.

One of the following:
"exact_match"
"fuzzy_match"
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", 25 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"
"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)

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)

prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
crawl_options: Optional[SourceParamsWebCrawlerCrawlOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
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]]

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.

path: str

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

maxLength200
selector: str

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
include_headers: Optional[Dict[str, str]]
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", "feed-rss", "crawl"]]
One of the following:
"sitemap"
"feed-rss"
"crawl"
store_options: Optional[SourceParamsWebCrawlerStoreOptions]
storage_id: str
r2_jurisdiction: Optional[str]
storage_type: Optional[Provider]
status: Optional[str]
token_id: Optional[str]
formatuuid
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", 25 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"
"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"
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/baai/bge-m3", "@cf/baai/bge-large-en-v1.5", 6 more]]
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@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"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: Optional[bool]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
hybrid_search_enabled: Optional[bool]
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]
maxLength32
minLength1
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

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 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 asc/desc directions; text/boolean fields 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["exact_match", "fuzzy_match"]]

Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match.

One of the following:
"exact_match"
"fuzzy_match"
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", 25 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"
"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)

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)

prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
crawl_options: Optional[SourceParamsWebCrawlerCrawlOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
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]]

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.

path: str

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

maxLength200
selector: str

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
include_headers: Optional[Dict[str, str]]
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", "feed-rss", "crawl"]]
One of the following:
"sitemap"
"feed-rss"
"crawl"
store_options: Optional[SourceParamsWebCrawlerStoreOptions]
storage_id: str
r2_jurisdiction: Optional[str]
storage_type: Optional[Provider]
status: Optional[str]
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", 25 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"
"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"
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/baai/bge-m3", "@cf/baai/bge-large-en-v1.5", 6 more]]
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@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"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: Optional[bool]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
hybrid_search_enabled: Optional[bool]
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]
maxLength32
minLength1
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

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 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 asc/desc directions; text/boolean fields 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["exact_match", "fuzzy_match"]]

Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match.

One of the following:
"exact_match"
"fuzzy_match"
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", 25 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"
"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)

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)

prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
crawl_options: Optional[SourceParamsWebCrawlerCrawlOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
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]]

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.

path: str

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

maxLength200
selector: str

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
include_headers: Optional[Dict[str, str]]
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", "feed-rss", "crawl"]]
One of the following:
"sitemap"
"feed-rss"
"crawl"
store_options: Optional[SourceParamsWebCrawlerStoreOptions]
storage_id: str
r2_jurisdiction: Optional[str]
storage_type: Optional[Provider]
status: Optional[str]
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", 25 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"
"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"
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/baai/bge-m3", "@cf/baai/bge-large-en-v1.5", 6 more]]
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@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"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: Optional[bool]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
hybrid_search_enabled: Optional[bool]
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]
maxLength32
minLength1
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

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 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 asc/desc directions; text/boolean fields 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["exact_match", "fuzzy_match"]]

Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match.

One of the following:
"exact_match"
"fuzzy_match"
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", 25 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"
"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)

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)

prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
crawl_options: Optional[SourceParamsWebCrawlerCrawlOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
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]]

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.

path: str

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

maxLength200
selector: str

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
include_headers: Optional[Dict[str, str]]
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", "feed-rss", "crawl"]]
One of the following:
"sitemap"
"feed-rss"
"crawl"
store_options: Optional[SourceParamsWebCrawlerStoreOptions]
storage_id: str
r2_jurisdiction: Optional[str]
storage_type: Optional[Provider]
status: Optional[str]
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", 25 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"
"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"
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/baai/bge-m3", "@cf/baai/bge-large-en-v1.5", 6 more]]
One of the following:
"@cf/qwen/qwen3-embedding-0.6b"
"@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"
"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
""
enable: Optional[bool]
fusion_method: Optional[Literal["max", "rrf"]]
One of the following:
"max"
"rrf"
hybrid_search_enabled: Optional[bool]
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]
maxLength32
minLength1
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

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 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 asc/desc directions; text/boolean fields 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["exact_match", "fuzzy_match"]]

Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match.

One of the following:
"exact_match"
"fuzzy_match"
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", 25 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"
"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)

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)

prefix: Optional[str]
r2_jurisdiction: Optional[str]
web_crawler: Optional[SourceParamsWebCrawler]
crawl_options: Optional[SourceParamsWebCrawlerCrawlOptions]
depth: Optional[float]
maximum100000
minimum1
include_subdomains: Optional[bool]
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]]

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.

path: str

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

maxLength200
selector: str

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
include_headers: Optional[Dict[str, str]]
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", "feed-rss", "crawl"]]
One of the following:
"sitemap"
"feed-rss"
"crawl"
store_options: Optional[SourceParamsWebCrawlerStoreOptions]
storage_id: str
r2_jurisdiction: Optional[str]
storage_type: Optional[Provider]
status: Optional[str]
token_id: Optional[str]
formatuuid
type: Optional[Literal["r2", "web-crawler"]]
One of the following:
"r2"
"web-crawler"
class InstanceStatsResponse:
completed: Optional[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
search_query: str
class InstanceChatCompletionsResponse:
choices: List[Choice]
message: ChoiceMessage
content: Optional[str]
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]

InstancesItems

InstancesJobs

List Jobs
aisearch.instances.jobs.list(strid, JobListParams**kwargs) -> SyncV4PagePaginationArray[JobListResponse]
GET/accounts/{account_id}/ai-search/instances/{id}/jobs
Create new job
aisearch.instances.jobs.create(strid, JobCreateParams**kwargs) -> JobCreateResponse
POST/accounts/{account_id}/ai-search/instances/{id}/jobs
Get a Job Details
aisearch.instances.jobs.get(strjob_id, JobGetParams**kwargs) -> JobGetResponse
GET/accounts/{account_id}/ai-search/instances/{id}/jobs/{job_id}
List Job Logs
aisearch.instances.jobs.logs(strjob_id, JobLogsParams**kwargs) -> JobLogsResponse
GET/accounts/{account_id}/ai-search/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]
List[JobLogsResponseItem]
id: int
created_at: float
message: str
message_type: int