Skip to main content

Azure AI Search REST API

Azure AI Search provides powerful full-text search, vector search, semantic ranking, and agentic retrieval capabilities through a comprehensive REST API.

Authentication

Azure AI Search supports two authentication methods:

API Key Authentication

To get a Microsoft Entra ID token:

Base URL

Indexes

Create Index

Create a new search index with fields, vector configurations, and semantic settings. Endpoint:
string
required
Unique name for the index
array
required
Field definitions with:
  • name: Field name
  • type: Data type (Edm.String, Edm.Int32, Collection(Edm.Single))
  • key: Boolean indicating if this is the key field
  • searchable: Boolean for full-text search
  • filterable: Boolean for filtering
Vector search configuration:
  • profiles: Vector search profiles
  • algorithms: HNSW or other algorithms
  • vectorizers: Embedding model configuration
object
Semantic search configuration:
  • configurations: Semantic ranking configurations
  • prioritizedFields: Fields to prioritize for semantic search
Request Example:

Upload Documents

Add or update documents in an index. Endpoint:
array
required
Array of document objects with:
  • @search.action: Action type (upload, merge, mergeOrUpload, delete)
  • Field values matching index schema
Request Example:

Search Documents

Perform full-text, vector, or hybrid search queries. Endpoint:
Full-text search query
string
OData filter expression (e.g., page_number ge 100)
string
Comma-separated list of fields to return
integer
Number of results to return (default: 50)
integer
Number of results to skip for pagination
array
Vector search queries with:
  • kind: Query type (vector, text)
  • vector: Embedding vector
  • fields: Vector fields to search
  • k: Number of nearest neighbors
string
Name of semantic configuration to use
Full-Text Search:
Vector Search:
Hybrid Search:
Response:

Agentic Retrieval

Create Knowledge Source

Create a knowledge source for agentic retrieval. Endpoint:
string
required
Knowledge source name
string
required
Source type: searchIndex, blob, sharepointOnline, web
object
For searchIndex kind:
  • searchIndexName: Index name
  • sourceDataFields: Fields to retrieve
Request:

Create Knowledge Base

Create a knowledge base that orchestrates agentic retrieval. Endpoint:
string
required
Knowledge base name
array
required
Array of knowledge source names
string
Output mode: rawContent or answerSynthesis
object
Configuration for answer synthesis:
  • resourceUri: Azure OpenAI endpoint
  • deploymentId: Model deployment name
  • modelName: Model name
Request:

Query Knowledge Base

Execute an agentic retrieval query. Endpoint:
string
required
Natural language query
integer
Maximum number of results to return
Request:
Response:

Autocomplete

Suggest

Get search suggestions based on partial input. Endpoint:
string
required
Partial search text
string
required
Name of suggester to use
integer
Number of suggestions to return

Index Statistics

Get Index Statistics

Retrieve document count and storage size. Endpoint:
Response:

Error Responses

All errors return standard format:

Rate Limits

Rate limits vary by service tier:
  • Free: 3 requests per second
  • Basic: 10 requests per second
  • Standard: 50 requests per second
  • Storage Optimized: 100 requests per second

Python SDK

Azure AI Search Python client library

.NET SDK

Azure AI Search .NET SDK