Skip to content
Start here

Create new instances.

client.AISearch.Instances.New(ctx, params) (*InstanceNewResponse, error)
POST/accounts/{account_id}/ai-search/instances

Create a new 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
params InstanceNewParams
AccountID param.Field[string]

Path param

ID param.Field[string]

Body param: AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
AIGatewayID param.Field[string]optional

Body param

AISearchModel param.Field[InstanceNewParamsAISearchModel]optional

Body param

const InstanceNewParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewParamsAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceNewParamsAISearchModelCfZaiOrgGlm4_7Flash InstanceNewParamsAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFast InstanceNewParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceNewParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceNewParamsAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceNewParamsAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceNewParamsAISearchModelCfQwenQwen3_30bA3bFp8 InstanceNewParamsAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceNewParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewParamsAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceNewParamsAISearchModelCfMoonshotaiKimiK2Instruct InstanceNewParamsAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceNewParamsAISearchModelCfGoogleGemma3_12bIt InstanceNewParamsAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceNewParamsAISearchModelAnthropicClaude3_7Sonnet InstanceNewParamsAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceNewParamsAISearchModelAnthropicClaudeSonnet4 InstanceNewParamsAISearchModel = "anthropic/claude-sonnet-4"
const InstanceNewParamsAISearchModelAnthropicClaudeOpus4 InstanceNewParamsAISearchModel = "anthropic/claude-opus-4"
const InstanceNewParamsAISearchModelAnthropicClaude3_5Haiku InstanceNewParamsAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bInstruct InstanceNewParamsAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bThinking InstanceNewParamsAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceNewParamsAISearchModelCerebrasLlama3_3_70b InstanceNewParamsAISearchModel = "cerebras/llama-3.3-70b"
const InstanceNewParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceNewParamsAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceNewParamsAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceNewParamsAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceNewParamsAISearchModelCerebrasGptOSs120b InstanceNewParamsAISearchModel = "cerebras/gpt-oss-120b"
const InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Flash InstanceNewParamsAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Pro InstanceNewParamsAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceNewParamsAISearchModelGrokGrok4 InstanceNewParamsAISearchModel = "grok/grok-4"
const InstanceNewParamsAISearchModelGroqLlama3_3_70bVersatile InstanceNewParamsAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceNewParamsAISearchModelGroqLlama3_1_8bInstant InstanceNewParamsAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceNewParamsAISearchModelOpenAIGpt5 InstanceNewParamsAISearchModel = "openai/gpt-5"
const InstanceNewParamsAISearchModelOpenAIGpt5Mini InstanceNewParamsAISearchModel = "openai/gpt-5-mini"
const InstanceNewParamsAISearchModelOpenAIGpt5Nano InstanceNewParamsAISearchModel = "openai/gpt-5-nano"
const InstanceNewParamsAISearchModelEmpty InstanceNewParamsAISearchModel = ""
Cache param.Field[bool]optional

Body param

CacheThreshold param.Field[InstanceNewParamsCacheThreshold]optional

Body param

const InstanceNewParamsCacheThresholdSuperStrictMatch InstanceNewParamsCacheThreshold = "super_strict_match"
const InstanceNewParamsCacheThresholdCloseEnough InstanceNewParamsCacheThreshold = "close_enough"
const InstanceNewParamsCacheThresholdFlexibleFriend InstanceNewParamsCacheThreshold = "flexible_friend"
const InstanceNewParamsCacheThresholdAnythingGoes InstanceNewParamsCacheThreshold = "anything_goes"
Chunk param.Field[bool]optional

Body param

ChunkOverlap param.Field[int64]optional

Body param

maximum30
minimum0
ChunkSize param.Field[int64]optional

Body param

minimum64
CustomMetadata param.Field[[]InstanceNewParamsCustomMetadata]optional

Body param

DataType InstanceNewParamsCustomMetadataDataType
One of the following:
const InstanceNewParamsCustomMetadataDataTypeText InstanceNewParamsCustomMetadataDataType = "text"
const InstanceNewParamsCustomMetadataDataTypeNumber InstanceNewParamsCustomMetadataDataType = "number"
const InstanceNewParamsCustomMetadataDataTypeBoolean InstanceNewParamsCustomMetadataDataType = "boolean"
const InstanceNewParamsCustomMetadataDataTypeDatetime InstanceNewParamsCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel param.Field[InstanceNewParamsEmbeddingModel]optional

Body param

const InstanceNewParamsEmbeddingModelCfQwenQwen3Embedding0_6b InstanceNewParamsEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceNewParamsEmbeddingModelCfBaaiBgeM3 InstanceNewParamsEmbeddingModel = "@cf/baai/bge-m3"
const InstanceNewParamsEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceNewParamsEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceNewParamsEmbeddingModelCfGoogleEmbeddinggemma300m InstanceNewParamsEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceNewParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceNewParamsEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceNewParamsEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceNewParamsEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Small InstanceNewParamsEmbeddingModel = "openai/text-embedding-3-small"
const InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Large InstanceNewParamsEmbeddingModel = "openai/text-embedding-3-large"
const InstanceNewParamsEmbeddingModelEmpty InstanceNewParamsEmbeddingModel = ""
FusionMethod param.Field[InstanceNewParamsFusionMethod]optional

Body param

const InstanceNewParamsFusionMethodMax InstanceNewParamsFusionMethod = "max"
const InstanceNewParamsFusionMethodRrf InstanceNewParamsFusionMethod = "rrf"
HybridSearchEnabled param.Field[bool]optional

Body param

IndexingOptions param.Field[InstanceNewParamsIndexingOptions]optional

Body param

KeywordTokenizer InstanceNewParamsIndexingOptionsKeywordTokenizeroptional

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 InstanceNewParamsIndexingOptionsKeywordTokenizerPorter InstanceNewParamsIndexingOptionsKeywordTokenizer = "porter"
const InstanceNewParamsIndexingOptionsKeywordTokenizerTrigram InstanceNewParamsIndexingOptionsKeywordTokenizer = "trigram"
MaxNumResults param.Field[int64]optional

Body param

maximum50
minimum1
Metadata param.Field[InstanceNewParamsMetadata]optional

Body param

CreatedFromAISearchWizard booloptional
WorkerDomain stringoptional
PublicEndpointParams param.Field[InstanceNewParamsPublicEndpointParams]optional

Body param

AuthorizedHosts []stringoptional
ChatCompletionsEndpoint InstanceNewParamsPublicEndpointParamsChatCompletionsEndpointoptional
Disabled booloptional

Disable chat completions endpoint for this public endpoint

Enabled booloptional
Mcp InstanceNewParamsPublicEndpointParamsMcpoptional
Description stringoptional
Disabled booloptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceNewParamsPublicEndpointParamsRateLimitoptional
PeriodMs int64optional
maximum3600000
minimum60000
Requests int64optional
minimum1
Technique InstanceNewParamsPublicEndpointParamsRateLimitTechniqueoptional
One of the following:
const InstanceNewParamsPublicEndpointParamsRateLimitTechniqueFixed InstanceNewParamsPublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceNewParamsPublicEndpointParamsRateLimitTechniqueSliding InstanceNewParamsPublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceNewParamsPublicEndpointParamsSearchEndpointoptional
Disabled booloptional

Disable search endpoint for this public endpoint

Reranking param.Field[bool]optional

Body param

RerankingModel param.Field[InstanceNewParamsRerankingModel]optional

Body param

const InstanceNewParamsRerankingModelCfBaaiBgeRerankerBase InstanceNewParamsRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceNewParamsRerankingModelEmpty InstanceNewParamsRerankingModel = ""
RetrievalOptions param.Field[InstanceNewParamsRetrievalOptions]optional

Body param

BoostBy []InstanceNewParamsRetrievalOptionsBoostByoptional

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 InstanceNewParamsRetrievalOptionsBoostByDirectionoptional

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 InstanceNewParamsRetrievalOptionsBoostByDirectionAsc InstanceNewParamsRetrievalOptionsBoostByDirection = "asc"
const InstanceNewParamsRetrievalOptionsBoostByDirectionDesc InstanceNewParamsRetrievalOptionsBoostByDirection = "desc"
const InstanceNewParamsRetrievalOptionsBoostByDirectionExists InstanceNewParamsRetrievalOptionsBoostByDirection = "exists"
const InstanceNewParamsRetrievalOptionsBoostByDirectionNotExists InstanceNewParamsRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceNewParamsRetrievalOptionsKeywordMatchModeoptional

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 InstanceNewParamsRetrievalOptionsKeywordMatchModeAnd InstanceNewParamsRetrievalOptionsKeywordMatchMode = "and"
const InstanceNewParamsRetrievalOptionsKeywordMatchModeOr InstanceNewParamsRetrievalOptionsKeywordMatchMode = "or"
RewriteModel param.Field[InstanceNewParamsRewriteModel]optional

Body param

const InstanceNewParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewParamsRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceNewParamsRewriteModelCfZaiOrgGlm4_7Flash InstanceNewParamsRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFast InstanceNewParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceNewParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceNewParamsRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceNewParamsRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceNewParamsRewriteModelCfQwenQwen3_30bA3bFp8 InstanceNewParamsRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceNewParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewParamsRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceNewParamsRewriteModelCfMoonshotaiKimiK2Instruct InstanceNewParamsRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceNewParamsRewriteModelCfGoogleGemma3_12bIt InstanceNewParamsRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceNewParamsRewriteModelAnthropicClaude3_7Sonnet InstanceNewParamsRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceNewParamsRewriteModelAnthropicClaudeSonnet4 InstanceNewParamsRewriteModel = "anthropic/claude-sonnet-4"
const InstanceNewParamsRewriteModelAnthropicClaudeOpus4 InstanceNewParamsRewriteModel = "anthropic/claude-opus-4"
const InstanceNewParamsRewriteModelAnthropicClaude3_5Haiku InstanceNewParamsRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bInstruct InstanceNewParamsRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bThinking InstanceNewParamsRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceNewParamsRewriteModelCerebrasLlama3_3_70b InstanceNewParamsRewriteModel = "cerebras/llama-3.3-70b"
const InstanceNewParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceNewParamsRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceNewParamsRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceNewParamsRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceNewParamsRewriteModelCerebrasGptOSs120b InstanceNewParamsRewriteModel = "cerebras/gpt-oss-120b"
const InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Flash InstanceNewParamsRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Pro InstanceNewParamsRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceNewParamsRewriteModelGrokGrok4 InstanceNewParamsRewriteModel = "grok/grok-4"
const InstanceNewParamsRewriteModelGroqLlama3_3_70bVersatile InstanceNewParamsRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceNewParamsRewriteModelGroqLlama3_1_8bInstant InstanceNewParamsRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceNewParamsRewriteModelOpenAIGpt5 InstanceNewParamsRewriteModel = "openai/gpt-5"
const InstanceNewParamsRewriteModelOpenAIGpt5Mini InstanceNewParamsRewriteModel = "openai/gpt-5-mini"
const InstanceNewParamsRewriteModelOpenAIGpt5Nano InstanceNewParamsRewriteModel = "openai/gpt-5-nano"
const InstanceNewParamsRewriteModelEmpty InstanceNewParamsRewriteModel = ""
RewriteQuery param.Field[bool]optional

Body param

ScoreThreshold param.Field[float64]optional

Body param

maximum1
minimum0
Source param.Field[string]optional

Body param

SourceParams param.Field[InstanceNewParamsSourceParams]optional

Body param

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 InstanceNewParamsSourceParamsWebCrawleroptional
CrawlOptions InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsoptional
Depth float64optional
maximum100000
minimum1
IncludeSubdomains booloptional
MaxAge float64optional
maximum604800
minimum0
Source InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSourceoptional
One of the following:
const InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSourceAll InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSource = "all"
const InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSourceSitemaps InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSource = "sitemaps"
const InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSourceLinks InstanceNewParamsSourceParamsWebCrawlerCrawlOptionsSource = "links"
ParseOptions InstanceNewParamsSourceParamsWebCrawlerParseOptionsoptional
ContentSelector []InstanceNewParamsSourceParamsWebCrawlerParseOptionsContentSelectoroptional

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 InstanceNewParamsSourceParamsWebCrawlerParseTypeoptional
One of the following:
const InstanceNewParamsSourceParamsWebCrawlerParseTypeSitemap InstanceNewParamsSourceParamsWebCrawlerParseType = "sitemap"
const InstanceNewParamsSourceParamsWebCrawlerParseTypeFeedRss InstanceNewParamsSourceParamsWebCrawlerParseType = "feed-rss"
const InstanceNewParamsSourceParamsWebCrawlerParseTypeCrawl InstanceNewParamsSourceParamsWebCrawlerParseType = "crawl"
StoreOptions InstanceNewParamsSourceParamsWebCrawlerStoreOptionsoptional
StorageID string
R2Jurisdiction stringoptional
StorageType Provideroptional
TokenID param.Field[string]optional

Body param

formatuuid
Type param.Field[InstanceNewParamsType]optional

Body param

const InstanceNewParamsTypeR2 InstanceNewParamsType = "r2"
const InstanceNewParamsTypeWebCrawler InstanceNewParamsType = "web-crawler"
ReturnsExpand Collapse
type InstanceNewResponse 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 InstanceNewResponseAISearchModeloptional
One of the following:
const InstanceNewResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceNewResponseAISearchModelCfZaiOrgGlm4_7Flash InstanceNewResponseAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceNewResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceNewResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceNewResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceNewResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceNewResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceNewResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceNewResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceNewResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceNewResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceNewResponseAISearchModelCfGoogleGemma3_12bIt InstanceNewResponseAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceNewResponseAISearchModelAnthropicClaude3_7Sonnet InstanceNewResponseAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceNewResponseAISearchModelAnthropicClaudeSonnet4 InstanceNewResponseAISearchModel = "anthropic/claude-sonnet-4"
const InstanceNewResponseAISearchModelAnthropicClaudeOpus4 InstanceNewResponseAISearchModel = "anthropic/claude-opus-4"
const InstanceNewResponseAISearchModelAnthropicClaude3_5Haiku InstanceNewResponseAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceNewResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceNewResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceNewResponseAISearchModelCerebrasLlama3_3_70b InstanceNewResponseAISearchModel = "cerebras/llama-3.3-70b"
const InstanceNewResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceNewResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceNewResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceNewResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceNewResponseAISearchModelCerebrasGptOSs120b InstanceNewResponseAISearchModel = "cerebras/gpt-oss-120b"
const InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceNewResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceNewResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceNewResponseAISearchModelGrokGrok4 InstanceNewResponseAISearchModel = "grok/grok-4"
const InstanceNewResponseAISearchModelGroqLlama3_3_70bVersatile InstanceNewResponseAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceNewResponseAISearchModelGroqLlama3_1_8bInstant InstanceNewResponseAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceNewResponseAISearchModelOpenAIGpt5 InstanceNewResponseAISearchModel = "openai/gpt-5"
const InstanceNewResponseAISearchModelOpenAIGpt5Mini InstanceNewResponseAISearchModel = "openai/gpt-5-mini"
const InstanceNewResponseAISearchModelOpenAIGpt5Nano InstanceNewResponseAISearchModel = "openai/gpt-5-nano"
const InstanceNewResponseAISearchModelEmpty InstanceNewResponseAISearchModel = ""
Cache booloptional
CacheThreshold InstanceNewResponseCacheThresholdoptional
One of the following:
const InstanceNewResponseCacheThresholdSuperStrictMatch InstanceNewResponseCacheThreshold = "super_strict_match"
const InstanceNewResponseCacheThresholdCloseEnough InstanceNewResponseCacheThreshold = "close_enough"
const InstanceNewResponseCacheThresholdFlexibleFriend InstanceNewResponseCacheThreshold = "flexible_friend"
const InstanceNewResponseCacheThresholdAnythingGoes InstanceNewResponseCacheThreshold = "anything_goes"
ChunkOverlap int64optional
maximum30
minimum0
ChunkSize int64optional
minimum64
CreatedBy stringoptional
CustomMetadata []InstanceNewResponseCustomMetadataoptional
DataType InstanceNewResponseCustomMetadataDataType
One of the following:
const InstanceNewResponseCustomMetadataDataTypeText InstanceNewResponseCustomMetadataDataType = "text"
const InstanceNewResponseCustomMetadataDataTypeNumber InstanceNewResponseCustomMetadataDataType = "number"
const InstanceNewResponseCustomMetadataDataTypeBoolean InstanceNewResponseCustomMetadataDataType = "boolean"
const InstanceNewResponseCustomMetadataDataTypeDatetime InstanceNewResponseCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel InstanceNewResponseEmbeddingModeloptional
One of the following:
const InstanceNewResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceNewResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceNewResponseEmbeddingModelCfBaaiBgeM3 InstanceNewResponseEmbeddingModel = "@cf/baai/bge-m3"
const InstanceNewResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceNewResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceNewResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceNewResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceNewResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceNewResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceNewResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceNewResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Small InstanceNewResponseEmbeddingModel = "openai/text-embedding-3-small"
const InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Large InstanceNewResponseEmbeddingModel = "openai/text-embedding-3-large"
const InstanceNewResponseEmbeddingModelEmpty InstanceNewResponseEmbeddingModel = ""
Enable booloptional
EngineVersion float64optional
FusionMethod InstanceNewResponseFusionMethodoptional
One of the following:
const InstanceNewResponseFusionMethodMax InstanceNewResponseFusionMethod = "max"
const InstanceNewResponseFusionMethodRrf InstanceNewResponseFusionMethod = "rrf"
HybridSearchEnabled booloptional
IndexingOptions InstanceNewResponseIndexingOptionsoptional
KeywordTokenizer InstanceNewResponseIndexingOptionsKeywordTokenizeroptional

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 InstanceNewResponseIndexingOptionsKeywordTokenizerPorter InstanceNewResponseIndexingOptionsKeywordTokenizer = "porter"
const InstanceNewResponseIndexingOptionsKeywordTokenizerTrigram InstanceNewResponseIndexingOptionsKeywordTokenizer = "trigram"
LastActivity Timeoptional
formatdate-time
MaxNumResults int64optional
maximum50
minimum1
Metadata InstanceNewResponseMetadataoptional
CreatedFromAISearchWizard booloptional
WorkerDomain stringoptional
ModifiedBy stringoptional
Namespace stringoptional
maxLength32
minLength1
Paused booloptional
PublicEndpointID stringoptional
PublicEndpointParams InstanceNewResponsePublicEndpointParamsoptional
AuthorizedHosts []stringoptional
ChatCompletionsEndpoint InstanceNewResponsePublicEndpointParamsChatCompletionsEndpointoptional
Disabled booloptional

Disable chat completions endpoint for this public endpoint

Enabled booloptional
Mcp InstanceNewResponsePublicEndpointParamsMcpoptional
Description stringoptional
Disabled booloptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceNewResponsePublicEndpointParamsRateLimitoptional
PeriodMs int64optional
maximum3600000
minimum60000
Requests int64optional
minimum1
Technique InstanceNewResponsePublicEndpointParamsRateLimitTechniqueoptional
One of the following:
const InstanceNewResponsePublicEndpointParamsRateLimitTechniqueFixed InstanceNewResponsePublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceNewResponsePublicEndpointParamsRateLimitTechniqueSliding InstanceNewResponsePublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceNewResponsePublicEndpointParamsSearchEndpointoptional
Disabled booloptional

Disable search endpoint for this public endpoint

Reranking booloptional
RerankingModel InstanceNewResponseRerankingModeloptional
One of the following:
const InstanceNewResponseRerankingModelCfBaaiBgeRerankerBase InstanceNewResponseRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceNewResponseRerankingModelEmpty InstanceNewResponseRerankingModel = ""
RetrievalOptions InstanceNewResponseRetrievalOptionsoptional
BoostBy []InstanceNewResponseRetrievalOptionsBoostByoptional

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 InstanceNewResponseRetrievalOptionsBoostByDirectionoptional

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 InstanceNewResponseRetrievalOptionsBoostByDirectionAsc InstanceNewResponseRetrievalOptionsBoostByDirection = "asc"
const InstanceNewResponseRetrievalOptionsBoostByDirectionDesc InstanceNewResponseRetrievalOptionsBoostByDirection = "desc"
const InstanceNewResponseRetrievalOptionsBoostByDirectionExists InstanceNewResponseRetrievalOptionsBoostByDirection = "exists"
const InstanceNewResponseRetrievalOptionsBoostByDirectionNotExists InstanceNewResponseRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceNewResponseRetrievalOptionsKeywordMatchModeoptional

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 InstanceNewResponseRetrievalOptionsKeywordMatchModeAnd InstanceNewResponseRetrievalOptionsKeywordMatchMode = "and"
const InstanceNewResponseRetrievalOptionsKeywordMatchModeOr InstanceNewResponseRetrievalOptionsKeywordMatchMode = "or"
RewriteModel InstanceNewResponseRewriteModeloptional
One of the following:
const InstanceNewResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceNewResponseRewriteModelCfZaiOrgGlm4_7Flash InstanceNewResponseRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceNewResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceNewResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceNewResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceNewResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceNewResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceNewResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceNewResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceNewResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceNewResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceNewResponseRewriteModelCfGoogleGemma3_12bIt InstanceNewResponseRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceNewResponseRewriteModelAnthropicClaude3_7Sonnet InstanceNewResponseRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceNewResponseRewriteModelAnthropicClaudeSonnet4 InstanceNewResponseRewriteModel = "anthropic/claude-sonnet-4"
const InstanceNewResponseRewriteModelAnthropicClaudeOpus4 InstanceNewResponseRewriteModel = "anthropic/claude-opus-4"
const InstanceNewResponseRewriteModelAnthropicClaude3_5Haiku InstanceNewResponseRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceNewResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceNewResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceNewResponseRewriteModelCerebrasLlama3_3_70b InstanceNewResponseRewriteModel = "cerebras/llama-3.3-70b"
const InstanceNewResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceNewResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceNewResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceNewResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceNewResponseRewriteModelCerebrasGptOSs120b InstanceNewResponseRewriteModel = "cerebras/gpt-oss-120b"
const InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceNewResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceNewResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceNewResponseRewriteModelGrokGrok4 InstanceNewResponseRewriteModel = "grok/grok-4"
const InstanceNewResponseRewriteModelGroqLlama3_3_70bVersatile InstanceNewResponseRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceNewResponseRewriteModelGroqLlama3_1_8bInstant InstanceNewResponseRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceNewResponseRewriteModelOpenAIGpt5 InstanceNewResponseRewriteModel = "openai/gpt-5"
const InstanceNewResponseRewriteModelOpenAIGpt5Mini InstanceNewResponseRewriteModel = "openai/gpt-5-mini"
const InstanceNewResponseRewriteModelOpenAIGpt5Nano InstanceNewResponseRewriteModel = "openai/gpt-5-nano"
const InstanceNewResponseRewriteModelEmpty InstanceNewResponseRewriteModel = ""
RewriteQuery booloptional
ScoreThreshold float64optional
maximum1
minimum0
Source stringoptional
SourceParams InstanceNewResponseSourceParamsoptional
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 InstanceNewResponseSourceParamsWebCrawleroptional
CrawlOptions InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsoptional
Depth float64optional
maximum100000
minimum1
IncludeSubdomains booloptional
MaxAge float64optional
maximum604800
minimum0
Source InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSourceoptional
One of the following:
const InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSourceAll InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSource = "all"
const InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSourceSitemaps InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSource = "sitemaps"
const InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSourceLinks InstanceNewResponseSourceParamsWebCrawlerCrawlOptionsSource = "links"
ParseOptions InstanceNewResponseSourceParamsWebCrawlerParseOptionsoptional
ContentSelector []InstanceNewResponseSourceParamsWebCrawlerParseOptionsContentSelectoroptional

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 InstanceNewResponseSourceParamsWebCrawlerParseTypeoptional
One of the following:
const InstanceNewResponseSourceParamsWebCrawlerParseTypeSitemap InstanceNewResponseSourceParamsWebCrawlerParseType = "sitemap"
const InstanceNewResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceNewResponseSourceParamsWebCrawlerParseType = "feed-rss"
const InstanceNewResponseSourceParamsWebCrawlerParseTypeCrawl InstanceNewResponseSourceParamsWebCrawlerParseType = "crawl"
StoreOptions InstanceNewResponseSourceParamsWebCrawlerStoreOptionsoptional
StorageID string
R2Jurisdiction stringoptional
StorageType Provideroptional
Status stringoptional
TokenID stringoptional
formatuuid
Type InstanceNewResponseTypeoptional
One of the following:
const InstanceNewResponseTypeR2 InstanceNewResponseType = "r2"
const InstanceNewResponseTypeWebCrawler InstanceNewResponseType = "web-crawler"

Create new 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"),
  )
  instance, err := client.AISearch.Instances.New(context.TODO(), ai_search.InstanceNewParams{
    AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
    ID: cloudflare.F("my-ai-search"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", instance.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
}