Skip to content
Start here

Read instances.

client.AISearch.Instances.Read(ctx, id, query) (*InstanceReadResponse, error)
GET/accounts/{account_id}/ai-search/instances/{id}

Read instances.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
id string

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

maxLength64
minLength1
query InstanceReadParams
AccountID param.Field[string]
ReturnsExpand Collapse
type InstanceReadResponse struct{…}
ID string

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

maxLength64
minLength1
CreatedAt Time
formatdate-time
ModifiedAt Time
formatdate-time
AIGatewayID stringoptional
AISearchModel InstanceReadResponseAISearchModeloptional
One of the following:
const InstanceReadResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceReadResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceReadResponseAISearchModelCfZaiOrgGlm4_7Flash InstanceReadResponseAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceReadResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceReadResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceReadResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceReadResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceReadResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceReadResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceReadResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceReadResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceReadResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceReadResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceReadResponseAISearchModelCfGoogleGemma3_12bIt InstanceReadResponseAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceReadResponseAISearchModelAnthropicClaude3_7Sonnet InstanceReadResponseAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceReadResponseAISearchModelAnthropicClaudeSonnet4 InstanceReadResponseAISearchModel = "anthropic/claude-sonnet-4"
const InstanceReadResponseAISearchModelAnthropicClaudeOpus4 InstanceReadResponseAISearchModel = "anthropic/claude-opus-4"
const InstanceReadResponseAISearchModelAnthropicClaude3_5Haiku InstanceReadResponseAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceReadResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceReadResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceReadResponseAISearchModelCerebrasLlama3_3_70b InstanceReadResponseAISearchModel = "cerebras/llama-3.3-70b"
const InstanceReadResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceReadResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceReadResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceReadResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceReadResponseAISearchModelCerebrasGptOSs120b InstanceReadResponseAISearchModel = "cerebras/gpt-oss-120b"
const InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceReadResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceReadResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceReadResponseAISearchModelGrokGrok4 InstanceReadResponseAISearchModel = "grok/grok-4"
const InstanceReadResponseAISearchModelGroqLlama3_3_70bVersatile InstanceReadResponseAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceReadResponseAISearchModelGroqLlama3_1_8bInstant InstanceReadResponseAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceReadResponseAISearchModelOpenAIGpt5 InstanceReadResponseAISearchModel = "openai/gpt-5"
const InstanceReadResponseAISearchModelOpenAIGpt5Mini InstanceReadResponseAISearchModel = "openai/gpt-5-mini"
const InstanceReadResponseAISearchModelOpenAIGpt5Nano InstanceReadResponseAISearchModel = "openai/gpt-5-nano"
const InstanceReadResponseAISearchModelEmpty InstanceReadResponseAISearchModel = ""
Cache booloptional
CacheThreshold InstanceReadResponseCacheThresholdoptional
One of the following:
const InstanceReadResponseCacheThresholdSuperStrictMatch InstanceReadResponseCacheThreshold = "super_strict_match"
const InstanceReadResponseCacheThresholdCloseEnough InstanceReadResponseCacheThreshold = "close_enough"
const InstanceReadResponseCacheThresholdFlexibleFriend InstanceReadResponseCacheThreshold = "flexible_friend"
const InstanceReadResponseCacheThresholdAnythingGoes InstanceReadResponseCacheThreshold = "anything_goes"
ChunkOverlap int64optional
maximum30
minimum0
ChunkSize int64optional
minimum64
CreatedBy stringoptional
CustomMetadata []InstanceReadResponseCustomMetadataoptional
DataType InstanceReadResponseCustomMetadataDataType
One of the following:
const InstanceReadResponseCustomMetadataDataTypeText InstanceReadResponseCustomMetadataDataType = "text"
const InstanceReadResponseCustomMetadataDataTypeNumber InstanceReadResponseCustomMetadataDataType = "number"
const InstanceReadResponseCustomMetadataDataTypeBoolean InstanceReadResponseCustomMetadataDataType = "boolean"
const InstanceReadResponseCustomMetadataDataTypeDatetime InstanceReadResponseCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel InstanceReadResponseEmbeddingModeloptional
One of the following:
const InstanceReadResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceReadResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceReadResponseEmbeddingModelCfBaaiBgeM3 InstanceReadResponseEmbeddingModel = "@cf/baai/bge-m3"
const InstanceReadResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceReadResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceReadResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceReadResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceReadResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceReadResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceReadResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceReadResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Small InstanceReadResponseEmbeddingModel = "openai/text-embedding-3-small"
const InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Large InstanceReadResponseEmbeddingModel = "openai/text-embedding-3-large"
const InstanceReadResponseEmbeddingModelEmpty InstanceReadResponseEmbeddingModel = ""
Enable booloptional
EngineVersion float64optional
FusionMethod InstanceReadResponseFusionMethodoptional
One of the following:
const InstanceReadResponseFusionMethodMax InstanceReadResponseFusionMethod = "max"
const InstanceReadResponseFusionMethodRrf InstanceReadResponseFusionMethod = "rrf"
HybridSearchEnabled booloptional
IndexingOptions InstanceReadResponseIndexingOptionsoptional
KeywordTokenizer InstanceReadResponseIndexingOptionsKeywordTokenizeroptional

Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.

One of the following:
const InstanceReadResponseIndexingOptionsKeywordTokenizerPorter InstanceReadResponseIndexingOptionsKeywordTokenizer = "porter"
const InstanceReadResponseIndexingOptionsKeywordTokenizerTrigram InstanceReadResponseIndexingOptionsKeywordTokenizer = "trigram"
LastActivity Timeoptional
formatdate-time
MaxNumResults int64optional
maximum50
minimum1
Metadata InstanceReadResponseMetadataoptional
CreatedFromAISearchWizard booloptional
WorkerDomain stringoptional
ModifiedBy stringoptional
Namespace stringoptional
maxLength32
minLength1
Paused booloptional
PublicEndpointID stringoptional
PublicEndpointParams InstanceReadResponsePublicEndpointParamsoptional
AuthorizedHosts []stringoptional
ChatCompletionsEndpoint InstanceReadResponsePublicEndpointParamsChatCompletionsEndpointoptional
Disabled booloptional

Disable chat completions endpoint for this public endpoint

Enabled booloptional
Mcp InstanceReadResponsePublicEndpointParamsMcpoptional
Description stringoptional
Disabled booloptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceReadResponsePublicEndpointParamsRateLimitoptional
PeriodMs int64optional
maximum3600000
minimum60000
Requests int64optional
minimum1
Technique InstanceReadResponsePublicEndpointParamsRateLimitTechniqueoptional
One of the following:
const InstanceReadResponsePublicEndpointParamsRateLimitTechniqueFixed InstanceReadResponsePublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceReadResponsePublicEndpointParamsRateLimitTechniqueSliding InstanceReadResponsePublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceReadResponsePublicEndpointParamsSearchEndpointoptional
Disabled booloptional

Disable search endpoint for this public endpoint

Reranking booloptional
RerankingModel InstanceReadResponseRerankingModeloptional
One of the following:
const InstanceReadResponseRerankingModelCfBaaiBgeRerankerBase InstanceReadResponseRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceReadResponseRerankingModelEmpty InstanceReadResponseRerankingModel = ""
RetrievalOptions InstanceReadResponseRetrievalOptionsoptional
BoostBy []InstanceReadResponseRetrievalOptionsBoostByoptional

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

Field string

Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support asc/desc directions; text/boolean fields support exists/not_exists.

maxLength64
minLength1
Direction InstanceReadResponseRetrievalOptionsBoostByDirectionoptional

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

One of the following:
const InstanceReadResponseRetrievalOptionsBoostByDirectionAsc InstanceReadResponseRetrievalOptionsBoostByDirection = "asc"
const InstanceReadResponseRetrievalOptionsBoostByDirectionDesc InstanceReadResponseRetrievalOptionsBoostByDirection = "desc"
const InstanceReadResponseRetrievalOptionsBoostByDirectionExists InstanceReadResponseRetrievalOptionsBoostByDirection = "exists"
const InstanceReadResponseRetrievalOptionsBoostByDirectionNotExists InstanceReadResponseRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceReadResponseRetrievalOptionsKeywordMatchModeoptional

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. Defaults to 'and'. Legacy values 'exact_match' and 'fuzzy_match' are accepted and map to 'and' and 'or' respectively.

One of the following:
const InstanceReadResponseRetrievalOptionsKeywordMatchModeAnd InstanceReadResponseRetrievalOptionsKeywordMatchMode = "and"
const InstanceReadResponseRetrievalOptionsKeywordMatchModeOr InstanceReadResponseRetrievalOptionsKeywordMatchMode = "or"
RewriteModel InstanceReadResponseRewriteModeloptional
One of the following:
const InstanceReadResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceReadResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceReadResponseRewriteModelCfZaiOrgGlm4_7Flash InstanceReadResponseRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceReadResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceReadResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceReadResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceReadResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceReadResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceReadResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceReadResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceReadResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceReadResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceReadResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceReadResponseRewriteModelCfGoogleGemma3_12bIt InstanceReadResponseRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceReadResponseRewriteModelAnthropicClaude3_7Sonnet InstanceReadResponseRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceReadResponseRewriteModelAnthropicClaudeSonnet4 InstanceReadResponseRewriteModel = "anthropic/claude-sonnet-4"
const InstanceReadResponseRewriteModelAnthropicClaudeOpus4 InstanceReadResponseRewriteModel = "anthropic/claude-opus-4"
const InstanceReadResponseRewriteModelAnthropicClaude3_5Haiku InstanceReadResponseRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceReadResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceReadResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceReadResponseRewriteModelCerebrasLlama3_3_70b InstanceReadResponseRewriteModel = "cerebras/llama-3.3-70b"
const InstanceReadResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceReadResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceReadResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceReadResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceReadResponseRewriteModelCerebrasGptOSs120b InstanceReadResponseRewriteModel = "cerebras/gpt-oss-120b"
const InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceReadResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceReadResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceReadResponseRewriteModelGrokGrok4 InstanceReadResponseRewriteModel = "grok/grok-4"
const InstanceReadResponseRewriteModelGroqLlama3_3_70bVersatile InstanceReadResponseRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceReadResponseRewriteModelGroqLlama3_1_8bInstant InstanceReadResponseRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceReadResponseRewriteModelOpenAIGpt5 InstanceReadResponseRewriteModel = "openai/gpt-5"
const InstanceReadResponseRewriteModelOpenAIGpt5Mini InstanceReadResponseRewriteModel = "openai/gpt-5-mini"
const InstanceReadResponseRewriteModelOpenAIGpt5Nano InstanceReadResponseRewriteModel = "openai/gpt-5-nano"
const InstanceReadResponseRewriteModelEmpty InstanceReadResponseRewriteModel = ""
RewriteQuery booloptional
ScoreThreshold float64optional
maximum1
minimum0
Source stringoptional
SourceParams InstanceReadResponseSourceParamsoptional
ExcludeItems []stringoptional

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)

IncludeItems []stringoptional

List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post)

Prefix stringoptional
R2Jurisdiction stringoptional
WebCrawler InstanceReadResponseSourceParamsWebCrawleroptional
CrawlOptions InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsoptional
Depth float64optional
maximum100000
minimum1
IncludeSubdomains booloptional
MaxAge float64optional
maximum604800
minimum0
Source InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSourceoptional
One of the following:
const InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSourceAll InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSource = "all"
const InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSourceSitemaps InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSource = "sitemaps"
const InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSourceLinks InstanceReadResponseSourceParamsWebCrawlerCrawlOptionsSource = "links"
ParseOptions InstanceReadResponseSourceParamsWebCrawlerParseOptionsoptional
ContentSelector []InstanceReadResponseSourceParamsWebCrawlerParseOptionsContentSelectoroptional

List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed.

Path string

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

maxLength200
Selector string

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

maxLength200
IncludeHeaders map[string, string]optional
IncludeImages booloptional
SpecificSitemaps []stringoptional

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

UseBrowserRendering booloptional
ParseType InstanceReadResponseSourceParamsWebCrawlerParseTypeoptional
One of the following:
const InstanceReadResponseSourceParamsWebCrawlerParseTypeSitemap InstanceReadResponseSourceParamsWebCrawlerParseType = "sitemap"
const InstanceReadResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceReadResponseSourceParamsWebCrawlerParseType = "feed-rss"
const InstanceReadResponseSourceParamsWebCrawlerParseTypeCrawl InstanceReadResponseSourceParamsWebCrawlerParseType = "crawl"
StoreOptions InstanceReadResponseSourceParamsWebCrawlerStoreOptionsoptional
StorageID string
R2Jurisdiction stringoptional
StorageType Provideroptional
Status stringoptional
TokenID stringoptional
formatuuid
Type InstanceReadResponseTypeoptional
One of the following:
const InstanceReadResponseTypeR2 InstanceReadResponseType = "r2"
const InstanceReadResponseTypeWebCrawler InstanceReadResponseType = "web-crawler"

Read instances.

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/ai_search"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.AISearch.Instances.Read(
    context.TODO(),
    "my-ai-search",
    ai_search.InstanceReadParams{
      AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}
{
  "result": {
    "id": "my-ai-search",
    "created_at": "2019-12-27T18:11:19.117Z",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "ai_gateway_id": "ai_gateway_id",
    "ai_search_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "cache": true,
    "cache_threshold": "super_strict_match",
    "chunk_overlap": 0,
    "chunk_size": 64,
    "created_by": "created_by",
    "custom_metadata": [
      {
        "data_type": "text",
        "field_name": "x"
      }
    ],
    "embedding_model": "@cf/qwen/qwen3-embedding-0.6b",
    "enable": true,
    "engine_version": 0,
    "fusion_method": "max",
    "hybrid_search_enabled": true,
    "indexing_options": {
      "keyword_tokenizer": "porter"
    },
    "last_activity": "2019-12-27T18:11:19.117Z",
    "max_num_results": 1,
    "metadata": {
      "created_from_aisearch_wizard": true,
      "worker_domain": "worker_domain"
    },
    "modified_by": "modified_by",
    "namespace": "x",
    "paused": true,
    "public_endpoint_id": "public_endpoint_id",
    "public_endpoint_params": {
      "authorized_hosts": [
        "string"
      ],
      "chat_completions_endpoint": {
        "disabled": true
      },
      "enabled": true,
      "mcp": {
        "description": "description",
        "disabled": true
      },
      "rate_limit": {
        "period_ms": 60000,
        "requests": 1,
        "technique": "fixed"
      },
      "search_endpoint": {
        "disabled": true
      }
    },
    "reranking": true,
    "reranking_model": "@cf/baai/bge-reranker-base",
    "retrieval_options": {
      "boost_by": [
        {
          "field": "timestamp",
          "direction": "desc"
        }
      ],
      "keyword_match_mode": "and"
    },
    "rewrite_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "rewrite_query": true,
    "score_threshold": 0,
    "source": "source",
    "source_params": {
      "exclude_items": [
        "/admin/**",
        "/private/**",
        "**\\temp\\**"
      ],
      "include_items": [
        "/blog/**",
        "/docs/**/*.html",
        "**\\blog\\**.html"
      ],
      "prefix": "prefix",
      "r2_jurisdiction": "r2_jurisdiction",
      "web_crawler": {
        "crawl_options": {
          "depth": 1,
          "include_external_links": true,
          "include_subdomains": true,
          "max_age": 0,
          "source": "all"
        },
        "parse_options": {
          "content_selector": [
            {
              "path": "**/blog/**",
              "selector": "article .post-body"
            }
          ],
          "include_headers": {
            "foo": "string"
          },
          "include_images": true,
          "specific_sitemaps": [
            "https://example.com/sitemap.xml",
            "https://example.com/blog-sitemap.xml"
          ],
          "use_browser_rendering": true
        },
        "parse_type": "sitemap",
        "store_options": {
          "storage_id": "storage_id",
          "r2_jurisdiction": "r2_jurisdiction",
          "storage_type": "r2"
        }
      }
    },
    "status": "status",
    "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "type": "r2"
  },
  "success": true
}
Returns Examples
{
  "result": {
    "id": "my-ai-search",
    "created_at": "2019-12-27T18:11:19.117Z",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "ai_gateway_id": "ai_gateway_id",
    "ai_search_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "cache": true,
    "cache_threshold": "super_strict_match",
    "chunk_overlap": 0,
    "chunk_size": 64,
    "created_by": "created_by",
    "custom_metadata": [
      {
        "data_type": "text",
        "field_name": "x"
      }
    ],
    "embedding_model": "@cf/qwen/qwen3-embedding-0.6b",
    "enable": true,
    "engine_version": 0,
    "fusion_method": "max",
    "hybrid_search_enabled": true,
    "indexing_options": {
      "keyword_tokenizer": "porter"
    },
    "last_activity": "2019-12-27T18:11:19.117Z",
    "max_num_results": 1,
    "metadata": {
      "created_from_aisearch_wizard": true,
      "worker_domain": "worker_domain"
    },
    "modified_by": "modified_by",
    "namespace": "x",
    "paused": true,
    "public_endpoint_id": "public_endpoint_id",
    "public_endpoint_params": {
      "authorized_hosts": [
        "string"
      ],
      "chat_completions_endpoint": {
        "disabled": true
      },
      "enabled": true,
      "mcp": {
        "description": "description",
        "disabled": true
      },
      "rate_limit": {
        "period_ms": 60000,
        "requests": 1,
        "technique": "fixed"
      },
      "search_endpoint": {
        "disabled": true
      }
    },
    "reranking": true,
    "reranking_model": "@cf/baai/bge-reranker-base",
    "retrieval_options": {
      "boost_by": [
        {
          "field": "timestamp",
          "direction": "desc"
        }
      ],
      "keyword_match_mode": "and"
    },
    "rewrite_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "rewrite_query": true,
    "score_threshold": 0,
    "source": "source",
    "source_params": {
      "exclude_items": [
        "/admin/**",
        "/private/**",
        "**\\temp\\**"
      ],
      "include_items": [
        "/blog/**",
        "/docs/**/*.html",
        "**\\blog\\**.html"
      ],
      "prefix": "prefix",
      "r2_jurisdiction": "r2_jurisdiction",
      "web_crawler": {
        "crawl_options": {
          "depth": 1,
          "include_external_links": true,
          "include_subdomains": true,
          "max_age": 0,
          "source": "all"
        },
        "parse_options": {
          "content_selector": [
            {
              "path": "**/blog/**",
              "selector": "article .post-body"
            }
          ],
          "include_headers": {
            "foo": "string"
          },
          "include_images": true,
          "specific_sitemaps": [
            "https://example.com/sitemap.xml",
            "https://example.com/blog-sitemap.xml"
          ],
          "use_browser_rendering": true
        },
        "parse_type": "sitemap",
        "store_options": {
          "storage_id": "storage_id",
          "r2_jurisdiction": "r2_jurisdiction",
          "storage_type": "r2"
        }
      }
    },
    "status": "status",
    "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "type": "r2"
  },
  "success": true
}