---
title: Create AI Search instances programmatically via REST API
description: Create AI Search instances programmatically using the REST API.
image: https://edgetunnel-b2h.pages.dev/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://edgetunnel-b2h.pages.dev/changelog/rss/index.xml) [ View RSS feeds ](https://edgetunnel-b2h.pages.dev/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://edgetunnel-b2h.pages.dev/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://edgetunnel-b2h.pages.dev/changelog/) 

## Create AI Search instances programmatically via REST API

Jan 20, 2026 

[ AI Search ](https://edgetunnel-b2h.pages.dev/ai-search/) 

You can now create [AI Search](https://edgetunnel-b2h.pages.dev/ai-search/) instances programmatically using the [API](https://edgetunnel-b2h.pages.dev/ai-search/get-started/api/). For example, use the API to create instances for each customer in a multi-tenant application or manage AI Search alongside your other infrastructure.

If you have created an AI Search instance via the [dashboard](https://edgetunnel-b2h.pages.dev/ai-search/get-started/dashboard/) before, you already have a [service API token](https://edgetunnel-b2h.pages.dev/ai-search/configuration/indexing/service-api-token/) registered and can start creating instances programmatically right away. If not, follow the [API guide](https://edgetunnel-b2h.pages.dev/ai-search/get-started/api/) to set up your first instance.

For example, you can now create separate search instances for each language on your website:

```bash
for lang in en fr es de; do
  curl -X POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/ai-search/instances" \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    --data '{
      "id": "docs-'"$lang"'",
      "type": "web-crawler",
      "source": "example.com",
      "source_params": {
        "path_include": ["**/'"$lang"'/**"]
      }
    }'
done
```

Refer to the [REST API reference](https://edgetunnel-b2h.pages.dev/api/resources/ai%5Fsearch/subresources/instances/methods/create/) for additional configuration options.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://edgetunnel-b2h.pages.dev/changelog/post/2026-01-20-ai-search-simplified-api/#page","headline":"Create AI Search instances programmatically via REST API · Changelog","description":"Create AI Search instances programmatically using the REST API.","url":"https://edgetunnel-b2h.pages.dev/changelog/post/2026-01-20-ai-search-simplified-api/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/changelog-preview.png","dateModified":"2026-01-20","datePublished":"2026-01-20","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
```
