openapi: 3.2.0 info: description: Welcome to Cloudflare's API documentation site. license: name: BSD-3-Clause url: https://opensource.org/licenses/BSD-3-Clause title: Cloudflare AI Search Instances API version: 4.0.0 servers: - description: Client API url: https://api.cloudflare.com/client/v4 security: - api_email: [] api_key: [] - api_token: [] - user_service_key: [] tags: - name: AI Search Instances paths: /accounts/{account_id}/ai-search/instances: get: operationId: ai-search-list-instances summary: List AI Search instances description: 'List all AI Search instances in the account. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: page in: query description: Page number (1-indexed). schema: description: Page number (1-indexed). type: integer example: 1 default: 1 minimum: 1 - name: per_page in: query description: Number of results per page. schema: description: Number of results per page. type: integer example: 20 default: 20 maximum: 100 minimum: 1 - name: search in: query description: Filter instances whose id contains this string (case-insensitive). schema: description: Filter instances whose id contains this string (case-insensitive). type: string maxLength: 64 - name: hostname in: query description: Filter by exact Search for Agents hostname (case-insensitive). schema: description: Filter by exact Search for Agents hostname (case-insensitive). type: string maxLength: 253 minLength: 1 - name: namespace in: query description: Filter by namespace. schema: description: Filter by namespace. type: string pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ - name: order_by in: query description: Field to order results by. schema: description: Field to order results by. type: string default: created_at enum: - created_at - name: order_by_direction in: query description: Order direction. schema: description: Order direction. type: string default: desc enum: - asc - desc responses: '200': description: List of instances. content: application/json: schema: type: object properties: result: type: array items: additionalProperties: false properties: ai_gateway_id: type: - string - 'null' ai_search_model: type: - string - 'null' cache: type: boolean cache_threshold: type: - string - 'null' enum: - super_strict_match - close_enough - flexible_friend - anything_goes - null cache_ttl: anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number chunk: type: boolean chunk_overlap: type: - number - 'null' chunk_size: type: - number - 'null' created_at: type: string format: date-time created_by: type: - string - 'null' custom_metadata: type: - array - 'null' items: additionalProperties: false properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string required: - field_name - data_type type: object embedding_model: type: - string - 'null' enable: type: boolean engine_version: type: number fusion_method: type: string enum: - max - rrf hybrid_search_enabled: type: boolean id: type: string index_method: type: object additionalProperties: true properties: keyword: type: boolean vector: type: boolean required: - vector - keyword indexing_options: type: - object - 'null' additionalProperties: true properties: keyword_tokenizer: type: string enum: - porter - trigram use_ocr: type: boolean last_activity: type: - string - 'null' format: date-time max_num_results: type: - number - 'null' metadata: type: - object - 'null' additionalProperties: true properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string modified_at: type: string format: date-time modified_by: type: - string - 'null' namespace: type: string pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ paused: type: boolean public_endpoint_id: type: - string - 'null' public_endpoint_params: type: - object - 'null' additionalProperties: true properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object additionalProperties: true properties: disabled: type: boolean custom_domains: type: - array - 'null' items: maxLength: 253 minLength: 1 pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$ type: string maxItems: 1 default_domain_enabled: type: boolean enabled: type: boolean mcp: type: object additionalProperties: true properties: description: type: string disabled: type: boolean rate_limit: type: object additionalProperties: true properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object additionalProperties: true properties: disabled: type: boolean reranking: type: boolean reranking_model: type: - string - 'null' retrieval_options: type: - object - 'null' additionalProperties: true properties: boost_by: type: array items: additionalProperties: true properties: dataType: type: string enum: - number - datetime - text - boolean direction: type: string enum: - asc - desc - exists - not_exists field: type: string maxLength: 64 minLength: 1 required: - field type: object maxItems: 3 keyword_match_mode: type: string enum: - and - or rewrite_model: type: - string - 'null' rewrite_query: type: boolean score_threshold: type: - number - 'null' source: type: - string - 'null' source_params: type: - object - 'null' additionalProperties: true properties: exclude_items: type: array items: type: string include_items: type: array items: type: string prefix: type: string r2_jurisdiction: type: string web_crawler: type: object additionalProperties: true properties: discover_options: type: object additionalProperties: true properties: depth: type: number maximum: 100000 minimum: 1 include_external_links: type: boolean include_subdomains: type: boolean limit: description: Maximum number of pages to crawl. New values are capped at 100000; instances configured before that cap may report a higher stored value, which the crawler clamps at run time. type: number maximum: 100000 minimum: 1 max_age: type: number maximum: 604800 minimum: 0 source: type: string enum: - all - sitemaps - links parse_options: type: object additionalProperties: true properties: content_selector: type: array items: additionalProperties: true properties: path: type: string maxLength: 200 minLength: 1 selector: type: string maxLength: 200 minLength: 1 required: - path - selector type: object maxItems: 10 include_headers: type: object additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean specific_sitemaps: type: array items: format: uri type: string maxItems: 10 use_browser_rendering: type: boolean parse_type: type: string enum: - sitemap - discover status: type: string summarization: type: boolean summarization_model: type: - string - 'null' sync_interval: anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number system_prompt_ai_search: type: - string - 'null' system_prompt_index_summarization: type: - string - 'null' system_prompt_rewrite_query: type: - string - 'null' token_id: type: - string - 'null' type: type: - string - 'null' enum: - r2 - web-crawler - null required: - id - engine_version - enable - type - source - source_params - ai_gateway_id - token_id - cache - cache_threshold - cache_ttl - summarization - rewrite_query - reranking - index_method - hybrid_search_enabled - fusion_method - indexing_options - retrieval_options - summarization_model - embedding_model - rewrite_model - ai_search_model - reranking_model - system_prompt_ai_search - system_prompt_index_summarization - system_prompt_rewrite_query - chunk - chunk_size - chunk_overlap - score_threshold - max_num_results - public_endpoint_id - public_endpoint_params - paused - status - metadata - custom_metadata - sync_interval - created_at - created_by - modified_at - modified_by - last_activity - namespace type: object result_info: type: object properties: count: type: number page: type: number per_page: type: number total_count: type: number required: - page - per_page - count - total_count success: type: boolean enum: - true required: - success - result - result_info '400': description: Input Validation Error content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string path: type: array items: type: string required: - code - message - path type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: list post: operationId: ai-search-create-instance summary: Create an AI Search instance (Search for Agents requires the default namespace) description: 'Create a new AI Search instance with the given configuration. If type is omitted or null, a non-blank HTTP(S) source infers web-crawler and an existing R2 bucket source infers r2. A missing or blank source without a type creates a managed upload-only instance. Search for Agents instances require the default namespace. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 requestBody: content: application/json: schema: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk: type: boolean default: true x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id responses: '201': description: Returns the new instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '400': description: Ai search instance invalid token. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '403': description: Max instances reached. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Search for Agents hostname belongs to another namespace (7106) or Search for Agents metadata requires the default namespace (7109). content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: create /accounts/{account_id}/ai-search/instances/{id}: delete: operationId: ai-search-delete-instance summary: Delete an AI Search instance description: 'Permanently delete an AI Search instance and all its indexed data. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search responses: '200': description: Returns the deleted instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Instance status modified concurrently please retry. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: delete x-forge-require-confirmation: This operation permanently deletes the AI Search instance and all its indexed data. get: operationId: ai-search-fetch-instance summary: Get an AI Search instance description: 'Retrieve the configuration and status of an AI Search instance. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search responses: '200': description: Returns the instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: get put: operationId: ai-search-update-instance summary: Update an AI Search instance (Search for Agents metadata requires the default… description: 'Update an AI Search instance. Submitting Search for Agents metadata requires the default namespace; omitting or removing it is allowed elsewhere. Submit Search for Agents metadata and restrictive or unknown public endpoint changes or custom domains in separate PUT requests, even when resubmitting unchanged metadata. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search requestBody: content: application/json: schema: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk: type: boolean default: true x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true paused: type: boolean default: false x-auditable: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true summarization: type: boolean default: false x-auditable: true summarization_model: type: - string - 'null' x-auditable: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true system_prompt_ai_search: type: - string - 'null' x-auditable: true system_prompt_index_summarization: type: - string - 'null' x-auditable: true system_prompt_rewrite_query: type: - string - 'null' x-auditable: true token_id: type: string format: uuid x-auditable: true responses: '200': description: Returns the updated instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '400': description: Ai search instance invalid token. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Instance status modified concurrently, Search for Agents hostname used by another namespace, Search for Agents metadata submitted outside the default namespace (7109), or Search for Agents metadata combined with a pre-commit public endpoint or custom domain change (7110; split into separate PUT requests). content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: update /accounts/{account_id}/ai-search/instances/{id}/chat/completions: post: operationId: ai-search-instance-chat-completion summary: Chat Completions description: 'Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 requestBody: content: application/json: schema: type: object properties: ai_search_options: type: object properties: cache: type: object properties: cache_threshold: type: string enum: - super_strict_match - close_enough - flexible_friend - anything_goes enabled: type: boolean custom_metadata: description: Metadata added to AI Gateway logs for requests triggered by this operation. Accepts up to 2 string, number, or boolean entries. Keys 'ai-search', 'task', 'origin', and keys beginning with 'cf.' are reserved. type: object example: test: true user_id: user-123 additionalProperties: anyOf: - type: string - type: number - type: boolean maxProperties: 2 query_rewrite: type: object properties: enabled: type: boolean model: description: 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. type: string rewrite_prompt: type: string reranking: type: object properties: enabled: type: boolean match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 model: type: string retrieval: type: object properties: boost_by: description: Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 context_expansion: type: integer default: 0 maximum: 3 minimum: 0 filters: type: object additionalProperties: true fusion_method: type: string enum: - max - rrf keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'. type: string enum: - and - or match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 max_num_results: type: integer default: 10 maximum: 50 minimum: 1 retrieval_type: type: string enum: - vector - keyword - hybrid return_on_failure: type: boolean default: true messages: type: array items: additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content type: object minItems: 1 model: description: 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. type: string stream: type: boolean additionalProperties: true required: - messages responses: '200': description: Returns the chat completions results with retrieved files. content: application/json: schema: type: object properties: choices: type: array items: properties: index: type: integer message: type: object additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content required: - message type: object chunks: type: array items: properties: id: type: string item: type: object properties: key: type: string metadata: type: object additionalProperties: true timestamp: type: number required: - key score: type: number maximum: 1 minimum: 0 scoring_details: type: object properties: fusion_method: type: string enum: - rrf - max keyword_rank: type: number keyword_score: type: number minimum: 0 reranking_score: type: number maximum: 1 minimum: 0 vector_rank: type: number vector_score: type: number maximum: 1 minimum: 0 text: type: string type: type: string required: - id - type - score - text type: object id: type: string model: type: string object: type: string additionalProperties: true required: - choices - chunks '400': description: Metadata filter unknown field. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '429': description: Monthly query quota exceeded. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: chat-completions /accounts/{account_id}/ai-search/instances/{id}/search: post: operationId: ai-search-instance-search summary: Search description: 'Executes a semantic search query against an AI Search instance to find relevant indexed content. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 requestBody: content: application/json: schema: type: object properties: ai_search_options: type: object properties: cache: type: object properties: cache_threshold: type: string enum: - super_strict_match - close_enough - flexible_friend - anything_goes enabled: type: boolean custom_metadata: description: Metadata added to AI Gateway logs for requests triggered by this operation. Accepts up to 2 string, number, or boolean entries. Keys 'ai-search', 'task', 'origin', and keys beginning with 'cf.' are reserved. type: object example: test: true user_id: user-123 additionalProperties: anyOf: - type: string - type: number - type: boolean maxProperties: 2 query_rewrite: type: object properties: enabled: type: boolean model: description: 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. type: string rewrite_prompt: type: string reranking: type: object properties: enabled: type: boolean match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 model: type: string retrieval: type: object properties: boost_by: description: Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 context_expansion: type: integer default: 0 maximum: 3 minimum: 0 filters: type: object additionalProperties: true fusion_method: type: string enum: - max - rrf keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'. type: string enum: - and - or match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 max_num_results: type: integer default: 10 maximum: 50 minimum: 1 retrieval_type: type: string enum: - vector - keyword - hybrid return_on_failure: type: boolean default: true messages: description: 'OpenAI-compatible message array. For multimodal queries, set the last user message''s `content` to an array of typed parts: `[{type:''text'', text:''…''}, {type:''image_url'', image_url:{url:''…''}}]`. Image inputs require the RAG''s embedding_model to declare ''image'' in supported_modalities.' type: array items: additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content type: object minItems: 1 query: description: A simple text query string. Alternative to 'messages' — provide either this or 'messages', not both. minLength: 1 type: string responses: '200': description: Returns the search results. content: application/json: schema: type: object properties: result: type: object properties: chunks: type: array items: properties: id: type: string item: type: object properties: key: type: string metadata: type: object additionalProperties: true timestamp: type: number required: - key score: type: number maximum: 1 minimum: 0 scoring_details: type: object properties: fusion_method: type: string enum: - rrf - max keyword_rank: type: number keyword_score: type: number minimum: 0 reranking_score: type: number maximum: 1 minimum: 0 vector_rank: type: number vector_score: type: number maximum: 1 minimum: 0 text: type: string type: type: string required: - id - type - score - text type: object query_kind: type: string enum: - text - image - multimodal search_query: type: string required: - query_kind - chunks success: type: boolean required: - success - result '400': description: Metadata filter unknown field. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '429': description: Monthly query quota exceeded. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: search /accounts/{account_id}/ai-search/instances/{id}/stats: get: operationId: ai-search-stats summary: Get instance statistics description: 'Retrieve usage and indexing statistics for an AI Search instance. Deprecated: use /accounts/{account_id}/ai-search/namespaces/{name}/instances (and descendant paths) instead.' parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 responses: '200': description: Returns the AI Search stats. content: application/json: schema: type: object properties: result: type: object properties: completed: type: integer degraded: description: True when status counts are unavailable (e.g. legacy stats query exceeded D1 statement-size limit). Counts are omitted in this case. type: boolean engine: description: Engine-specific metadata. Present only for managed (v3) instances. type: object properties: r2: description: R2 bucket storage usage in bytes. type: object properties: metadataSizeBytes: type: integer objectCount: type: integer payloadSizeBytes: type: integer required: - payloadSizeBytes - metadataSizeBytes - objectCount vectorize: description: Vectorize index metadata (dimensions, vector count). type: object properties: dimensions: type: integer vectorsCount: type: integer required: - vectorsCount - dimensions error: type: integer file_embed_errors: type: object additionalProperties: true index_source_errors: type: object additionalProperties: true last_activity: type: string format: date-time outdated: type: integer queued: type: integer running: type: integer skipped: type: integer success: type: boolean required: - success - result '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors deprecated: true security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-ignore: true x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: stats /accounts/{account_id}/ai-search/namespaces/{name}/instances: get: operationId: ai-search-namespace-list-instances summary: List AI Search instances description: List all AI Search instances in the account. parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: page in: query description: Page number (1-indexed). schema: description: Page number (1-indexed). type: integer example: 1 default: 1 minimum: 1 - name: per_page in: query description: Number of results per page. schema: description: Number of results per page. type: integer example: 20 default: 20 maximum: 100 minimum: 1 - name: search in: query description: Filter instances whose id contains this string (case-insensitive). schema: description: Filter instances whose id contains this string (case-insensitive). type: string maxLength: 64 - name: hostname in: query description: Filter by exact Search for Agents hostname (case-insensitive). schema: description: Filter by exact Search for Agents hostname (case-insensitive). type: string maxLength: 253 minLength: 1 - name: namespace in: query description: Filter by namespace. schema: description: Filter by namespace. type: string pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ - name: order_by in: query description: Field to order results by. schema: description: Field to order results by. type: string default: created_at enum: - created_at - name: order_by_direction in: query description: Order direction. schema: description: Order direction. type: string default: desc enum: - asc - desc - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace responses: '200': description: List of instances. content: application/json: schema: type: object properties: result: type: array items: additionalProperties: false properties: ai_gateway_id: type: - string - 'null' ai_search_model: type: - string - 'null' cache: type: boolean cache_threshold: type: - string - 'null' enum: - super_strict_match - close_enough - flexible_friend - anything_goes - null cache_ttl: anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number chunk: type: boolean chunk_overlap: type: - number - 'null' chunk_size: type: - number - 'null' created_at: type: string format: date-time created_by: type: - string - 'null' custom_metadata: type: - array - 'null' items: additionalProperties: false properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string required: - field_name - data_type type: object embedding_model: type: - string - 'null' enable: type: boolean engine_version: type: number fusion_method: type: string enum: - max - rrf hybrid_search_enabled: type: boolean id: type: string index_method: type: object additionalProperties: true properties: keyword: type: boolean vector: type: boolean required: - vector - keyword indexing_options: type: - object - 'null' additionalProperties: true properties: keyword_tokenizer: type: string enum: - porter - trigram use_ocr: type: boolean last_activity: type: - string - 'null' format: date-time max_num_results: type: - number - 'null' metadata: type: - object - 'null' additionalProperties: true properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string modified_at: type: string format: date-time modified_by: type: - string - 'null' namespace: type: string pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ paused: type: boolean public_endpoint_id: type: - string - 'null' public_endpoint_params: type: - object - 'null' additionalProperties: true properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object additionalProperties: true properties: disabled: type: boolean custom_domains: type: - array - 'null' items: maxLength: 253 minLength: 1 pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$ type: string maxItems: 1 default_domain_enabled: type: boolean enabled: type: boolean mcp: type: object additionalProperties: true properties: description: type: string disabled: type: boolean rate_limit: type: object additionalProperties: true properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object additionalProperties: true properties: disabled: type: boolean reranking: type: boolean reranking_model: type: - string - 'null' retrieval_options: type: - object - 'null' additionalProperties: true properties: boost_by: type: array items: additionalProperties: true properties: dataType: type: string enum: - number - datetime - text - boolean direction: type: string enum: - asc - desc - exists - not_exists field: type: string maxLength: 64 minLength: 1 required: - field type: object maxItems: 3 keyword_match_mode: type: string enum: - and - or rewrite_model: type: - string - 'null' rewrite_query: type: boolean score_threshold: type: - number - 'null' source: type: - string - 'null' source_params: type: - object - 'null' additionalProperties: true properties: exclude_items: type: array items: type: string include_items: type: array items: type: string prefix: type: string r2_jurisdiction: type: string web_crawler: type: object additionalProperties: true properties: discover_options: type: object additionalProperties: true properties: depth: type: number maximum: 100000 minimum: 1 include_external_links: type: boolean include_subdomains: type: boolean limit: description: Maximum number of pages to crawl. New values are capped at 100000; instances configured before that cap may report a higher stored value, which the crawler clamps at run time. type: number maximum: 100000 minimum: 1 max_age: type: number maximum: 604800 minimum: 0 source: type: string enum: - all - sitemaps - links parse_options: type: object additionalProperties: true properties: content_selector: type: array items: additionalProperties: true properties: path: type: string maxLength: 200 minLength: 1 selector: type: string maxLength: 200 minLength: 1 required: - path - selector type: object maxItems: 10 include_headers: type: object additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean specific_sitemaps: type: array items: format: uri type: string maxItems: 10 use_browser_rendering: type: boolean parse_type: type: string enum: - sitemap - discover status: type: string summarization: type: boolean summarization_model: type: - string - 'null' sync_interval: anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number system_prompt_ai_search: type: - string - 'null' system_prompt_index_summarization: type: - string - 'null' system_prompt_rewrite_query: type: - string - 'null' token_id: type: - string - 'null' type: type: - string - 'null' enum: - r2 - web-crawler - null required: - id - engine_version - enable - type - source - source_params - ai_gateway_id - token_id - cache - cache_threshold - cache_ttl - summarization - rewrite_query - reranking - index_method - hybrid_search_enabled - fusion_method - indexing_options - retrieval_options - summarization_model - embedding_model - rewrite_model - ai_search_model - reranking_model - system_prompt_ai_search - system_prompt_index_summarization - system_prompt_rewrite_query - chunk - chunk_size - chunk_overlap - score_threshold - max_num_results - public_endpoint_id - public_endpoint_params - paused - status - metadata - custom_metadata - sync_interval - created_at - created_by - modified_at - modified_by - last_activity - namespace type: object result_info: type: object properties: count: type: number page: type: number per_page: type: number total_count: type: number required: - page - per_page - count - total_count success: type: boolean enum: - true required: - success - result - result_info '400': description: Input Validation Error content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string path: type: array items: type: string required: - code - message - path type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: list x-forge-params: name: default: default description: Namespace to use for this operation. flagName: namespace namespace: hidden: true post: operationId: ai-search-namespace-create-instance summary: Create an AI Search instance (Search for Agents requires the default namespace) description: Create a new AI Search instance with the given configuration. If type is omitted or null, a non-blank HTTP(S) source infers web-crawler and an existing R2 bucket source infers r2. A missing or blank source without a type creates a managed upload-only instance. Search for Agents instances require the default namespace. parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace requestBody: content: application/json: schema: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk: type: boolean default: true x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id responses: '201': description: Returns the new instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '400': description: Ai search instance invalid token. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '403': description: Max instances reached. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Search for Agents hostname belongs to another namespace (7106) or Search for Agents metadata requires the default namespace (7109). content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: create x-forge-params: id: description: Unique ID for the new AI Search instance. positional: true name: default: default description: Namespace to use for this operation. flagName: namespace source: description: R2 bucket name or HTTP(S) root website URL to index. When type is omitted, the source determines it. source_params: description: Optional data source settings as a JSON object. type: description: 'Data source type: r2 or web-crawler.' /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}: delete: operationId: ai-search-namespace-delete-instance summary: Delete an AI Search instance description: Permanently delete an AI Search instance and all its indexed data. parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace responses: '200': description: Returns the deleted instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Instance status modified concurrently please retry. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: delete x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace x-forge-require-confirmation: This operation permanently deletes the AI Search instance and all its indexed data. get: operationId: ai-search-namespace-fetch-instance summary: Get an AI Search instance description: Retrieve the configuration and status of an AI Search instance. parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace responses: '200': description: Returns the instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: get x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace put: operationId: ai-search-namespace-update-instance summary: Update an AI Search instance (Search for Agents metadata requires the default… description: Update an AI Search instance. Submitting Search for Agents metadata requires the default namespace; omitting or removing it is allowed elsewhere. Submit Search for Agents metadata and restrictive or unknown public endpoint changes or custom domains in separate PUT requests, even when resubmitting unchanged metadata. parameters: - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: id in: path required: true schema: type: string example: my-ai-search - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace requestBody: content: application/json: schema: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk: type: boolean default: true x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true paused: type: boolean default: false x-auditable: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true summarization: type: boolean default: false x-auditable: true summarization_model: type: - string - 'null' x-auditable: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true system_prompt_ai_search: type: - string - 'null' x-auditable: true system_prompt_index_summarization: type: - string - 'null' x-auditable: true system_prompt_rewrite_query: type: - string - 'null' x-auditable: true token_id: type: string format: uuid x-auditable: true responses: '200': description: Returns the updated instance. content: application/json: schema: type: object properties: result: type: object properties: ai_gateway_id: type: - string - 'null' x-auditable: true ai_search_model: description: 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. type: - string - 'null' x-auditable: true cache: type: boolean default: true x-auditable: true cache_threshold: type: string default: close_enough enum: - super_strict_match - close_enough - flexible_friend - anything_goes x-auditable: true cache_ttl: description: '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).' default: 172800 anyOf: - enum: - 600 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number - enum: - 172800 type: number - enum: - 259200 type: number - enum: - 518400 type: number x-auditable: true chunk_overlap: type: integer default: 10 maximum: 30 minimum: 0 x-auditable: true chunk_size: type: integer minimum: 64 x-auditable: true created_at: type: string format: date-time readOnly: true created_by: type: - string - 'null' readOnly: true custom_metadata: type: array items: properties: data_type: type: string enum: - text - number - boolean - datetime field_name: type: string maxLength: 64 minLength: 1 required: - field_name - data_type type: object maxItems: 5 x-auditable: true embedding_model: type: - string - 'null' x-auditable: true enable: type: boolean default: true x-auditable: true engine_version: type: number default: 3 readOnly: true fusion_method: type: string default: rrf enum: - max - rrf x-auditable: true hybrid_search_enabled: description: Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance. type: boolean default: true deprecated: true x-auditable: true id: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true index_method: description: Controls which storage backends are used during indexing. Defaults to vector and keyword indexing for new instances. type: object default: keyword: true vector: true properties: keyword: description: Enable keyword (BM25) storage backend. type: boolean vector: description: Enable vector (embedding) storage backend. type: boolean required: - vector - keyword x-auditable: true indexing_options: type: - object - 'null' properties: keyword_tokenizer: description: 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. type: string default: porter enum: - porter - trigram use_ocr: description: Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false. type: boolean default: false x-auditable: true last_activity: type: - string - 'null' format: date-time readOnly: true max_num_results: type: integer default: 10 maximum: 50 minimum: 1 x-auditable: true metadata: type: object properties: created_from_aisearch_wizard: type: boolean worker_domain: type: string x-auditable: true modified_at: type: string format: date-time readOnly: true modified_by: type: - string - 'null' readOnly: true namespace: type: - string - 'null' pattern: ^[a-z0-9]([a-z0-9-]{0,26}[a-z0-9])?$ readOnly: true paused: type: boolean default: false x-auditable: true public_endpoint_id: type: - string - 'null' readOnly: true public_endpoint_params: type: object properties: authorized_hosts: type: array items: type: string chat_completions_endpoint: type: object properties: disabled: description: Disable chat completions endpoint for this public endpoint type: boolean default: false custom_domains: description: Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged). type: - array - 'null' items: description: Custom domain hostname (must be a Verified zone on this account). example: search.example.com maxLength: 253 minLength: 1 type: string maxItems: 1 x-auditable: true default_domain_enabled: description: When false, the instance is reachable only via a registered custom domain and the default .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. type: boolean default: true x-auditable: true enabled: type: boolean default: false mcp: type: object properties: description: type: string default: Finds exactly what you're looking for disabled: description: Disable MCP endpoint for this public endpoint type: boolean default: false rate_limit: type: object properties: period_ms: type: integer maximum: 3600000 minimum: 60000 requests: type: integer minimum: 1 technique: type: string enum: - fixed - sliding search_endpoint: type: object properties: disabled: description: Disable search endpoint for this public endpoint type: boolean default: false x-auditable: true reranking: type: boolean default: false x-auditable: true reranking_model: type: - string - 'null' x-auditable: true retrieval_options: type: - object - 'null' properties: boost_by: description: 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. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted on an update, the existing stored value is preserved; when never set, search falls back to 'and'. type: string enum: - and - or x-auditable: true rewrite_model: description: 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. type: - string - 'null' x-auditable: true rewrite_query: type: boolean default: false x-auditable: true score_threshold: type: number default: 0.4 maximum: 1 minimum: 0 x-auditable: true source: type: - string - 'null' x-auditable: true source_params: type: - object - 'null' properties: exclude_items: description: 'List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /admin/** - /private/** - '**\temp\**' maxItems: 10 include_items: description: 'List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts are limited to 10 rules; contact support to raise it.' type: array items: maxLength: 500 pattern: ^[*/\\]?[\w\-/.\\?*:=&%]+$ type: string example: - /blog/** - /docs/**/*.html - '**\blog\**.html' maxItems: 10 prefix: type: string r2_jurisdiction: type: string default: default web_crawler: type: object default: parse_type: sitemap properties: discover_options: description: Options for parse_type 'discover', where Browser Run discovers URLs by link following and sitemaps. Ignored for 'sitemap'. type: object properties: depth: description: Maximum link-follow depth from the seed URL. type: number example: 5 default: 5 maximum: 100000 minimum: 1 include_external_links: description: Follow links that point outside the source domain. Must stay `false` — discover crawls are restricted to the zone you own. type: boolean example: false default: false include_subdomains: description: Follow links to subdomains of the source host. type: boolean example: false default: false limit: description: Maximum number of pages to crawl (1-100000). type: number example: 10000 default: 100000 maximum: 100000 minimum: 1 max_age: description: Maximum content age in seconds to accept (0–604800). type: number example: 86400 default: 86400 maximum: 604800 minimum: 0 source: description: 'Where the crawler looks for URLs: ''sitemaps'' reads sitemap XML only, ''links'' follows page links only, ''all'' does both.' type: string example: all default: all enum: - all - sitemaps - links parse_options: type: object properties: content_selector: description: List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. Omit the field to disable content selection — empty arrays are rejected. type: array items: properties: path: description: 'Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.' type: string example: '**/article/**' maxLength: 200 minLength: 1 selector: description: CSS selector to extract content from pages matching the path pattern. Must not contain disallowed characters (;, `, $, {, }, \). Must target a single element; if multiple elements match, the selector is ignored and the full page is used. type: string example: article div.post-body maxLength: 200 minLength: 1 required: - path - selector type: object example: - path: '**/blog/**' selector: article div.post-body - path: '**/docs/**' selector: main maxItems: 10 minItems: 1 include_headers: description: Up to 5 custom HTTP headers sent with each crawl request. Names must be RFC-7230 token characters (no spaces, colons, or control characters); values must be HTAB + printable ASCII (no CR/LF). type: object example: cache-control: no-cache, no-store additionalProperties: maxLength: 8192 pattern: ^[\t\x20-\x7E]*$ type: string include_images: type: boolean default: false specific_sitemaps: description: List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. type: array items: format: uri type: string example: - https://example.com/sitemap.xml - https://example.com/blog-sitemap.xml maxItems: 10 use_browser_rendering: type: boolean default: true parse_type: description: How URLs are discovered. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to be a Verified zone on this account. type: string example: sitemap default: sitemap enum: - sitemap - discover x-auditable: true status: type: string default: waiting readOnly: true sync_interval: description: 'Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).' default: 21600 anyOf: - enum: - 900 type: number - enum: - 1800 type: number - enum: - 3600 type: number - enum: - 7200 type: number - enum: - 14400 type: number - enum: - 21600 type: number - enum: - 43200 type: number - enum: - 86400 type: number x-auditable: true token_id: type: string format: uuid x-auditable: true type: description: 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. type: - string - 'null' enum: - r2 - web-crawler - null x-auditable: true required: - id - created_at - modified_at success: type: boolean required: - success - result '400': description: Ai search instance invalid token. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '409': description: Instance status modified concurrently, Search for Agents hostname used by another namespace, Search for Agents metadata submitted outside the default namespace (7109), or Search for Agents metadata combined with a pre-commit public endpoint or custom domain change (7110; split into separate PUT requests). content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: update x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace source: description: R2 bucket name or HTTP(S) root website URL to index. source_params: description: Optional data source settings as a JSON object. /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/chat/completions: post: operationId: ai-search-namespace-instance-chat-completion summary: Chat Completions description: Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses. parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace requestBody: content: application/json: schema: type: object properties: ai_search_options: type: object properties: cache: type: object properties: cache_threshold: type: string enum: - super_strict_match - close_enough - flexible_friend - anything_goes enabled: type: boolean custom_metadata: description: Metadata added to AI Gateway logs for requests triggered by this operation. Accepts up to 2 string, number, or boolean entries. Keys 'ai-search', 'task', 'origin', and keys beginning with 'cf.' are reserved. type: object example: test: true user_id: user-123 additionalProperties: anyOf: - type: string - type: number - type: boolean maxProperties: 2 query_rewrite: type: object properties: enabled: type: boolean model: description: 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. type: string rewrite_prompt: type: string reranking: type: object properties: enabled: type: boolean match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 model: type: string retrieval: type: object properties: boost_by: description: Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 context_expansion: type: integer default: 0 maximum: 3 minimum: 0 filters: type: object additionalProperties: true fusion_method: type: string enum: - max - rrf keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'. type: string enum: - and - or match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 max_num_results: type: integer default: 10 maximum: 50 minimum: 1 retrieval_type: type: string enum: - vector - keyword - hybrid return_on_failure: type: boolean default: true messages: type: array items: additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content type: object minItems: 1 model: description: 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. type: string stream: type: boolean additionalProperties: true required: - messages responses: '200': description: Returns the chat completions results with retrieved files. content: application/json: schema: type: object properties: choices: type: array items: properties: index: type: integer message: type: object additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content required: - message type: object chunks: type: array items: properties: id: type: string item: type: object properties: key: type: string metadata: type: object additionalProperties: true timestamp: type: number required: - key score: type: number maximum: 1 minimum: 0 scoring_details: type: object properties: fusion_method: type: string enum: - rrf - max keyword_rank: type: number keyword_score: type: number minimum: 0 reranking_score: type: number maximum: 1 minimum: 0 vector_rank: type: number vector_score: type: number maximum: 1 minimum: 0 text: type: string type: type: string required: - id - type - score - text type: object id: type: string model: type: string object: type: string additionalProperties: true required: - choices - chunks '400': description: Metadata filter unknown field. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '429': description: Monthly query quota exceeded. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: chat-completions x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/purge_cache: post: operationId: ai-search-namespace-purge-instance-cache summary: Purge search cache description: Purges all cached search results for an AI Search instance. A new internal cache key is generated, immediately orphaning all prior cached entries. parameters: - name: account_id in: path required: true schema: type: string - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace responses: '200': description: Cache purged successfully. content: application/json: schema: type: object properties: success: type: boolean required: - success '404': description: Ai search not found. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: purge-cache x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/search: post: operationId: ai-search-namespace-instance-search summary: Search description: Executes a semantic search query against an AI Search instance to find relevant indexed content. parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace requestBody: content: application/json: schema: type: object properties: ai_search_options: type: object properties: cache: type: object properties: cache_threshold: type: string enum: - super_strict_match - close_enough - flexible_friend - anything_goes enabled: type: boolean custom_metadata: description: Metadata added to AI Gateway logs for requests triggered by this operation. Accepts up to 2 string, number, or boolean entries. Keys 'ai-search', 'task', 'origin', and keys beginning with 'cf.' are reserved. type: object example: test: true user_id: user-123 additionalProperties: anyOf: - type: string - type: number - type: boolean maxProperties: 2 query_rewrite: type: object properties: enabled: type: boolean model: description: 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. type: string rewrite_prompt: type: string reranking: type: object properties: enabled: type: boolean match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 model: type: string retrieval: type: object properties: boost_by: description: Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. type: array items: properties: direction: description: 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. type: string enum: - asc - desc - exists - not_exists field: description: 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. type: string example: timestamp maxLength: 64 minLength: 1 required: - field type: object example: - direction: desc field: timestamp maxItems: 3 context_expansion: type: integer default: 0 maximum: 3 minimum: 0 filters: type: object additionalProperties: true fusion_method: type: string enum: - max - rrf keyword_match_mode: description: Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'. type: string enum: - and - or match_threshold: type: number default: 0.4 maximum: 1 minimum: 0 max_num_results: type: integer default: 10 maximum: 50 minimum: 1 retrieval_type: type: string enum: - vector - keyword - hybrid return_on_failure: type: boolean default: true messages: description: 'OpenAI-compatible message array. For multimodal queries, set the last user message''s `content` to an array of typed parts: `[{type:''text'', text:''…''}, {type:''image_url'', image_url:{url:''…''}}]`. Image inputs require the RAG''s embedding_model to declare ''image'' in supported_modalities.' type: array items: additionalProperties: true properties: content: anyOf: - type: string - items: oneOf: - properties: text: type: string minLength: 1 type: type: string enum: - text required: - type - text type: object - properties: image_url: type: object properties: url: type: string maxLength: 20971520 minLength: 1 required: - url type: type: string enum: - image_url required: - type - image_url type: object - properties: file: type: object properties: file_data: type: string maxLength: 13981144 minLength: 1 file_id: type: string filename: type: string maxLength: 255 minLength: 1 required: - filename type: type: string enum: - file required: - type - file type: object minItems: 1 type: array - enum: - null type: - string - 'null' role: type: string enum: - system - developer - user - assistant - tool required: - role - content type: object minItems: 1 query: description: A simple text query string. Alternative to 'messages' — provide either this or 'messages', not both. minLength: 1 type: string responses: '200': description: Returns the search results. content: application/json: schema: type: object properties: result: type: object properties: chunks: type: array items: properties: id: type: string item: type: object properties: key: type: string metadata: type: object additionalProperties: true timestamp: type: number required: - key score: type: number maximum: 1 minimum: 0 scoring_details: type: object properties: fusion_method: type: string enum: - rrf - max keyword_rank: type: number keyword_score: type: number minimum: 0 reranking_score: type: number maximum: 1 minimum: 0 vector_rank: type: number vector_score: type: number maximum: 1 minimum: 0 text: type: string type: type: string required: - id - type - score - text type: object query_kind: type: string enum: - text - image - multimodal search_query: type: string required: - query_kind - chunks success: type: boolean required: - success - result '400': description: Metadata filter unknown field. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors '429': description: Monthly query quota exceeded. content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: search x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace query: description: Text to search for. positional: true /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}/stats: get: operationId: ai-search-namespace-stats summary: Get instance statistics description: Retrieve usage and indexing statistics for an AI Search instance. parameters: - name: id in: path description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. required: true schema: description: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. type: string example: my-ai-search maxLength: 64 minLength: 1 pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$ x-auditable: true - name: account_id in: path required: true schema: type: string example: c3dc5f0b34a14ff8e1b3ec04895e1b22 - name: name in: path description: Namespace name required: true schema: type: string example: my-namespace responses: '200': description: Returns the AI Search stats. content: application/json: schema: type: object properties: result: type: object properties: completed: type: integer degraded: description: True when status counts are unavailable (e.g. legacy stats query exceeded D1 statement-size limit). Counts are omitted in this case. type: boolean engine: description: Engine-specific metadata. Present only for managed (v3) instances. type: object properties: r2: description: R2 bucket storage usage in bytes. type: object properties: metadataSizeBytes: type: integer objectCount: type: integer payloadSizeBytes: type: integer required: - payloadSizeBytes - metadataSizeBytes - objectCount vectorize: description: Vectorize index metadata (dimensions, vector count). type: object properties: dimensions: type: integer vectorsCount: type: integer required: - vectorsCount - dimensions error: type: integer file_embed_errors: type: object additionalProperties: true index_source_errors: type: object additionalProperties: true last_activity: type: string format: date-time outdated: type: integer queued: type: integer running: type: integer skipped: type: integer success: type: boolean required: - success - result '404': description: Not Found content: application/json: schema: type: object properties: errors: type: array items: properties: code: type: number message: type: string required: - code - message type: object success: type: boolean enum: - false required: - success - errors security: - api_token: [] - api_email: [] api_key: [] tags: - AI Search Instances x-cfPermissionsRequired: enum: - com.cloudflare.api.account.ai-search x-cfPlanAvailability: business: true enterprise: true free: true pro: true x-fern-availability: beta x-fern-sdk-group-name: ai-search x-fern-sdk-method-name: stats x-forge-params: id: description: AI Search instance ID. flagName: instance-id name: default: default description: Namespace to use for this operation. flagName: namespace components: securitySchemes: api_email: in: header name: X-Auth-Email type: apiKey api_key: in: header name: X-Auth-Key type: apiKey api_token: scheme: bearer type: http user_service_key: in: header name: X-Auth-User-Service-Key type: apiKey externalDocs: description: Cloudflare Radar Documentation url: https://developers.cloudflare.com/radar/ x-forge-commands: abuse-reports: description: Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites groups: appeals: description: Appeal eligibility for abuse reports emails: description: Emails sent for abuse reports mitigations: description: Mitigation actions taken in response to abuse reports accounts: description: Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account groups: applications: description: Applications operations categories: description: Categories operations organizations: description: Move accounts between organizations profile: description: View and manage the profile for a Cloudflare account roles: description: View the roles available for assigning to account members, each defining a set of permissions subscriptions: description: View and manage plan subscriptions attached to this account tokens: description: Create and manage scoped API tokens for programmatic access to the Cloudflare API ai-gateway: description: Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more groups: custom-domains: description: Manage custom hostnames that route requests through an AI Gateway custom-providers: description: Manage account-level custom AI providers and their endpoint settings datasets: description: 'Deprecated: manage filtered collections of gateway logs used by evaluations' dynamic-routing: description: Route requests across multiple AI providers with fallback, load-balancing, and versioned deployments dynamic-routing.deployments: description: Deploy dynamic route versions and view deployment history dynamic-routing.versions: description: Create and inspect saved versions of a dynamic route evaluation-types: description: 'Deprecated: list the evaluator types that evaluations can use' evaluations: description: 'Deprecated: score the logs in a dataset with selected evaluator types' gateways: description: Create and configure AI Gateways for an account gateways.providers: description: Store and rotate upstream AI provider keys for a gateway logs: description: Inspect, annotate, and delete gateway request logs stored by Legacy Logs ai-search: description: 'Managed search-as-a-service: crawl, index, and query content with AI-powered relevance and chat completions' groups: items: description: Content indexed by AI Search instances jobs: description: Indexing job lifecycle for AI Search instances namespace: description: Logical groupings for organizing AI Search instances tokens: description: Credentials used by AI Search instances ai-security: description: Detect prompt injection, PII, and unsafe topics in traffic to your AI applications groups: custom-topics: description: Organization-specific topic categories used by AI Security for Apps content detection analytics: description: Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics groups: colo: description: Per-data-center (colo) traffic analytics breakdown for the zone dashboard: description: Aggregated zone dashboard analytics — requests, bandwidth, threats, and page views latency: description: Argo Smart Routing latency analytics showing time-to-first-byte improvements argo: description: Network optimization features that speed up and improve reliability of traffic to your origins groups: smart-routing: description: Route traffic through the fastest network paths to your origin using real-time latency data tiered-caching: description: Reduce origin load by having upper-tier data centers serve cache misses before reaching your origin basin-catalog: description: Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines groups: credentials: description: Catalog access credentials for external query engines (Spark, Trino, etc.) maintenance-configs: description: Table maintenance settings — compaction schedules and snapshot expiration policies namespaces: description: Logical namespaces that group related tables within the data catalog namespaces.tables: description: Tables within catalog namespaces namespaces.tables.maintenance-configs: description: Table-level maintenance configurations and operations namespaces.tables.maintenance-runs: description: History of maintenance runs performed on tables billing: description: Account billing profiles and usage data for Cloudflare subscriptions and add-on services groups: profiles: description: Billing profile with payment method, address, and invoice preferences usage: description: Metered usage data for billed services — requests, bandwidth, and feature consumption botnet-feed: description: Botnet threat intelligence feeds — IP and ASN-level data on known command-and-control infrastructure groups: asn: description: ASN-level botnet activity data showing networks with known C2 infrastructure configs: description: Botnet feed subscription configuration and notification preferences builds: description: Build and deploy Workers from connected repositories, then inspect build status and logs. groups: deploy-hooks: description: Manage branch-specific HTTP hooks that start builds. limits: description: View build-minute availability and refresh information. logs: description: Retrieve build logs. repos: description: Manage source repository connections for Workers Builds. tokens: description: Manage credentials used by Workers Builds to deploy Workers. triggers: description: Configure how repository changes build and deploy Workers. versions: description: Find builds associated with Worker versions. workers: description: Manage repository-backed build configuration for Workers. cache: description: Purge cached content and configure Cache Reserve, tiered caching, and variant serving groups: origin-cloud-regions: description: Manage Origin Cloud Regions routing and failover configurations settings: description: Configure Cache Reserve, tiered caching, and variant serving settings.regional-tiered-cache: description: Restrict tiered cache topology to data centers within a specific geographic region settings.reserve: description: Persistent storage tier that keeps cached assets even after eviction from edge caches settings.smart-tiered-cache: description: Automatically determine the best upper-tier data centers for tiered cache topology settings.variants: description: Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.) client-side-security: description: Client-Side Security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks groups: connections: description: Third-party connections made by scripts on your pages — track data exfiltration risks cookies: description: Cookies set by your pages with classification and same-site attribute tracking policies: description: Content Security Policies that control which scripts and connections are allowed on your pages scripts: description: JavaScript files detected on your pages with change tracking and malicious code detection settings: description: Fine tune Client-Side Security behaviors cloud-connector: description: Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers groups: rules: description: Routing rules that map request patterns to cloud provider endpoints cloudforce-one: description: Detection rule management APIs groups: binary-storage: description: Upload and retrieve malware samples and suspicious binaries for analysis requests: description: Additional request operations — priority listing and asset creation rules: description: Rule management operations groups: approvals: description: Approval workflow operations email: description: Email rule operations exemptions: description: Exemption rule operations managed: description: Managed rule operations stats: description: Rule statistics operations tree: description: Rule navigation tree operations scans: description: Scan URLs, IPs, and domains for threat intelligence indicators containers: description: Deploy and manage Containers applications on Cloudflare's global network groups: applications: description: Manage Containers applications applications.instances: description: Inspect Containers instances belonging to applications applications.rollouts: description: Manage rollouts for scheduler-backed applications applications.versions: description: Inspect versions of scheduler-backed applications registries: description: Manage Containers image registries registries.credentials: description: Generate image registry credentials content-scan: description: Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads groups: expressions: description: Custom expressions that tell the scanner how to reach content objects it cannot parse on its own custom-pages: description: Manage custom error and challenge pages and their assets for accounts and zones groups: account-custom-pages: description: Manage account-level custom pages account-custom-pages.preview-tokens: description: Preview tokens for account-level custom pages assets: description: Manage account- and zone-level custom assets zone-custom-pages: description: Manage zone-level custom pages zone-custom-pages.preview-tokens: description: Preview tokens for zone-level custom pages d1: description: D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access. groups: time-travel: description: use specific point-in-time backups of your D1 database x-forge-epilogue: For more information about Time Travel, see https://developers.cloudflare.com/d1/reference/time-travel diagnostics: description: Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks groups: endpoint-healthchecks: description: Monitor external endpoint availability with periodic HTTP/HTTPS health checks traceroutes: description: Run traceroutes from Cloudflare data centers to diagnose network path issues email-routing: description: Route incoming email to verified destination addresses or Workers with routing rules, catch-all behavior, and managed DNS records groups: addresses: description: Verified destination email addresses that can receive forwarded mail dns: description: Inspect or unlock the DNS records required by Email Routing rules: description: Match incoming email addresses and forward messages to destination mailboxes or Workers settings: description: Inspect and update Email Routing settings email-security: description: Cloud email security — investigate threats, manage allow/block policies, and detect phishing groups: analytics: description: Analytics and reporting — monthly report and per-day breakdowns of threat activity bulk-actions: description: Asynchronous jobs that move or release every message matching a search — create, monitor, and manage bulk jobs investigate: description: Search and investigate email messages — view detections, traces, raw content, and take remediation actions phishguard: description: PhishGuard user-reported phishing reports — view detected threats for a date range settings: description: Email security configuration — block senders, allow policies, content policies, domains, trusted domains, impersonation registry, and URL handling submissions: description: Reclassify submissions — track user and team reports of false positives and missed detections email-sending: description: Send transactional email and manage sending subdomains and their DNS configuration groups: limits: description: Inspect account-level sending quotas and current usage subdomains: description: Configure sending subdomains and keep their DNS records healthy suppressions: description: Prevent delivery to suppressed addresses and manage the account suppression list filters: description: Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations firewall: description: Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages groups: access-rules: description: IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone lockdowns: description: Zone lockdown rules that restrict access to URLs by IP address or range rules: description: Legacy firewall rules with filter expressions — prefer Rulesets for new configurations ua-rules: description: Block or challenge requests based on the User-Agent header string waf: description: Legacy WAF managed rule packages, rule groups, individual rules, and override configurations zone-access-rules: description: Zone-scoped IP access rules for blocking or allowing traffic google-tag-gateway: description: Google Tag Gateway operations groups: config: description: Google Tag Gateway config operations healthchecks: description: Standalone health checks that monitor origin server availability from Cloudflare's edge groups: previews: description: Test a health check configuration before deploying it to production hyperdrive: description: Accelerate access to existing databases by caching queries and pooling connections at the edge iam: description: Identity and access management — permission groups, resource groups, user groups, and SSO connectors groups: permission-groups: description: View the permission groups that can be assigned to API tokens and policies resource-groups: description: Define scopes that limit which account resources a policy or token can access sso: description: Configure single sign-on connectors to authenticate account members through an external identity provider user-groups: description: Organize account members into groups for easier permission assignment images: description: Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads groups: flows: description: Zone-level transformation flows that control how images are resized and optimized on delivery import: description: Import images from S3 keys: description: Manage signing keys for generating private image URLs variants: description: Manage named resize variants for transforming images on delivery intel: description: Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds groups: asn: description: ASN intelligence — ownership, geolocation, and subnet details for autonomous systems attack-surface-report: description: Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping dns: description: Passive DNS data showing historical DNS resolution records for domains domain-history: description: Historical domain registration and categorization changes over time domains: description: Domain intelligence — risk scores, categories, and associated infrastructure indicator-feeds: description: Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs ip-lists: description: Curated IP lists used for threat detection and policy enforcement ips: description: IP address intelligence — geolocation, risk assessment, and hosting provider details miscategorizations: description: Report and track domain miscategorization corrections whois: description: WHOIS registration data for domains including registrant, registrar, and nameservers k2: description: Durable, ordered event streams that you produce records to and consume from with subscriptions groups: streams: description: K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records streams.subscriptions: description: Subscriptions that consume a K2 stream, with committed-position lag leaked-credential-checks: description: Detect compromised credentials in login requests by checking against known breach databases groups: detections: description: Custom detection locations that tell the WAF where to find usernames and passwords in requests load-balancers: description: Distribute traffic across origin pools with health monitoring, geo-steering, and failover groups: monitor-groups: description: Group monitors together for shared configuration and bulk management monitor-groups.references: description: List references to monitor groups used by load balancer pools monitors: description: Health check configurations that probe origin servers and determine pool availability monitors.previews: description: Health check configurations that probe origin servers and determine pool availability monitors.references: description: Health check configurations that probe origin servers and determine pool availability pools: description: Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences pools.health: description: Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences pools.references: description: Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences previews: description: Preview the result of a health check monitor configuration before applying it regions: description: Geographic regions used for regional pool steering and traffic policies searches: description: Search across all load balancer resources (pools, monitors, load balancers) by name or reference logs: description: Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields groups: control: description: Log control operations received: description: Received log operations magic-network-monitoring: description: Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion groups: configs: description: Account-level monitoring configuration — sampling rates, thresholds, and notification settings rules: description: Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements vpc-flows: description: Ingest VPC flow logs from cloud providers for network visibility and anomaly detection magic-transit: description: DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures groups: advanced-dns-protection: description: Advanced Dns Protection operations advanced-tcp-protection: description: Advanced Tcp Protection operations apps: description: Application-aware traffic policies for Magic WAN that steer traffic by app type bgp-filter-profiles: description: BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels bgp-settings: description: BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels cf-interconnects: description: Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering gre-tunnels: description: GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit ipsec-tunnels: description: IPsec tunnel endpoints with pre-shared key management for encrypted transit pcaps: description: Packet capture requests for debugging traffic flowing through Magic Transit tunnels routes: description: Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels sites: description: Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config mcp: description: Manage MCP portals and upstream MCP servers for Cloudflare Access AI controls groups: portals: description: Manage MCP portals, attached servers, and Code Mode settings servers: description: Manage upstream MCP servers, credentials, capabilities, and sync state network-interconnects: description: Physical and virtual private interconnects between your infrastructure and Cloudflare's network groups: cnis: description: Cloud Network Interconnect (CNI) connections — private links from cloud providers to Cloudflare interconnects: description: Physical cross-connect and partner interconnect sessions with LOA and status tracking settings: description: Account-level interconnect settings and default configurations slots: description: Available interconnect facility slots showing port capacity at Cloudflare data centers organizations: description: Multi-user organizations that group accounts, members, and shared settings under a single entity groups: account-organizations: description: List organizations associated with a specific account accounts: description: Accounts operations members: description: Members operations members-batch-create: description: Members Batch Create operations organization-profile: description: View and update the public profile information for an organization shares: description: Shares operations origin-post-quantum-encryption: description: Enable post-quantum key exchange for connections between Cloudflare and your origin server pages: description: Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains groups: projects: description: Pages projects, deployments, build logs, and custom domain bindings pipelines: description: Ingest, transform, and route event streams into R2, analytics, or other destinations in real time groups: sinks: description: Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage streams: description: Inbound data streams that feed events into a pipeline for processing precursor: description: Precursor settings for a zone queues: description: Reliable message queuing between Workers — produce, consume, and batch-process messages at scale groups: consumers: description: Workers that automatically receive and process messages from a queue messages: description: Push messages to a queue and pull or acknowledge them from consumers purge: description: Remove all pending messages from a queue subscriptions: description: Manage queue subscriptions for event-driven message routing r2: description: S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration groups: buckets: description: Create and configure R2 buckets including CORS, lifecycle, custom domains, event notifications, and object locks buckets.jobs: description: Create and inspect background jobs for an R2 bucket buckets.local-uploads: description: R2 bucket local upload configuration super-slurper: description: Migrate data from external S3-compatible storage into R2 buckets with resumable transfer jobs temporary-credentials: description: Generate short-lived S3-compatible credentials scoped to specific buckets and operations r2-data-catalog: description: Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines groups: credentials: description: Catalog access credentials for external query engines (Spark, Trino, etc.) maintenance-configs: description: Table maintenance settings — compaction schedules and snapshot expiration policies namespaces: description: Logical namespaces that group related tables within the data catalog namespaces.tables: description: Tables within catalog namespaces namespaces.tables.maintenance-configs: description: Table-level maintenance configurations and operations namespaces.tables.maintenance-runs: description: History of maintenance runs performed on tables radar: description: Internet-wide traffic intelligence — BGP, DNS, HTTP trends, attack data, and network quality insights groups: agent-readiness: description: Agent readiness summary statistics across the Cloudflare network ai: description: AI inference trends and model usage statistics across the Cloudflare network annotations: description: Radar annotations marking significant Internet events (outages, cable cuts, etc.) as112: description: AS112 DNS sinkhole statistics — reverse DNS query volumes for private address space attacks: description: DDoS and application-layer attack trends, vectors, and target analysis bgp: description: BGP routing data — prefix announcements, AS-level stats, route leaks, and hijack events bots: description: Internet-wide bot traffic trends, categories, and distribution statistics ct: description: Certificate Transparency log monitoring and newly-issued certificate discovery datasets: description: Downloadable Radar datasets for offline analysis and research dns: description: Global DNS query trends — top domains, resolver stats, and DNSSEC adoption email: description: Email security trends — DMARC/SPF/DKIM adoption, spam, and phishing statistics entities: description: Look up ASNs, IPs, domains, and locations with metadata and traffic summaries geolocations: description: Geographic location metadata used for regional traffic analysis http: description: HTTP protocol trends — TLS versions, HTTP versions, browser share, and OS distribution leaked-credentials: description: Leaked credential detection trends and exposure statistics netflows: description: Network-layer traffic flow data and volumetric trend analysis origins: description: Cloud and hosting origin providers (e.g. Amazon, by region) and their traffic metrics post-quantum: description: Post-quantum encryption adoption and deployment trends across the Internet quality: description: Internet connection quality metrics — speed, latency, and jitter by geography and ASN ranking: description: Top domain rankings based on DNS query popularity across the Cloudflare network robots-txt: description: Robots.txt adoption and crawler directive trends across the web search: description: Search Radar data across IPs, ASNs, domains, and locations tcp-resets-timeouts: description: TCP connection reset and timeout statistics indicating network health issues tlds: description: Top-level domain (TLD) metadata and performance trends traffic-anomalies: description: Detected traffic anomalies and unusual patterns in Internet traffic flows verified-bots: description: Catalog of known good bots (Googlebot, Bingbot, etc.) and their traffic patterns rate-limits: description: Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations realtime: description: Real-time audio, video, and data services on Cloudflare's global network groups: kit: description: SDK-backed meetings, participants, recordings, livestreams, and webhooks kit.analytics: description: Usage and livestream analytics for RealtimeKit applications kit.analytics.livestreams: description: Livestream analytics for RealtimeKit applications kit.analytics.livestreams.daily: description: Daily livestream analytics for RealtimeKit applications kit.analytics.usage: description: Usage analytics for RealtimeKit applications kit.apps: description: RealtimeKit applications that group meetings, sessions, and configuration kit.livestreams: description: Independent and meeting-based livestreams and their sessions kit.livestreams.sessions: description: Sessions for RealtimeKit livestreams kit.meetings: description: Meetings, participants, access tokens, and meeting livestreams kit.meetings.active: description: Live meeting state and participant controls kit.meetings.active.polls: description: Polls for active meeting sessions kit.meetings.livestream: description: Livestream operations associated with RealtimeKit meetings kit.meetings.participants: description: Participants in RealtimeKit meetings kit.meetings.participants.tokens: description: Access tokens for RealtimeKit meeting participants kit.presets: description: Reusable meeting configuration for media, permissions, and interface behavior kit.recordings: description: Meeting and participant-track recordings and recording controls kit.recordings.active: description: Active recordings for RealtimeKit meetings kit.recordings.tracks: description: Participant-track recordings for RealtimeKit meetings kit.sessions: description: Historical session data, participants, chat, transcripts, and summaries kit.sessions.chat: description: Chat messages from historical RealtimeKit sessions kit.sessions.livestreams: description: Livestreams associated with historical RealtimeKit sessions kit.sessions.participants: description: Participants in historical RealtimeKit sessions kit.sessions.peers: description: Peer details from historical RealtimeKit sessions kit.sessions.summaries: description: Summaries of historical RealtimeKit sessions kit.sessions.transcripts: description: Transcripts from historical RealtimeKit sessions kit.webhooks: description: Webhook endpoints and supported events for RealtimeKit notifications kit.webhooks.events: description: Supported events for RealtimeKit webhooks moq: description: MoQ relays for publishing and subscribing to media streams moq.relays: description: Relays are isolated MoQ scopes that carry media between publishers and subscribers moq.relays.tokens: description: Tokens that authorize publishers and subscribers to connect to a relay sfu: description: SFU apps that route WebRTC media and data between participants sfu.apps: description: SFU application namespaces for sessions and tracks turn: description: TURN keys that help clients traverse NATs and firewalls turn.keys: description: Keys used to generate short-lived TURN credentials request-tracers: description: Trace how a request would be processed through Cloudflare's rules and configuration pipeline groups: traces: description: Simulate request processing to debug rule matches, transforms, and routing decisions resource-sharing: description: Share Cloudflare resources (zones, accounts) across organizations with granular access controls groups: recipients: description: Update share recipients resources: description: Individual resources (zones, configs) that have been shared with recipients rules: description: Resources used by Cloudflare rules and rulesets groups: lists: description: Custom account-level lists of IPs, hostnames, ASNs, or redirects used in rule expressions rum: description: Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics groups: rules: description: Rules that control which pages and paths are tracked by Web Analytics site-info: description: Web Analytics sites — register domains and get the JavaScript beacon snippet scim: description: SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account groups: groups: description: Groups operations resource-types: description: Resource Types operations schemas: description: Schemas operations service-provider-config: description: Service Provider Config operations users: description: Users operations secrets-store: description: Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products groups: quota: description: Account quota limits for secrets stores, secrets count, and storage capacity secrets: description: Encrypted key-value secrets within a store. Pass --store-id to scope. stores: description: Secret stores that hold encrypted key-value secrets accessible by Workers and services security-center: description: Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities groups: insights: description: Security findings and recommendations across your account — DNS, SSL, WAF misconfigurations, etc. zone-insights: description: Zone-scoped security insights — counts by class, severity, type, and dismissal security-txt: description: Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities smart-shield: description: Smart Shield settings, health checks, and cache reserve management groups: cache-reserve-clear: description: Cache Reserve Clear operations health-checks: description: Health checks operations spectrum: description: Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation groups: analytics: description: Real-time and historical connection analytics for Spectrum applications apps: description: Spectrum application configurations that map protocols and ports to origin servers speed: description: Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests groups: availabilities: description: Check which speed test regions and configurations are available for your zone pages: description: Tested pages with their performance history, trends, and individual test results schedule: description: Scheduled recurring speed tests that automatically run at regular intervals ssl: description: SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations groups: automatic-upgrader: description: SSL automatic mode enrollment — get or update automatic SSL/TLS upgrader settings recommendations: description: Get the recommended SSL/TLS encryption mode based on your origin server's certificate configuration stream: description: Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale groups: audio-tracks: description: Add, edit, or remove additional audio tracks on a video captions: description: Upload, generate, or retrieve captions and subtitles for videos in multiple languages clip: description: Create a new video clip from an existing video by specifying start and end times copy: description: Import a video from a URL into Stream for processing and delivery direct-upload: description: Generate a tokenized URL that lets end-users upload video directly to Stream downloads: description: Create downloadable MP4 renditions of a video for offline viewing embed: description: Retrieve the HTML embed code snippet for a video keys: description: Signing keys used to generate short-lived signed URLs for private video playback live-inputs: description: Enable and disable live input streams token: description: Generate short-lived signed URL tokens for secure private video playback typed-downloads: description: Type-specific stream download creation and deletion videos: description: Aggregate video storage usage statistics for the account watermarks: description: Watermark profiles that overlay an image on every video in the account webhooks: description: Webhook notifications for video lifecycle events (ready, error, etc.) tenants: description: Multi-tenant account management — manage tenant accounts, entitlements, and memberships groups: account-types: description: Account Types operations accounts: description: Accounts operations entitlements: description: Entitlements operations memberships: description: Memberships operations turnstile: description: CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience groups: widgets: description: Turnstile widget configurations — site keys, secret rotation, and challenge mode settings url-scanner: description: Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results groups: response: description: Response operations responses: description: Raw HTTP response data captured during URL scans scan: description: Scan operations scans: description: URL scan requests and results — submit URLs for analysis and retrieve threat verdicts user: description: Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens groups: billing: description: View billing history and payment profile for your user (deprecated — prefer account-level billing) firewall: description: Firewall operations load-balancers.monitors: description: Load Balancers operations load-balancers.monitors.preview: description: Load Balancers operations load-balancers.monitors.references: description: Load Balancers operations load-balancers.pools: description: Load Balancers operations load-balancers.pools.edit.pools: description: Load Balancers operations load-balancers.pools.health: description: Load Balancers operations load-balancers.pools.preview: description: Load Balancers operations load-balancers.pools.references: description: Load Balancers operations load-balancers.preview: description: Load Balancers operations load-balancing-analytics.events: description: Load Balancing Analytics operations subscriptions: description: View and manage zone-level plan subscriptions owned by your user tenants: description: Tenants operations tokens: description: Create and manage personal API tokens scoped to your user for programmatic API access user.analytics: description: User-level traffic analytics — aggregated totals and timeseries across all zones vectorize: description: Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers groups: deprecated-indexes: description: Deprecated v1 Vectorize index operations metadata-index: description: Metadata indexes for filtered vector search waiting-rooms: description: Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages groups: account-waiting-rooms: description: Account-scoped waiting room listing events: description: Scheduled events that temporarily override waiting room settings for sales, launches, etc. page: description: Custom HTML waiting page templates and preview rendering rules: description: Rules that bypass or modify waiting room behavior for specific request patterns settings: description: Zone-level waiting room defaults and cookie configuration statuses: description: Real-time queue status showing active users, queued users, and estimated wait times workflows: description: Durable, multi-step workflows that run on Workers with automatic retries and state persistence groups: instances: description: Workflow instance operations versions: description: Workflow version operations zaraz: description: Server-side tag manager — load third-party tools (analytics, pixels, etc.) from Cloudflare's edge without client-side JS groups: config: description: Full Zaraz configuration including tools, triggers, and variables for the zone default: description: Default Zaraz configuration template used as a starting point for new zones export: description: Export the current Zaraz configuration as a portable JSON document history: description: Configuration version history — browse and restore previous Zaraz configurations publish: description: Publish pending Zaraz configuration changes to make them live on the zone workflow: description: Workflow state for Zaraz configuration changes (draft vs. published) zero-trust: description: Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation groups: dex: description: Digital Experience Monitoring — synthetic tests, fleet-wide device metrics, and network path diagnostics dlp.custom-prompt-topics: description: Data Loss Prevention - manage custom prompt topics for AI-based content detection dlp.data-classes: description: Data Loss Prevention - manage data classes used to classify sensitive information dlp.data-tag-categories: description: Data Loss Prevention - manage categories that organize data tags dlp.data-tag-category-templates: description: Data Loss Prevention - browse templates for creating data tag categories dlp.data-tags: description: Data Loss Prevention - manage tags used to classify and organize sensitive data dlp.datasets: description: Data Loss Prevention - manage datasets, versions, and uploads dlp.document-fingerprints: description: Data Loss Prevention - manage document fingerprints for detecting matching documents dlp.email.account-mapping: description: Data Loss Prevention - configure account mappings for outbound email scanning dlp.email.rules: description: Data Loss Prevention - manage outbound email scanning rules and their priorities dlp.entries: description: Data Loss Prevention - list and manage detection entries dlp.limits: description: Data Loss Prevention - view account limits and resource quotas dlp.patterns: description: Data Loss Prevention - validate regular expressions used for content detection dlp.profiles: description: Data Loss Prevention - list and retrieve profiles dlp.profiles.custom: description: Data Loss Prevention - manage custom profiles dlp.profiles.predefined: description: Data Loss Prevention - manage predefined profiles dlp.sensitivity-group-templates: description: Data Loss Prevention - browse templates for creating sensitivity groups dlp.sensitivity-groups: description: Data Loss Prevention - manage sensitivity groups and their level ordering dlp.sensitivity-levels: description: Data Loss Prevention - manage sensitivity levels within sensitivity groups dlp.settings: description: Data Loss Prevention - manage account-level settings dlp.validators: description: Data Loss Prevention - list and retrieve content validators dlp.validators.proximity-words: description: Data Loss Prevention - manage proximity-word validators risk-scoring: description: User Risk Scoring - retrieve and reset user risk scores risk-scoring.behaviours: description: User Risk Scoring - manage behaviors used to calculate user risk scores risk-scoring.integrations: description: User Risk Scoring - manage integrations that provide risk score signals risk-scoring.integrations.references: description: User Risk Scoring - retrieve integrations by external reference risk-scoring.summary: description: User Risk Scoring - retrieve account risk score summaries zones: description: Zones are domains on Cloudflare — list, create, and configure domain settings groups: aegis: description: Aegis operations fonts: description: Fonts operations origin-h2-max-streams: description: Origin H2 Max Streams operations origin-max-http-version: description: Origin Max Http Version operations origin-tls-compliance-modes: description: Manage zone Origin TLS Compliance Modes setting rum: description: Rum operations speed-brain: description: Speed Brain operations