Skip to content
Start here

List AI Search instances.

client.AISearch.Instances.List(ctx, params) (*V4PagePaginationArray[InstanceListResponse], error)
GET/accounts/{account_id}/ai-search/instances

List all AI Search instances in the account.

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
params InstanceListParams
AccountID param.Field[string]

Path param

Namespace param.Field[string]Optional

Query param: Filter by namespace.

OrderBy param.Field[InstanceListParamsOrderBy]Optional

Query param: Field to order results by.

const InstanceListParamsOrderByCreatedAt InstanceListParamsOrderBy = "created_at"
OrderByDirection param.Field[InstanceListParamsOrderByDirection]Optional

Query param: Order direction.

const InstanceListParamsOrderByDirectionAsc InstanceListParamsOrderByDirection = "asc"
const InstanceListParamsOrderByDirectionDesc InstanceListParamsOrderByDirection = "desc"
Page param.Field[int64]Optional

Query param: Page number (1-indexed).

minimum1
PerPage param.Field[int64]Optional

Query param: Number of results per page.

maximum100
minimum1
ReturnsExpand Collapse
type InstanceListResponse 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 InstanceListResponseAISearchModelOptional
One of the following:
const InstanceListResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceListResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceListResponseAISearchModelCfZaiOrgGlm4_7Flash InstanceListResponseAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceListResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceListResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceListResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceListResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceListResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceListResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceListResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceListResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceListResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceListResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceListResponseAISearchModelCfGoogleGemma3_12bIt InstanceListResponseAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceListResponseAISearchModelCfGoogleGemma4_26bA4bIt InstanceListResponseAISearchModel = "@cf/google/gemma-4-26b-a4b-it"
const InstanceListResponseAISearchModelCfMoonshotaiKimiK2_5 InstanceListResponseAISearchModel = "@cf/moonshotai/kimi-k2.5"
const InstanceListResponseAISearchModelAnthropicClaude3_7Sonnet InstanceListResponseAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceListResponseAISearchModelAnthropicClaudeSonnet4 InstanceListResponseAISearchModel = "anthropic/claude-sonnet-4"
const InstanceListResponseAISearchModelAnthropicClaudeOpus4 InstanceListResponseAISearchModel = "anthropic/claude-opus-4"
const InstanceListResponseAISearchModelAnthropicClaude3_5Haiku InstanceListResponseAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceListResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceListResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceListResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceListResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceListResponseAISearchModelCerebrasLlama3_3_70b InstanceListResponseAISearchModel = "cerebras/llama-3.3-70b"
const InstanceListResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceListResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceListResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceListResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceListResponseAISearchModelCerebrasGptOSs120b InstanceListResponseAISearchModel = "cerebras/gpt-oss-120b"
const InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceListResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceListResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceListResponseAISearchModelGrokGrok4 InstanceListResponseAISearchModel = "grok/grok-4"
const InstanceListResponseAISearchModelGroqLlama3_3_70bVersatile InstanceListResponseAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceListResponseAISearchModelGroqLlama3_1_8bInstant InstanceListResponseAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceListResponseAISearchModelOpenAIGpt5 InstanceListResponseAISearchModel = "openai/gpt-5"
const InstanceListResponseAISearchModelOpenAIGpt5Mini InstanceListResponseAISearchModel = "openai/gpt-5-mini"
const InstanceListResponseAISearchModelOpenAIGpt5Nano InstanceListResponseAISearchModel = "openai/gpt-5-nano"
const InstanceListResponseAISearchModelEmpty InstanceListResponseAISearchModel = ""
Cache boolOptional
CacheThreshold InstanceListResponseCacheThresholdOptional
One of the following:
const InstanceListResponseCacheThresholdSuperStrictMatch InstanceListResponseCacheThreshold = "super_strict_match"
const InstanceListResponseCacheThresholdCloseEnough InstanceListResponseCacheThreshold = "close_enough"
const InstanceListResponseCacheThresholdFlexibleFriend InstanceListResponseCacheThreshold = "flexible_friend"
const InstanceListResponseCacheThresholdAnythingGoes InstanceListResponseCacheThreshold = "anything_goes"
CacheTTL InstanceListResponseCacheTTLOptional

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).

One of the following:
const InstanceListResponseCacheTTL600 InstanceListResponseCacheTTL = 600
const InstanceListResponseCacheTTL1800 InstanceListResponseCacheTTL = 1800
const InstanceListResponseCacheTTL3600 InstanceListResponseCacheTTL = 3600
const InstanceListResponseCacheTTL7200 InstanceListResponseCacheTTL = 7200
const InstanceListResponseCacheTTL21600 InstanceListResponseCacheTTL = 21600
const InstanceListResponseCacheTTL43200 InstanceListResponseCacheTTL = 43200
const InstanceListResponseCacheTTL86400 InstanceListResponseCacheTTL = 86400
const InstanceListResponseCacheTTL172800 InstanceListResponseCacheTTL = 172800
const InstanceListResponseCacheTTL259200 InstanceListResponseCacheTTL = 259200
const InstanceListResponseCacheTTL518400 InstanceListResponseCacheTTL = 518400
ChunkOverlap int64Optional
maximum30
minimum0
ChunkSize int64Optional
minimum64
CreatedBy stringOptional
CustomMetadata []InstanceListResponseCustomMetadataOptional
DataType InstanceListResponseCustomMetadataDataType
One of the following:
const InstanceListResponseCustomMetadataDataTypeText InstanceListResponseCustomMetadataDataType = "text"
const InstanceListResponseCustomMetadataDataTypeNumber InstanceListResponseCustomMetadataDataType = "number"
const InstanceListResponseCustomMetadataDataTypeBoolean InstanceListResponseCustomMetadataDataType = "boolean"
const InstanceListResponseCustomMetadataDataTypeDatetime InstanceListResponseCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel InstanceListResponseEmbeddingModelOptional
One of the following:
const InstanceListResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceListResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceListResponseEmbeddingModelCfQwenQwen3VlEmbedding2b InstanceListResponseEmbeddingModel = "@cf/qwen/qwen3-vl-embedding-2b"
const InstanceListResponseEmbeddingModelCfBaaiBgeM3 InstanceListResponseEmbeddingModel = "@cf/baai/bge-m3"
const InstanceListResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceListResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceListResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceListResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceListResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceListResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceListResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceListResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceListResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2 InstanceListResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2"
const InstanceListResponseEmbeddingModelOpenAITextEmbedding3Small InstanceListResponseEmbeddingModel = "openai/text-embedding-3-small"
const InstanceListResponseEmbeddingModelOpenAITextEmbedding3Large InstanceListResponseEmbeddingModel = "openai/text-embedding-3-large"
const InstanceListResponseEmbeddingModelEmpty InstanceListResponseEmbeddingModel = ""
Enable boolOptional
EngineVersion float64Optional
FusionMethod InstanceListResponseFusionMethodOptional
One of the following:
const InstanceListResponseFusionMethodMax InstanceListResponseFusionMethod = "max"
const InstanceListResponseFusionMethodRrf InstanceListResponseFusionMethod = "rrf"
DeprecatedHybridSearchEnabled boolOptional

Deprecated — use index_method instead.

IndexMethod InstanceListResponseIndexMethodOptional

Controls which storage backends are used during indexing. Defaults to vector-only.

Keyword bool

Enable keyword (BM25) storage backend.

Vector bool

Enable vector (embedding) storage backend.

IndexingOptions InstanceListResponseIndexingOptionsOptional
KeywordTokenizer InstanceListResponseIndexingOptionsKeywordTokenizerOptional

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 InstanceListResponseIndexingOptionsKeywordTokenizerPorter InstanceListResponseIndexingOptionsKeywordTokenizer = "porter"
const InstanceListResponseIndexingOptionsKeywordTokenizerTrigram InstanceListResponseIndexingOptionsKeywordTokenizer = "trigram"
LastActivity TimeOptional
formatdate-time
MaxNumResults int64Optional
maximum50
minimum1
Metadata InstanceListResponseMetadataOptional
CreatedFromAISearchWizard boolOptional
WorkerDomain stringOptional
ModifiedBy stringOptional
Namespace stringOptional
Paused boolOptional
PublicEndpointID stringOptional
PublicEndpointParams InstanceListResponsePublicEndpointParamsOptional
AuthorizedHosts []stringOptional
ChatCompletionsEndpoint InstanceListResponsePublicEndpointParamsChatCompletionsEndpointOptional
Disabled boolOptional

Disable chat completions endpoint for this public endpoint

CustomDomains []stringOptional

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).

DefaultDomainEnabled boolOptional

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

Enabled boolOptional
Mcp InstanceListResponsePublicEndpointParamsMcpOptional
Description stringOptional
Disabled boolOptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceListResponsePublicEndpointParamsRateLimitOptional
PeriodMs int64Optional
maximum3600000
minimum60000
Requests int64Optional
minimum1
Technique InstanceListResponsePublicEndpointParamsRateLimitTechniqueOptional
One of the following:
const InstanceListResponsePublicEndpointParamsRateLimitTechniqueFixed InstanceListResponsePublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceListResponsePublicEndpointParamsRateLimitTechniqueSliding InstanceListResponsePublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceListResponsePublicEndpointParamsSearchEndpointOptional
Disabled boolOptional

Disable search endpoint for this public endpoint

Reranking boolOptional
RerankingModel InstanceListResponseRerankingModelOptional
One of the following:
const InstanceListResponseRerankingModelCfBaaiBgeRerankerBase InstanceListResponseRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceListResponseRerankingModelEmpty InstanceListResponseRerankingModel = ""
RetrievalOptions InstanceListResponseRetrievalOptionsOptional
BoostBy []InstanceListResponseRetrievalOptionsBoostByOptional

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.

Field string

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

maxLength64
minLength1
Direction InstanceListResponseRetrievalOptionsBoostByDirectionOptional

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 InstanceListResponseRetrievalOptionsBoostByDirectionAsc InstanceListResponseRetrievalOptionsBoostByDirection = "asc"
const InstanceListResponseRetrievalOptionsBoostByDirectionDesc InstanceListResponseRetrievalOptionsBoostByDirection = "desc"
const InstanceListResponseRetrievalOptionsBoostByDirectionExists InstanceListResponseRetrievalOptionsBoostByDirection = "exists"
const InstanceListResponseRetrievalOptionsBoostByDirectionNotExists InstanceListResponseRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceListResponseRetrievalOptionsKeywordMatchModeOptional

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’.

One of the following:
const InstanceListResponseRetrievalOptionsKeywordMatchModeAnd InstanceListResponseRetrievalOptionsKeywordMatchMode = "and"
const InstanceListResponseRetrievalOptionsKeywordMatchModeOr InstanceListResponseRetrievalOptionsKeywordMatchMode = "or"
RewriteModel InstanceListResponseRewriteModelOptional
One of the following:
const InstanceListResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceListResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceListResponseRewriteModelCfZaiOrgGlm4_7Flash InstanceListResponseRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceListResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceListResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceListResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceListResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceListResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceListResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceListResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceListResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceListResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceListResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceListResponseRewriteModelCfGoogleGemma3_12bIt InstanceListResponseRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceListResponseRewriteModelCfGoogleGemma4_26bA4bIt InstanceListResponseRewriteModel = "@cf/google/gemma-4-26b-a4b-it"
const InstanceListResponseRewriteModelCfMoonshotaiKimiK2_5 InstanceListResponseRewriteModel = "@cf/moonshotai/kimi-k2.5"
const InstanceListResponseRewriteModelAnthropicClaude3_7Sonnet InstanceListResponseRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceListResponseRewriteModelAnthropicClaudeSonnet4 InstanceListResponseRewriteModel = "anthropic/claude-sonnet-4"
const InstanceListResponseRewriteModelAnthropicClaudeOpus4 InstanceListResponseRewriteModel = "anthropic/claude-opus-4"
const InstanceListResponseRewriteModelAnthropicClaude3_5Haiku InstanceListResponseRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceListResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceListResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceListResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceListResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceListResponseRewriteModelCerebrasLlama3_3_70b InstanceListResponseRewriteModel = "cerebras/llama-3.3-70b"
const InstanceListResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceListResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceListResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceListResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceListResponseRewriteModelCerebrasGptOSs120b InstanceListResponseRewriteModel = "cerebras/gpt-oss-120b"
const InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceListResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceListResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceListResponseRewriteModelGrokGrok4 InstanceListResponseRewriteModel = "grok/grok-4"
const InstanceListResponseRewriteModelGroqLlama3_3_70bVersatile InstanceListResponseRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceListResponseRewriteModelGroqLlama3_1_8bInstant InstanceListResponseRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceListResponseRewriteModelOpenAIGpt5 InstanceListResponseRewriteModel = "openai/gpt-5"
const InstanceListResponseRewriteModelOpenAIGpt5Mini InstanceListResponseRewriteModel = "openai/gpt-5-mini"
const InstanceListResponseRewriteModelOpenAIGpt5Nano InstanceListResponseRewriteModel = "openai/gpt-5-nano"
const InstanceListResponseRewriteModelEmpty InstanceListResponseRewriteModel = ""
RewriteQuery boolOptional
ScoreThreshold float64Optional
maximum1
minimum0
Source stringOptional
SourceParams InstanceListResponseSourceParamsOptional
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 InstanceListResponseSourceParamsWebCrawlerOptional
ParseOptions InstanceListResponseSourceParamsWebCrawlerParseOptionsOptional
ContentSelector []InstanceListResponseSourceParamsWebCrawlerParseOptionsContentSelectorOptional

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.

Path string

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

maxLength200
minLength1
Selector string

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.

maxLength200
minLength1
IncludeHeaders map[string, string]Optional

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).

IncludeImages boolOptional
SpecificSitemaps []stringOptional

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

UseBrowserRendering boolOptional
ParseType InstanceListResponseSourceParamsWebCrawlerParseTypeOptional
One of the following:
const InstanceListResponseSourceParamsWebCrawlerParseTypeSitemap InstanceListResponseSourceParamsWebCrawlerParseType = "sitemap"
const InstanceListResponseSourceParamsWebCrawlerParseTypeCrawl InstanceListResponseSourceParamsWebCrawlerParseType = "crawl"
Status stringOptional
SyncInterval InstanceListResponseSyncIntervalOptional

Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h).

One of the following:
const InstanceListResponseSyncInterval900 InstanceListResponseSyncInterval = 900
const InstanceListResponseSyncInterval1800 InstanceListResponseSyncInterval = 1800
const InstanceListResponseSyncInterval3600 InstanceListResponseSyncInterval = 3600
const InstanceListResponseSyncInterval7200 InstanceListResponseSyncInterval = 7200
const InstanceListResponseSyncInterval14400 InstanceListResponseSyncInterval = 14400
const InstanceListResponseSyncInterval21600 InstanceListResponseSyncInterval = 21600
const InstanceListResponseSyncInterval43200 InstanceListResponseSyncInterval = 43200
const InstanceListResponseSyncInterval86400 InstanceListResponseSyncInterval = 86400
TokenID stringOptional
formatuuid
Type InstanceListResponseTypeOptional
One of the following:
const InstanceListResponseTypeR2 InstanceListResponseType = "r2"
const InstanceListResponseTypeWebCrawler InstanceListResponseType = "web-crawler"

List AI Search 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"),
  )
  page, err := client.AISearch.Instances.List(context.TODO(), ai_search.InstanceListParams{
    AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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",
      "cache_ttl": 600,
      "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,
      "index_method": {
        "keyword": true,
        "vector": 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": "namespace",
      "paused": true,
      "public_endpoint_id": "public_endpoint_id",
      "public_endpoint_params": {
        "authorized_hosts": [
          "string"
        ],
        "chat_completions_endpoint": {
          "disabled": true
        },
        "custom_domains": [
          "search.example.com"
        ],
        "default_domain_enabled": 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": {
          "parse_options": {
            "content_selector": [
              {
                "path": "**/blog/**",
                "selector": "article div.post-body"
              },
              {
                "path": "**/docs/**",
                "selector": "main"
              }
            ],
            "include_headers": {
              "cache-control": "no-cache, no-store"
            },
            "include_images": true,
            "specific_sitemaps": [
              "https://example.com/sitemap.xml",
              "https://example.com/blog-sitemap.xml"
            ],
            "use_browser_rendering": true
          },
          "parse_type": "sitemap"
        }
      },
      "status": "status",
      "sync_interval": 900,
      "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "type": "r2"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "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",
      "cache_ttl": 600,
      "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,
      "index_method": {
        "keyword": true,
        "vector": 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": "namespace",
      "paused": true,
      "public_endpoint_id": "public_endpoint_id",
      "public_endpoint_params": {
        "authorized_hosts": [
          "string"
        ],
        "chat_completions_endpoint": {
          "disabled": true
        },
        "custom_domains": [
          "search.example.com"
        ],
        "default_domain_enabled": 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": {
          "parse_options": {
            "content_selector": [
              {
                "path": "**/blog/**",
                "selector": "article div.post-body"
              },
              {
                "path": "**/docs/**",
                "selector": "main"
              }
            ],
            "include_headers": {
              "cache-control": "no-cache, no-store"
            },
            "include_images": true,
            "specific_sitemaps": [
              "https://example.com/sitemap.xml",
              "https://example.com/blog-sitemap.xml"
            ],
            "use_browser_rendering": true
          },
          "parse_type": "sitemap"
        }
      },
      "status": "status",
      "sync_interval": 900,
      "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "type": "r2"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}