---
title: Create AI Search instances programmatically via REST API
description: Create AI Search instances programmatically using the REST API.
image: https://developers.cloudflare.com/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/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://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Create AI Search instances programmatically via REST API

Jan 20, 2026 

[ AI Search ](https://developers.cloudflare.com/ai-search/) 

You can now create [AI Search](https://developers.cloudflare.com/ai-search/) instances programmatically using the [API](https://developers.cloudflare.com/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://developers.cloudflare.com/ai-search/get-started/dashboard/) before, you already have a [service API token](https://developers.cloudflare.com/ai-search/configuration/indexing/service-api-token/) registered and can start creating instances programmatically right away. If not, follow the [API guide](https://developers.cloudflare.com/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:

Terminal window

```
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://developers.cloudflare.com/api/resources/ai%5Fsearch/subresources/instances/methods/create/) for additional configuration options.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/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://developers.cloudflare.com/changelog/post/2026-01-20-ai-search-simplified-api/","inLanguage":"en","image":"https://developers.cloudflare.com/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://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
