AI Search (2)·续26

<a href="#(resource)%20ai_search.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.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.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.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.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.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.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.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.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.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

<a href="#(resource)%20ai_search.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)%20selector">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.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">Link to this property</a>

include_headers: optional map[string]

Up to 5 custom HTTP headers sent with each crawl request. Names must use RFC-7230 token characters, excluding spaces, colons, and control characters. Values must use HTAB and printable ASCII only, excluding CR and LF.

<a href="#(resource)%20ai_search.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)%20include_headers">Link to this property</a>

include_images: optional boolean

<a href="#(resource)%20ai_search.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)%20include_images">Link to this property</a>

specific_sitemaps: optional array of string

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

<a href="#(resource)%20ai_search.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)%20specific_sitemaps">Link to this property</a>

use_browser_rendering: optional boolean

<a href="#(resource)%20ai_search.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)%20use_browser_rendering">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.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">Link to this property</a>

<details>

<summary>

parse_type: optional "sitemap"or "discover"

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

</summary>

One of the following:

"sitemap"

<a href="#(resource)%20ai_search.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_type%20%3E%20(member)%200">Link to this property</a>

"discover"

<a href="#(resource)%20ai_search.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_type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20ai_search.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_type">Link to this property</a>

</details>

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

</details>

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

status: optional string

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

<details>

<summary>

sync_interval: optional 900or 1800or 3600or 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). Defaults to 21600 (6h); instances crawling a domain outside the account may be set to 86400.

</summary>

One of the following:

900

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

1800

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

3600

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

7200

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

14400

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

21600

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

43200

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

86400

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

</details>

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

token_id: optional string

formatuuid

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

<details>

<summary>

type: optional "r2"or "web-crawler"

Source type. When omitted or null with a non-blank source, HTTP(S) URLs infer web-crawler and existing R2 bucket names infer r2. A missing or blank source without a type uses managed upload-only storage.

</summary>

One of the following:

"r2"

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

"web-crawler"

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

</details>

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

</details>

Link to this property

<details>

<summary>

InstanceUpdateResponse object {id, created_at, modified_at, 36 more }

</summary>

id: string

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

maxLength64

minLength1

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

created_at: string

formatdate-time

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

modified_at: string

formatdate-time

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

ai_gateway_id: optional string

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

ai_search_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.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20ai_search_model">Link to this property</a>

cache: optional boolean

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

<details>

<summary>

cache_threshold: optional "super_strict_match"or "close_enough"or "flexible_friend"or "anything_goes"

</summary>

One of the following:

"super_strict_match"

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

"close_enough"

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

"flexible_friend"

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_threshold%20%3E%20(member)%202">Link to this property</a>

"anything_goes"

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_threshold%20%3E%20(member)%203">Link to this property</a>

</details>

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

<details>

<summary>

cache_ttl: optional 600or 1800or 3600or 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).

</summary>

One of the following:

600

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

1800

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

3600

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%202">Link to this property</a>

7200

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%203">Link to this property</a>

21600

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%204">Link to this property</a>

43200

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%205">Link to this property</a>

86400

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%206">Link to this property</a>

172800

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%207">Link to this property</a>

259200

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%208">Link to this property</a>

518400

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20cache_ttl%20%3E%20(member)%209">Link to this property</a>

</details>

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

chunk_overlap: optional number

maximum30

minimum0

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

chunk_size: optional number

minimum64

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

created_by: optional string

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

<details>

<summary>

custom_metadata: optional array of object {data_type, field_name }

</summary>

<details>

<summary>

data_type: "text"or "number"or "boolean"or "datetime"

</summary>

One of the following:

"text"

<a href="#(resource)%20ai_search.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20custom_metadata%20%3E%20(items)%20%3E%20(property)%20data_type%20%3E%20(member)%200">Link to this property</a>