AI Search (2)·续9

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20custom_domains">Link to this property</a>

default_domain_enabled: optional boolean

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

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20default_domain_enabled">Link to this property</a>

enabled: optional boolean

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

mcp: optional object {description, disabled }

</summary>

description: optional string

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20mcp%20%3E%20(property)%20description">Link to this property</a>

disabled: optional boolean

Disable MCP endpoint for this public endpoint.

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20mcp%20%3E%20(property)%20disabled">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20mcp">Link to this property</a>

<details>

<summary>

rate_limit: optional object {period_ms, requests, technique }

</summary>

period_ms: optional number

maximum3600000

minimum60000

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit%20%3E%20(property)%20period_ms">Link to this property</a>

requests: optional number

minimum1

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit%20%3E%20(property)%20requests">Link to this property</a>

<details>

<summary>

technique: optional "fixed"or "sliding"

</summary>

One of the following:

"fixed"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit%20%3E%20(property)%20technique%20%3E%20(member)%200">Link to this property</a>

"sliding"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit%20%3E%20(property)%20technique%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit%20%3E%20(property)%20technique">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20rate_limit">Link to this property</a>

<details>

<summary>

search_endpoint: optional object {disabled }

</summary>

disabled: optional boolean

Disable search endpoint for this public endpoint.

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20search_endpoint%20%3E%20(property)%20disabled">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params%20%3E%20(property)%20search_endpoint">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20public_endpoint_params">Link to this property</a>

reranking: optional boolean

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20reranking">Link to this property</a>

reranking_model: optional string

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20reranking_model">Link to this property</a>

<details>

<summary>

retrieval_options: optional object {boost_by, keyword_match_mode }

</summary>

<details>

<summary>

boost_by: optional array of object {field, direction }

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

</summary>

field: string

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

maxLength64

minLength1

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20field">Link to this property</a>

<details>

<summary>

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

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

</summary>

One of the following:

"asc"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20direction%20%3E%20(member)%200">Link to this property</a>

"desc"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20direction%20%3E%20(member)%201">Link to this property</a>

"exists"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20direction%20%3E%20(member)%202">Link to this property</a>

"not_exists"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20direction%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by%20%3E%20(items)%20%3E%20(property)%20direction">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20boost_by">Link to this property</a>

<details>

<summary>

keyword_match_mode: optional "and"or "or"

Controls which documents become candidates for BM25 scoring. ‘and’ restricts candidates to documents containing all query terms; ‘or’ includes any document containing at least one term and ranks results according to BM25 relevance. When omitted on an update, the existing stored value stays unchanged; when never set, search falls back to ‘and’.

</summary>

One of the following:

"and"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20keyword_match_mode%20%3E%20(member)%200">Link to this property</a>

"or"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20keyword_match_mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options%20%3E%20(property)%20keyword_match_mode">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20retrieval_options">Link to this property</a>

rewrite_model: optional string

A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20rewrite_model">Link to this property</a>

rewrite_query: optional boolean

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20rewrite_query">Link to this property</a>

score_threshold: optional number

Minimum similarity score a chunk must reach to be returned. Defaults to 0.4.

maximum1

minimum0

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20score_threshold">Link to this property</a>

source: optional string

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

<details>

<summary>

source_params: optional object {exclude_items, include_items, prefix, 2 more }

</summary>

exclude_items: optional array of string

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

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20exclude_items">Link to this property</a>

include_items: optional array of string

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

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20include_items">Link to this property</a>

prefix: optional string

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20prefix">Link to this property</a>

r2_jurisdiction: optional string

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20r2_jurisdiction">Link to this property</a>

<details>

<summary>

web_crawler: optional object {discover_options, parse_options, parse_type }

</summary>

<details>

<summary>

discover_options: optional object {depth, include_external_links, include_subdomains, 3 more }

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

</summary>

depth: optional number

Maximum link-follow depth from the seed URL.

maximum100000

minimum1

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20depth">Link to this property</a>

include_external_links: optional boolean

Follow links that point outside the source domain. Must stay <code>false</code> because discover crawls only cover the zone you own.

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20include_external_links">Link to this property</a>

include_subdomains: optional boolean

Follow links to subdomains of the source host.

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20include_subdomains">Link to this property</a>

limit: optional number

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

maximum100000

minimum1

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20limit">Link to this property</a>

max_age: optional number

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

maximum604800

minimum0

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20max_age">Link to this property</a>

<details>

<summary>

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

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

</summary>

One of the following:

"all"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20source%20%3E%20(member)%200">Link to this property</a>

"sitemaps"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20source%20%3E%20(member)%201">Link to this property</a>

"links"

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20source%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20discover_options">Link to this property</a>

<details>

<summary>

parse_options: optional object {content_selector, include_headers, include_images, 2 more }

</summary>

<details>

<summary>

content_selector: optional array of object {path, selector }

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. The crawler stores and indexes only the matched HTML fragment. Omit the field to disable content selection; the API rejects empty arrays.

</summary>

path: string

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

maxLength200

minLength1

<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_read_response%20%3E%20(schema)%20%3E%20(property)%20source_params%20%3E%20(property)%20web_crawler%20%3E%20(property)%20parse_options%20%3E%20(property)%20content_selector%20%3E%20(items)%20%3E%20(property)%20path">Link to this property</a>

selector: string

CSS selector to extract content from pages matching the path pattern. Disallowed characters: ;, `, $, {, }, . Must target a single element; if multiple elements match, the crawler ignores the selector and uses the full page.

maxLength200

minLength1