API REFERENCE
Complete API Documentation
Everything you need to integrate Algoli search into your application. REST API, GraphQL, and native SDKs.
Base URL
https://api.algoli.com/v1Current Version
v1.0Authentication
Bearer TokenSDK Examples
Native libraries for your favorite programming language.
JavaScript
import { AlgoliClient } from '@algoli/client';
const client = new AlgoliClient({
appId: 'YOUR_APP_ID',
apiKey: 'YOUR_API_KEY'
});
// Search
const results = await client.search('query', {
filters: 'category:shoes',
hitsPerPage: 20
});
console.log(results.hits);API Endpoints
RESTful API with predictable, resource-oriented URLs.
Search
POST
/searchExecute a search query
POST /v1/search
{
"query": "red sneakers",
"filters": "category:shoes",
"hitsPerPage": 20
}POST
/search/multiSearch across multiple indices
POST /v1/search/multi
{
"requests": [
{ "indexName": "products", "query": "shoes" },
{ "indexName": "brands", "query": "nike" }
]
}Indexing
POST
/indices/{indexName}/objectsAdd or update objects in an index
POST /v1/indices/products/objects
{
"requests": [
{
"action": "addObject",
"body": {
"objectID": "1",
"name": "Red Sneakers",
"price": 89.99
}
}
]
}DELETE
/indices/{indexName}/objects/{objectID}Delete a specific object from an index
DELETE /v1/indices/products/objects/1
POST
/indices/{indexName}/batchPerform batch operations
POST /v1/indices/products/batch
{
"requests": [
{ "action": "addObject", "body": {...} },
{ "action": "updateObject", "body": {...} }
]
}Configuration
GET
/indices/{indexName}/settingsGet index settings
GET /v1/indices/products/settings
PUT
/indices/{indexName}/settingsUpdate index settings
PUT /v1/indices/products/settings
{
"searchableAttributes": ["name", "description"],
"customRanking": ["desc(popularity)"],
"ranking": ["typo", "geo", "words", "filters"]
}Analytics
GET
/analytics/searchesGet search analytics
GET /v1/analytics/searches?startDate=2025-01-01&endDate=2025-01-31
GET
/analytics/top-searchesGet most popular searches
GET /v1/analytics/top-searches?limit=100
Authentication
All API requests require authentication using your API key.
# Using cURL
curl -X POST https://api.algoli.com/v1/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "red sneakers"}'
# Using JavaScript
const response = await fetch('https://api.algoli.com/v1/search', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ query: 'red sneakers' })
});Ready to Start Building?
Get your API keys and start integrating in minutes.