Jaa


Azure AI Search REST API reference

Azure AI Search (formerly known as Azure Cognitive Search) is a fully managed cloud search service that provides information retrieval over user-owned content.

Data plane REST APIs are used for indexing and query workflows, and are documented in this section.

Control plane operations for service administration are covered in a separate Search Management REST API.

Versioned API docs

A version selector appears above the table of contents when you select an API reference article. Make sure the API is from the Reference > Data Plane folder.

Screenshot of the version selector.

Key concepts

Azure AI Search has the concepts of search services, indexes, documents, indexers, data sources, skillsets, and synonym maps.

  • A search service hosts index, indexers, data sources, skillsets, and synonym maps as top-level objects.
  • A search index provides persistent storage of search documents. Search documents are your data, articulated as a collection of fields, loaded from external sources and pushed to an index to make it searchable.
  • A search indexer adds automation, reading data in native formats and serializing it into JSON.
  • An indexer has a data source and points to an index.
  • An indexer might also have a skillset that adds AI enrichment and integrated vectorization to the indexing pipeline. Skillsets are always attached to an indexer. They invoke machine learning to extract or chunk text, vectorize content, infer features, or add structure to content for improved indexing by a search service.

Altogether, you can create the following objects on a search service:

Objects Description
Data sources A data source connection used by an indexer to retrieve and refresh documents for indexing. Data sources have a type. You can use the Microsoft-provided connections for Azure, or partner connectors. See Data sources gallery for the full list.
Documents Conceptually, a document is an entity in your index. Mapping this concept to more familiar database equivalents: a search index equates to a table, and documents are roughly equivalent to rows in a table. Documents exist only in an index, and are retrieved only through queries that target the documents collection (/docs) of an index. All operations performed on the collection such as uploading, merging, deleting, or querying documents take place in the context of a single index, so the URL format document operations always includes /indexes/[index name]/docs for a given index name.
Indexes An index is stored on your search service and populated with JSON documents that are indexed and tokenized for information retrieval. The fields collection of an index defines the structure of the search document. Fields have a name, data types, and attributes that determine usage. For example, searchable fields are used in full text search, and thus tokenized during indexing. An index also defines other constructs, such as scoring profiles for relevance tuning, suggesters, semantic configurations, and custom analyzers.
Indexers Indexers provide indexing automation. An indexer connects to a data source, reads in the data, and passes it to a search engine for indexing into a target search index. Indexers read from an external source using connection information in a data source, and serialize the incoming data into JSON search documents. In addition to a data source, an indexer also requires an index. The index specifies the fields and attributes of the search documents.
Skillsets A skillset adds external processing steps to indexer execution, and is used for applying AI or deep learning models to analyze or transform content for improved searchability in an index. The contents of a skillset are one or more skills, which can be built-in skills created by Microsoft, custom skills, or a combination of both. Built-in skills exist for image analysis, including OCR, and natural language processing. Other examples of built-in skills include entity recognition, key phrase extraction, chunking text into logical pages, among others. A skillset is high-level standalone object that exists on a level equivalent to indexes, indexers, and data sources, but it's operational only within indexer processing. As a high-level object, you can design a skillset once, and then reference it in multiple indexers.
Synonym maps A synonym map is service-level object that contains user-defined synonyms. This object is maintained independently from search indexes. Once uploaded, you can point any searchable field to the synonym map (one per field).

Permissions and access control

You can use key-based authentication or role-based through Microsoft Entra ID.

  • Key-based authentication relies on API keys that are generated for the search service. Having a valid key establishes trust, on a per request basis, between the application sending the request and the service that handles it. You can use an Admin API key for read-write operations or a Query API key for read access to the documents collection of a search index.

  • Microsoft Entra ID authentication and role-based access control requires that you have an established tenant in Microsoft Entra ID, with security principals and role assignments. Members of the following roles have data plane access. You can create custom roles if the built-in roles are insufficient.

When you use roles on the connection, your client app presents a bearer token in the authorization header. See Authorize access to a search app using Microsoft Entra ID for help with setting this up.

You can disable key-based authentication or role-based authentication. If you disable role-based authentication, it only applies to data plane operations. Control plane operations, such as service administration, always use role-based authentication. See Microsoft Entra ID authentication and role-based access control for Azure AI Search for details.

Calling the APIs

The APIs documented in this section provide access to operations on search data, such as index creation and population, document upload, and queries. When calling APIs, keep the following points in mind:

  • Requests must be issued over HTTPS (on the default port 443).

  • Request URIs must include the api-version. The value must be set to a supported version, formatted as shown in this example: GET https://[search service name].search.windows.net/indexes?api-version=2024-07-01

  • Request headers must include either an api-key or a bearer token for authenticated connections. Optionally, you can set the Accept HTTP header. If the content type header isn't set, the default is assumed to be application/json.

See also