AI Search (2)·续12
source: optional string
<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20source_params">Link to this property</a>
status: optional string
<a href="#(resource)%20ai_search.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_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.namespaces.instances%20%3E%20(model)%20instance_update_response%20%3E%20(schema)%20%3E%20(property)%20type">Link to this property</a>
</details>
<details>
<summary>
InstanceDeleteResponse 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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_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.namespaces.instances%20%3E%20(model)%20instance_delete_response%20%3E%20(schema)%20%3E%20(property)%20cache_threshold">Link to this property</a>
<details>
