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
Microsoft Entra ID (Recommended)
Base URL
Indexes
Create Index
Create a new search index with fields, vector configurations, and semantic settings. Endpoint:Unique name for the index
Field definitions with:
name: Field nametype: Data type (Edm.String,Edm.Int32,Collection(Edm.Single))key: Boolean indicating if this is the key fieldsearchable: Boolean for full-text searchfilterable: Boolean for filtering
Vector search configuration:
profiles: Vector search profilesalgorithms: HNSW or other algorithmsvectorizers: Embedding model configuration
Semantic search configuration:
configurations: Semantic ranking configurationsprioritizedFields: Fields to prioritize for semantic search
Upload Documents
Add or update documents in an index. Endpoint:Array of document objects with:
@search.action: Action type (upload,merge,mergeOrUpload,delete)- Field values matching index schema
Search
Search Documents
Perform full-text, vector, or hybrid search queries. Endpoint:Full-text search query
OData filter expression (e.g.,
page_number ge 100)Comma-separated list of fields to return
Number of results to return (default: 50)
Number of results to skip for pagination
Vector search queries with:
kind: Query type (vector,text)vector: Embedding vectorfields: Vector fields to searchk: Number of nearest neighbors
Name of semantic configuration to use
Agentic Retrieval
Create Knowledge Source
Create a knowledge source for agentic retrieval. Endpoint:Knowledge source name
Source type:
searchIndex, blob, sharepointOnline, webFor
searchIndex kind:searchIndexName: Index namesourceDataFields: Fields to retrieve
Create Knowledge Base
Create a knowledge base that orchestrates agentic retrieval. Endpoint:Knowledge base name
Array of knowledge source names
Output mode:
rawContent or answerSynthesisConfiguration for answer synthesis:
resourceUri: Azure OpenAI endpointdeploymentId: Model deployment namemodelName: Model name
Query Knowledge Base
Execute an agentic retrieval query. Endpoint:Natural language query
Maximum number of results to return
Autocomplete
Suggest
Get search suggestions based on partial input. Endpoint:Partial search text
Name of suggester to use
Number of suggestions to return
Index Statistics
Get Index Statistics
Retrieve document count and storage size. Endpoint: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
Related Resources
Python SDK
Azure AI Search Python client library
.NET SDK
Azure AI Search .NET SDK