canonical: https://jentic.com/apis/algolia.com/algolia-query-suggestions-api

# Algolia Query Suggestions API

Jentic publishes the only available OpenAPI specification for the Algolia Query Suggestions API, keeping it validated and agent-ready. The Query Suggestions API manages the configuration of suggestion indices that Algolia generates from your search analytics, external suggestion lists, or facet values. You define which source indices contribute, which facets are eligible, and how often the suggestions index is rebuilt. The resulting suggestions index can then be queried like any other Algolia index to power autocomplete experiences.

## For AI agents

Configure and inspect Algolia query-suggestions indices that power autocomplete, including source index selection, facet eligibility, and rebuild status.

## Scope

Does not execute search queries, manage records, or send analytics events - use the Algolia Search and Insights APIs for those. Use this API for query suggestions configuration only.

## Capabilities

- Create a query-suggestions configuration linking source indices and facets via POST /1/configs
- List every query-suggestions configuration in the application via GET /1/configs
- Update an existing configuration to add facets or change generation rules via PUT /1/configs/{indexName}
- Delete a query-suggestions configuration when an index is decommissioned via DELETE /1/configs/{indexName}
- Check the build status of a suggestions index via GET /1/configs/{indexName}/status
- Pull the latest log file for a suggestions build to debug missing entries via GET /1/logs/{indexName}

## Use cases

### Storefront autocomplete from search analytics

Create a query-suggestions config that pulls popular searches from a primary product index and surfaces them as autocomplete entries. The Query Suggestions service rebuilds the index on a schedule, ranking suggestions by search volume and click-through. You can then query the resulting suggestions index from your autocomplete UI like any other Algolia index.

Example prompt: POST /1/configs with sourceIndices referencing 'products', generate=['brand','category'] facets, and minHits=5

### Multi-source suggestions for content sites

Combine searches from a product index and an articles index into a single suggestions index. The configuration accepts multiple source indices and merges their popular queries, so a single autocomplete dropdown can surface both product and content suggestions ranked by relevance.

Example prompt: PUT /1/configs/storefront-suggestions adding 'articles' to sourceIndices alongside 'products' with weight 0.5

### Diagnose missing suggestions

When a popular query does not appear in the suggestions dropdown, fetch the latest build log via GET /1/logs/{indexName} to see whether it was filtered by minHits, blocklist, or a generation rule. Combined with GET /1/configs/{indexName}/status this lets you confirm the index is up to date.

Example prompt: GET /1/logs/storefront-suggestions and GET /1/configs/storefront-suggestions/status, then report any errors or filtered queries

### Agent-managed autocomplete tuning

An AI agent can audit current configurations, identify suggestions indices with stale builds, and apply updated rules through Jentic. Credentials are pulled from your Jentic One instance so the agent never handles raw Algolia admin keys.

Example prompt: Search Jentic for 'update Algolia query suggestions configuration', load updateConfig, and execute with the new facet list

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /1/configs | List all query-suggestions configurations |
| POST | /1/configs | Create a new configuration |
| PUT | /1/configs/{indexName} | Update an existing configuration |
| DELETE | /1/configs/{indexName} | Delete a configuration |
| GET | /1/configs/{indexName}/status | Get build status of a suggestions index |
| GET | /1/logs/{indexName} | Get the latest build log |

## Key resources

- **Configurations** — Definitions of query-suggestions indices including source indices, facets, and generation rules
- **Logs** — Build logs for each suggestions index

## Why Jentic

- **Setup:** Wiring the Algolia Query Suggestions API by hand means sending its API key, resolving the query-suggestions.{region}.algolia.com host, and managing suggestion configs and their status yourself. Through Jentic you install once, import the Query Suggestions API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** The Query Suggestions API puts the index name in the URL path (/1/configs/{indexName}, /1/configs/{indexName}/status, /1/logs/{indexName}), so a rule can pin your agent to one suggestions config. You choose the operations it may call, so deleting a config is not included unless you add it.
- **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 'create a query suggestions config' or 'check a suggestions config status', and Jentic returns the matching Algolia Query Suggestions operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Algolia Search API** — Read suggestions indices via the standard search endpoint
- **Algolia Recommend API** — Different surface area - product recommendations rather than autocomplete suggestions
- **Meilisearch API** — Open-source search with built-in typo-tolerant prefix matching

## FAQ

### Why is there no official OpenAPI spec for the Query Suggestions API?

Algolia does not publish a standalone OpenAPI specification for the Query Suggestions API. Jentic generates and maintains this spec so that AI agents and developers can call the Query Suggestions 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 Query Suggestions API use?

Two API key headers: x-algolia-application-id and x-algolia-api-key with the editSettings ACL. Through Jentic, both are stored in the vault and injected at request time, so agents never see the raw admin key.

### Can I combine multiple source indices into a single suggestions index?

Yes. POST or PUT /1/configs accepts a sourceIndices array, and each entry can carry its own facets, generate rules, and weight. Algolia merges and ranks the combined suggestions during the next rebuild.

### What are the rate limits for the Algolia Query Suggestions API?

The spec does not declare numeric rate limits. Configuration changes trigger an asynchronous rebuild, so back-to-back PUTs on the same config can queue. Use GET /1/configs/{indexName}/status to confirm the previous build finished before issuing the next change.

### How do I create a suggestions configuration through Jentic?

Search Jentic for 'create Algolia query suggestions config', load createConfig, and execute with sourceIndices and generate facets. Jentic injects the application ID and API key automatically.

### Where do the suggestions actually live once configured?

Each configuration produces a regular Algolia index named in the config. Query that index via the Search API to populate your autocomplete dropdown - no special suggestions endpoint is needed for read traffic.

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

Yes. Jentic One is self-hosted, so your own rules decide which Query Suggestions operations and credentials your agent may use. Because the index name sits in the URL path for /1/configs/{indexName}, /1/configs/{indexName}/status, and /1/logs/{indexName}, you can pin the agent to a single suggestions config. You also choose which operations it may call, so a destructive action like DELETE /1/configs/{indexName} is excluded unless you explicitly allow it.
