Skip to content
Start here

Delete an AI Search instance.

client.AISearch.Instances.Delete(ctx, id, body) (*InstanceDeleteResponse, error)
DELETE/accounts/{account_id}/ai-search/instances/{id}

Permanently delete an AI Search instance and all its indexed data.

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
body InstanceDeleteParams
AccountID param.Field[string]
ReturnsExpand Collapse
type InstanceDeleteResponse 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 InstanceDeleteResponseAISearchModelOptional
One of the following:
const InstanceDeleteResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceDeleteResponseAISearchModelCfZaiOrgGlm4_7Flash InstanceDeleteResponseAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceDeleteResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceDeleteResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceDeleteResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceDeleteResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceDeleteResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceDeleteResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceDeleteResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceDeleteResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceDeleteResponseAISearchModelCfGoogleGemma3_12bIt InstanceDeleteResponseAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceDeleteResponseAISearchModelCfGoogleGemma4_26bA4bIt InstanceDeleteResponseAISearchModel = "@cf/google/gemma-4-26b-a4b-it"
const InstanceDeleteResponseAISearchModelCfMoonshotaiKimiK2_5 InstanceDeleteResponseAISearchModel = "@cf/moonshotai/kimi-k2.5"
const InstanceDeleteResponseAISearchModelAnthropicClaude3_7Sonnet InstanceDeleteResponseAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceDeleteResponseAISearchModelAnthropicClaudeSonnet4 InstanceDeleteResponseAISearchModel = "anthropic/claude-sonnet-4"
const InstanceDeleteResponseAISearchModelAnthropicClaudeOpus4 InstanceDeleteResponseAISearchModel = "anthropic/claude-opus-4"
const InstanceDeleteResponseAISearchModelAnthropicClaude3_5Haiku InstanceDeleteResponseAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceDeleteResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceDeleteResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceDeleteResponseAISearchModelCerebrasLlama3_3_70b InstanceDeleteResponseAISearchModel = "cerebras/llama-3.3-70b"
const InstanceDeleteResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceDeleteResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceDeleteResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceDeleteResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceDeleteResponseAISearchModelCerebrasGptOSs120b InstanceDeleteResponseAISearchModel = "cerebras/gpt-oss-120b"
const InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceDeleteResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceDeleteResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceDeleteResponseAISearchModelGrokGrok4 InstanceDeleteResponseAISearchModel = "grok/grok-4"
const InstanceDeleteResponseAISearchModelGroqLlama3_3_70bVersatile InstanceDeleteResponseAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceDeleteResponseAISearchModelGroqLlama3_1_8bInstant InstanceDeleteResponseAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceDeleteResponseAISearchModelOpenAIGpt5 InstanceDeleteResponseAISearchModel = "openai/gpt-5"
const InstanceDeleteResponseAISearchModelOpenAIGpt5Mini InstanceDeleteResponseAISearchModel = "openai/gpt-5-mini"
const InstanceDeleteResponseAISearchModelOpenAIGpt5Nano InstanceDeleteResponseAISearchModel = "openai/gpt-5-nano"
const InstanceDeleteResponseAISearchModelEmpty InstanceDeleteResponseAISearchModel = ""
Cache boolOptional
CacheThreshold InstanceDeleteResponseCacheThresholdOptional
One of the following:
const InstanceDeleteResponseCacheThresholdSuperStrictMatch InstanceDeleteResponseCacheThreshold = "super_strict_match"
const InstanceDeleteResponseCacheThresholdCloseEnough InstanceDeleteResponseCacheThreshold = "close_enough"
const InstanceDeleteResponseCacheThresholdFlexibleFriend InstanceDeleteResponseCacheThreshold = "flexible_friend"
const InstanceDeleteResponseCacheThresholdAnythingGoes InstanceDeleteResponseCacheThreshold = "anything_goes"
CacheTTL InstanceDeleteResponseCacheTTLOptional

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 InstanceDeleteResponseCacheTTL600 InstanceDeleteResponseCacheTTL = 600
const InstanceDeleteResponseCacheTTL1800 InstanceDeleteResponseCacheTTL = 1800
const InstanceDeleteResponseCacheTTL3600 InstanceDeleteResponseCacheTTL = 3600
const InstanceDeleteResponseCacheTTL7200 InstanceDeleteResponseCacheTTL = 7200
const InstanceDeleteResponseCacheTTL21600 InstanceDeleteResponseCacheTTL = 21600
const InstanceDeleteResponseCacheTTL43200 InstanceDeleteResponseCacheTTL = 43200
const InstanceDeleteResponseCacheTTL86400 InstanceDeleteResponseCacheTTL = 86400
const InstanceDeleteResponseCacheTTL172800 InstanceDeleteResponseCacheTTL = 172800
const InstanceDeleteResponseCacheTTL259200 InstanceDeleteResponseCacheTTL = 259200
const InstanceDeleteResponseCacheTTL518400 InstanceDeleteResponseCacheTTL = 518400
ChunkOverlap int64Optional
maximum30
minimum0
ChunkSize int64Optional
minimum64
CreatedBy stringOptional
CustomMetadata []InstanceDeleteResponseCustomMetadataOptional
DataType InstanceDeleteResponseCustomMetadataDataType
One of the following:
const InstanceDeleteResponseCustomMetadataDataTypeText InstanceDeleteResponseCustomMetadataDataType = "text"
const InstanceDeleteResponseCustomMetadataDataTypeNumber InstanceDeleteResponseCustomMetadataDataType = "number"
const InstanceDeleteResponseCustomMetadataDataTypeBoolean InstanceDeleteResponseCustomMetadataDataType = "boolean"
const InstanceDeleteResponseCustomMetadataDataTypeDatetime InstanceDeleteResponseCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel InstanceDeleteResponseEmbeddingModelOptional
One of the following:
const InstanceDeleteResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceDeleteResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceDeleteResponseEmbeddingModelCfQwenQwen3VlEmbedding2b InstanceDeleteResponseEmbeddingModel = "@cf/qwen/qwen3-vl-embedding-2b"
const InstanceDeleteResponseEmbeddingModelCfBaaiBgeM3 InstanceDeleteResponseEmbeddingModel = "@cf/baai/bge-m3"
const InstanceDeleteResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceDeleteResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceDeleteResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceDeleteResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceDeleteResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceDeleteResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceDeleteResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceDeleteResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceDeleteResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2 InstanceDeleteResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2"
const InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Small InstanceDeleteResponseEmbeddingModel = "openai/text-embedding-3-small"
const InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Large InstanceDeleteResponseEmbeddingModel = "openai/text-embedding-3-large"
const InstanceDeleteResponseEmbeddingModelEmpty InstanceDeleteResponseEmbeddingModel = ""
Enable boolOptional
EngineVersion float64Optional
FusionMethod InstanceDeleteResponseFusionMethodOptional
One of the following:
const InstanceDeleteResponseFusionMethodMax InstanceDeleteResponseFusionMethod = "max"
const InstanceDeleteResponseFusionMethodRrf InstanceDeleteResponseFusionMethod = "rrf"
DeprecatedHybridSearchEnabled boolOptional

Deprecated — use index_method instead.

IndexMethod InstanceDeleteResponseIndexMethodOptional

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 InstanceDeleteResponseIndexingOptionsOptional
KeywordTokenizer InstanceDeleteResponseIndexingOptionsKeywordTokenizerOptional

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 InstanceDeleteResponseIndexingOptionsKeywordTokenizerPorter InstanceDeleteResponseIndexingOptionsKeywordTokenizer = "porter"
const InstanceDeleteResponseIndexingOptionsKeywordTokenizerTrigram InstanceDeleteResponseIndexingOptionsKeywordTokenizer = "trigram"
LastActivity TimeOptional
formatdate-time
MaxNumResults int64Optional
maximum50
minimum1
Metadata InstanceDeleteResponseMetadataOptional
CreatedFromAISearchWizard boolOptional
WorkerDomain stringOptional
ModifiedBy stringOptional
Namespace stringOptional
Paused boolOptional
PublicEndpointID stringOptional
PublicEndpointParams InstanceDeleteResponsePublicEndpointParamsOptional
AuthorizedHosts []stringOptional
ChatCompletionsEndpoint InstanceDeleteResponsePublicEndpointParamsChatCompletionsEndpointOptional
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 InstanceDeleteResponsePublicEndpointParamsMcpOptional
Description stringOptional
Disabled boolOptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceDeleteResponsePublicEndpointParamsRateLimitOptional
PeriodMs int64Optional
maximum3600000
minimum60000
Requests int64Optional
minimum1
Technique InstanceDeleteResponsePublicEndpointParamsRateLimitTechniqueOptional
One of the following:
const InstanceDeleteResponsePublicEndpointParamsRateLimitTechniqueFixed InstanceDeleteResponsePublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceDeleteResponsePublicEndpointParamsRateLimitTechniqueSliding InstanceDeleteResponsePublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceDeleteResponsePublicEndpointParamsSearchEndpointOptional
Disabled boolOptional

Disable search endpoint for this public endpoint

Reranking boolOptional
RerankingModel InstanceDeleteResponseRerankingModelOptional
One of the following:
const InstanceDeleteResponseRerankingModelCfBaaiBgeRerankerBase InstanceDeleteResponseRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceDeleteResponseRerankingModelEmpty InstanceDeleteResponseRerankingModel = ""
RetrievalOptions InstanceDeleteResponseRetrievalOptionsOptional
BoostBy []InstanceDeleteResponseRetrievalOptionsBoostByOptional

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 InstanceDeleteResponseRetrievalOptionsBoostByDirectionOptional

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 InstanceDeleteResponseRetrievalOptionsBoostByDirectionAsc InstanceDeleteResponseRetrievalOptionsBoostByDirection = "asc"
const InstanceDeleteResponseRetrievalOptionsBoostByDirectionDesc InstanceDeleteResponseRetrievalOptionsBoostByDirection = "desc"
const InstanceDeleteResponseRetrievalOptionsBoostByDirectionExists InstanceDeleteResponseRetrievalOptionsBoostByDirection = "exists"
const InstanceDeleteResponseRetrievalOptionsBoostByDirectionNotExists InstanceDeleteResponseRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceDeleteResponseRetrievalOptionsKeywordMatchModeOptional

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 InstanceDeleteResponseRetrievalOptionsKeywordMatchModeAnd InstanceDeleteResponseRetrievalOptionsKeywordMatchMode = "and"
const InstanceDeleteResponseRetrievalOptionsKeywordMatchModeOr InstanceDeleteResponseRetrievalOptionsKeywordMatchMode = "or"
RewriteModel InstanceDeleteResponseRewriteModelOptional
One of the following:
const InstanceDeleteResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceDeleteResponseRewriteModelCfZaiOrgGlm4_7Flash InstanceDeleteResponseRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceDeleteResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceDeleteResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceDeleteResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceDeleteResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceDeleteResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceDeleteResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceDeleteResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceDeleteResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceDeleteResponseRewriteModelCfGoogleGemma3_12bIt InstanceDeleteResponseRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceDeleteResponseRewriteModelCfGoogleGemma4_26bA4bIt InstanceDeleteResponseRewriteModel = "@cf/google/gemma-4-26b-a4b-it"
const InstanceDeleteResponseRewriteModelCfMoonshotaiKimiK2_5 InstanceDeleteResponseRewriteModel = "@cf/moonshotai/kimi-k2.5"
const InstanceDeleteResponseRewriteModelAnthropicClaude3_7Sonnet InstanceDeleteResponseRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceDeleteResponseRewriteModelAnthropicClaudeSonnet4 InstanceDeleteResponseRewriteModel = "anthropic/claude-sonnet-4"
const InstanceDeleteResponseRewriteModelAnthropicClaudeOpus4 InstanceDeleteResponseRewriteModel = "anthropic/claude-opus-4"
const InstanceDeleteResponseRewriteModelAnthropicClaude3_5Haiku InstanceDeleteResponseRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceDeleteResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceDeleteResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceDeleteResponseRewriteModelCerebrasLlama3_3_70b InstanceDeleteResponseRewriteModel = "cerebras/llama-3.3-70b"
const InstanceDeleteResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceDeleteResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceDeleteResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceDeleteResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceDeleteResponseRewriteModelCerebrasGptOSs120b InstanceDeleteResponseRewriteModel = "cerebras/gpt-oss-120b"
const InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceDeleteResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceDeleteResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceDeleteResponseRewriteModelGrokGrok4 InstanceDeleteResponseRewriteModel = "grok/grok-4"
const InstanceDeleteResponseRewriteModelGroqLlama3_3_70bVersatile InstanceDeleteResponseRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceDeleteResponseRewriteModelGroqLlama3_1_8bInstant InstanceDeleteResponseRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceDeleteResponseRewriteModelOpenAIGpt5 InstanceDeleteResponseRewriteModel = "openai/gpt-5"
const InstanceDeleteResponseRewriteModelOpenAIGpt5Mini InstanceDeleteResponseRewriteModel = "openai/gpt-5-mini"
const InstanceDeleteResponseRewriteModelOpenAIGpt5Nano InstanceDeleteResponseRewriteModel = "openai/gpt-5-nano"
const InstanceDeleteResponseRewriteModelEmpty InstanceDeleteResponseRewriteModel = ""
RewriteQuery boolOptional
ScoreThreshold float64Optional
maximum1
minimum0
Source stringOptional
SourceParams InstanceDeleteResponseSourceParamsOptional
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 InstanceDeleteResponseSourceParamsWebCrawlerOptional
ParseOptions InstanceDeleteResponseSourceParamsWebCrawlerParseOptionsOptional
ContentSelector []InstanceDeleteResponseSourceParamsWebCrawlerParseOptionsContentSelectorOptional

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 InstanceDeleteResponseSourceParamsWebCrawlerParseTypeOptional
One of the following:
const InstanceDeleteResponseSourceParamsWebCrawlerParseTypeSitemap InstanceDeleteResponseSourceParamsWebCrawlerParseType = "sitemap"
const InstanceDeleteResponseSourceParamsWebCrawlerParseTypeCrawl InstanceDeleteResponseSourceParamsWebCrawlerParseType = "crawl"
Status stringOptional
SyncInterval InstanceDeleteResponseSyncIntervalOptional

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 InstanceDeleteResponseSyncInterval900 InstanceDeleteResponseSyncInterval = 900
const InstanceDeleteResponseSyncInterval1800 InstanceDeleteResponseSyncInterval = 1800
const InstanceDeleteResponseSyncInterval3600 InstanceDeleteResponseSyncInterval = 3600
const InstanceDeleteResponseSyncInterval7200 InstanceDeleteResponseSyncInterval = 7200
const InstanceDeleteResponseSyncInterval14400 InstanceDeleteResponseSyncInterval = 14400
const InstanceDeleteResponseSyncInterval21600 InstanceDeleteResponseSyncInterval = 21600
const InstanceDeleteResponseSyncInterval43200 InstanceDeleteResponseSyncInterval = 43200
const InstanceDeleteResponseSyncInterval86400 InstanceDeleteResponseSyncInterval = 86400
TokenID stringOptional
formatuuid
Type InstanceDeleteResponseTypeOptional
One of the following:
const InstanceDeleteResponseTypeR2 InstanceDeleteResponseType = "r2"
const InstanceDeleteResponseTypeWebCrawler InstanceDeleteResponseType = "web-crawler"

Delete an AI Search instance.

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.Delete(
    context.TODO(),
    "my-ai-search",
    ai_search.InstanceDeleteParams{
      AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
    },
  )
  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",
    "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"
  },
  "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"
  },
  "success": true
}