canonical: https://jentic.com/apis/algolia.com/algolia-search-api

# Algolia Search API

Jentic publishes the only available OpenAPI specification for the Algolia Search API, keeping it validated and agent-ready. The Search API is Algolia's core surface - 78 endpoints covering query execution, indexing, synonyms, rules, dictionaries, API key management, clusters, vaults, and more. It serves single-index and multi-index queries, faceted filtering, browsing, batch object operations, and admin tasks like settings management and key rotation. The Search API is the foundation that the Recommend, Personalization, and Query Suggestions services build on.

## For AI agents

Run search queries, index records, manage synonyms and rules, and administer keys and settings on Algolia indices.

## Scope

Does not handle event ingestion, recommendations, or personalization scoring - use the Algolia Insights, Recommend, and Personalization APIs for those. Use this API for search, indexing, and index administration only.

## Capabilities

- Run single-index and multi-index search queries with facet filters via POST /1/indexes/{indexName}/query and /1/indexes/*/queries
- Index, update, and delete records individually or in batches via /1/indexes/{indexName}/{objectID} and /1/indexes/{indexName}/batch
- Search across facet values within a field for filter UIs via POST /1/indexes/{indexName}/facets/{facetName}/query
- Manage synonyms and query rules per index via /1/indexes/{indexName}/synonyms and /1/indexes/{indexName}/rules
- Generate, list, rotate, and revoke API keys via /1/keys
- Browse an entire index in pages without ranking truncation via POST /1/indexes/{indexName}/browse

## Use cases

### Storefront search with facets and filters

Run searches against a product index using POST /1/indexes/{indexName}/query, applying facet filters for category, brand, and price. Algolia returns ranked hits along with facet counts so the UI can render filter sidebars without a second request. The query response includes a queryID that should be passed to the Insights API on click and conversion events.

Example prompt: POST /1/indexes/products/query with query 'running shoes', facetFilters=[['brand:Nike','brand:Adidas']], hitsPerPage=24

### Bulk catalog update via batch operations

Push a full daily catalog refresh by submitting batch operations to /1/indexes/{indexName}/batch. Each batch can include addObject, updateObject, partialUpdateObject, and deleteObject operations together, and the response returns a taskID you can poll until the operations are indexed. For multi-index updates use /1/indexes/*/batch.

Example prompt: POST /1/indexes/products/batch with 1000 addObject operations and poll the returned taskID via /1/indexes/products/task/{taskID}

### Scoped API keys for frontend search

Generate a virtual API key scoped to a specific filter (for example, tenantID for multi-tenant SaaS) using POST /1/keys with restrictIndices and filters parameters. The resulting key can safely live in the browser because Algolia enforces the scope server-side, even if the key is intercepted.

Example prompt: POST /1/keys with acl=['search'], restrictIndices=['products'], and filters='tenantID:42' to generate a tenant-scoped key

### Agent-driven catalog search and curation

An AI agent connecting through Jentic can search the catalog, propose synonyms or rules based on no-result queries, and apply changes - all without leaving the conversation. Jentic resolves intents like 'search Algolia products' or 'add an Algolia synonym' to the right endpoint and injects credentials from the vault.

Example prompt: Search Jentic for 'run an Algolia search query', load searchSingleIndex, and execute with the user's query and any facet filters extracted from the conversation

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /1/indexes/{indexName}/query | Run a search query on a single index |
| POST | /1/indexes/*/queries | Run multiple queries across indices |
| POST | /1/indexes/{indexName}/batch | Submit batch object operations |
| PUT | /1/indexes/{indexName}/{objectID} | Add or replace a record by objectID |
| POST | /1/indexes/{indexName}/browse | Browse the full index in pages |
| GET | /1/keys | List API keys |
| POST | /1/keys | Create a scoped API key |

## Key resources

- **Indices** — Search indices holding records, settings, synonyms, and rules
- **Records** — Individual JSON objects searchable in an index
- **Synonyms** — Equivalence groups so different terms match the same records
- **Rules** — Query rules that boost, filter, or rewrite specific searches
- **API Keys** — Scoped keys with ACLs, index restrictions, and validity windows
- **Clusters** — Multi-cluster routing for sharding and tenant isolation

## Why Jentic

- **Setup:** Wiring the Algolia Search API by hand means sending its API key, resolving the {appId}.algolia.net host, and coordinating query, indexing, batch, and key-management calls yourself. Through Jentic you install once, import the Search API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** The Search API puts the index name and object id in the URL path (/1/indexes/{indexName}/query, /1/indexes/{indexName}/{objectID}, /1/indexes/{indexName}/batch), so a rule can pin your agent to one index. You choose the operations it may call, so creating API keys or running batch writes is not included unless you add them.
- **Credential handling:** Your Algolia API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search an index' or 'add a record to an index', and Jentic returns the matching Algolia Search operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Meilisearch API** — Open-source search engine with similar typo-tolerant ranking
- **Elastic Kibana API** — Lucene-based search and analytics with deep aggregation support
- **Algolia Recommend API** — Recommendation surface built on the same indices the Search API serves
- **Algolia Insights API** — Send click and conversion events keyed to Search queryIDs

## FAQ

### Why is there no official OpenAPI spec for the Algolia Search API?

Algolia ships SDKs but does not publish a standalone OpenAPI specification for the Search API. Jentic generates and maintains this spec so that AI agents and developers can call the Search API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Algolia Search API use?

Two API key headers: x-algolia-application-id and x-algolia-api-key. Different operations require different ACLs - 'search' for queries, 'addObject' for indexing, 'admin' for key management. Through Jentic, the appropriate key is fetched from the vault per operation.

### Can I generate a public-facing key restricted to one tenant?

Yes. POST /1/keys with acl=['search'], restrictIndices, and filters such as 'tenantID:42'. Algolia enforces the filter server-side, so the resulting key is safe to embed in a browser even if it leaks.

### What are the rate limits for the Algolia Search API?

Limits depend on your Algolia plan. Search queries scale per-cluster and indexing operations are queued. Watch for 429 responses with Retry-After headers and use /1/indexes/{indexName}/task/{taskID} polling rather than tight retry loops on indexing.

### How do I run a search query through Jentic?

Search Jentic for 'run an Algolia search query', load searchSingleIndex, and execute with indexName, query, and any facet filters. Jentic injects the application ID and search key automatically.

### Can I delete records by query?

Yes. POST /1/indexes/{indexName}/deleteByQuery with a filter expression and Algolia removes every matching record asynchronously. Poll the returned taskID to confirm deletion is fully indexed.

### Can I limit what my agent is allowed to do with the Algolia Search API?

Yes. Because you run Jentic One yourself, you decide which Algolia Search operations your agent may call and which credentials it may use. Since the index name and object id sit in the URL path (/1/indexes/{indexName}/query, /1/indexes/{indexName}/{objectID}, /1/indexes/{indexName}/batch), you can pin the agent to a single index. You also choose the operation set, so creating API keys via /1/keys or running batch writes stays off unless you explicitly allow it.
