Algolia Composition API

Composes multiple search sources into one curated result set - smart groups, curated queries and composition rules - so a single request returns a merchandised, multi-source response.

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /{path} Send a raw GET request to the Composition API · Send requests to the Algolia REST API #
Ask an LLM
“Can I read a Composition endpoint that the client library doesn't wrap?”
“Is there a generic way to GET any Composition API path with custom query parameters?”
Tell an agent
Send a raw GET request to Composition API path {path}.
Fetch Composition path {path} with query parameters {parameters}.
POST /{path} Send a raw POST request to the Composition API · Send requests to the Algolia REST API #
Ask an LLM
“Can I POST to a Composition endpoint the SDK doesn't expose as a method?”
“What's the generic escape hatch for posting to any Composition API path?”
Tell an agent
Send a raw POST request to Composition API path {path}.
POST to Composition path {path} with query parameters {parameters}.
PUT /{path} Send a raw PUT request to the Composition API · Send requests to the Algolia REST API #
Ask an LLM
“Can I send a custom PUT to a Composition path that has no dedicated method?”
“Is there a passthrough for PUT calls on an arbitrary Composition endpoint?”
Tell an agent
Send a raw PUT request to Composition API path {path}.
PUT to Composition path {path} with query parameters {parameters}.
DELETE /{path} Send a raw DELETE request to the Composition API · Send requests to the Algolia REST API #
Ask an LLM
“Can I issue a DELETE against an arbitrary Composition API path?”
“Is there a generic delete call for Composition endpoints without a dedicated method?”
Tell an agent destructive · confirm first
Send a raw DELETE request to Composition API path {path}.
DELETE Composition path {path} with query parameters {parameters}.
POST /1/compositions/{compositionID}/facets/{facetName}/query Search facet values in a composition's main source · Search for facet values #
Ask an LLM
“How do I autocomplete brand names from a facet on my composition's main index?”
“Can I search within one facet's values instead of the records themselves?”
Tell an agent
Search values of facet {facetName} in composition {compositionID}.
Find facet values of {facetName} in composition {compositionID} matching {params}.
GET /1/compositions List compositions in the application · List compositions #
Ask an LLM
“Which compositions exist in my Algolia application?”
“Can I page through my compositions a set number at a time?”
Tell an agent
List all compositions in my application.
Show page {page} of my compositions, {hitsPerPage} per page.
GET /1/compositions/{compositionID} Get one composition's configuration · Retrieve a composition #
Ask an LLM
“How do I see how a specific composition is configured?”
“What behavior and sorting strategy does one composition use?”
Tell an agent
Show composition {compositionID}.
Retrieve the full configuration of composition {compositionID}.
PUT /1/compositions/{compositionID} Create or replace a composition · Update and insert (upsert) a composition #
Ask an LLM
“How do I create a new composition that blends results from my indices?”
“Can I overwrite an existing composition's name and behavior in one call?”
Tell an agent
Upsert composition {compositionID} named {name} with behavior {behavior}.
Create composition {compositionID} called {name}, described as {description}, with behavior {behavior}.
DELETE /1/compositions/{compositionID} Delete a composition · Delete a composition #
Ask an LLM
“How do I remove a composition I no longer use?”
“Can I delete a single composition by its ID?”
Tell an agent destructive · confirm first
Delete composition {compositionID}.
Remove composition {compositionID} from my application.
POST /1/compositions/*/batch Add, update or delete many compositions at once · Batch action to multiple compositions #
Ask an LLM
“How do I create and delete several compositions in a single request?”
“Can I batch changes across multiple compositions instead of calling them one by one?”
Tell an agent
Apply this batch of composition changes: {requests}.
Upsert and delete compositions in one batch using {requests}.
POST /1/compositions/{compositionID}/sortingStrategy Set a composition's sorting strategy · Set or update the "sortingStrategy" configuration for an existing composition #
Ask an LLM
“How do I let users sort a composition's results using a replica index?”
“Can I replace only the sorting strategy mapping without rewriting the whole composition?”
Tell an agent
Update the sorting strategy of composition {compositionID}.
Replace just the sort-by-replica mapping on composition {compositionID}.
GET /1/compositions/{compositionID}/rules/{objectID} Get one composition rule · Retrieve a rule #
Ask an LLM
“How do I view the conditions and consequence of a single composition rule?”
“Where do I look up a composition rule when I already know its object ID?”
Tell an agent
Show rule {objectID} in composition {compositionID}.
Retrieve composition rule {objectID} from {compositionID}.
PUT /1/compositions/{compositionID}/rules/{objectID} Add or replace a single composition rule · Add or update a composition rule #
Ask an LLM
“How do I add a merchandising rule to one composition?”
“Can I schedule a composition rule to be valid only during a promotion window?”
Tell an agent
Save rule {objectID} on composition {compositionID} with consequence {consequence}.
Add rule {objectID} to composition {compositionID} with conditions {conditions}, consequence {consequence}, valid during {validity}.
DELETE /1/compositions/{compositionID}/rules/{objectID} Delete a single composition rule · Delete a Composition Rule #
Ask an LLM
“How do I remove one rule from a composition?”
“Can I delete a composition rule by its object ID?”
Tell an agent destructive · confirm first
Delete rule {objectID} from composition {compositionID}.
Remove composition rule {objectID} in {compositionID}.
POST /1/compositions/{compositionID}/rules/batch Batch create, update or delete composition rules · Create or update or delete composition rules #
Ask an LLM
“How do I upload many composition rules in one request?”
“Can I mix rule additions and deletions for one composition in a single batch?”
Tell an agent
Apply this batch of rule changes to composition {compositionID}: {requests}.
Bulk save and delete rules on composition {compositionID}.
POST /1/compositions/{compositionID}/rules/search Search a composition's rules · Search for composition rules #
Ask an LLM
“How do I find which composition rules mention a certain keyword?”
“Can I list only the enabled rules on a composition?”
Tell an agent
Search rules in composition {compositionID} for {query}.
List enabled={enabled} rules in composition {compositionID} for context {context}.
GET /1/compositions/{compositionID}/task/{taskID} Check the status of a composition task · Check task status #
Ask an LLM
“Has my composition update finished being applied yet?”
“How do I check whether a composition write task is still pending?”
Tell an agent
Check the status of task {taskID} on composition {compositionID}.
Tell me once whether composition {compositionID} task {taskID} is published or still pending.
GET /setClientApiKey Switch the API key the Composition client uses · Switch the API key used to authenticate requests #
Ask an LLM
“Can I change which API key my Composition client authenticates with?”
“How do I rotate the key an existing Composition client sends?”
Tell an agent
Switch the Composition client to authenticate with API key {apiKey}.
Use {apiKey} for all further Composition API requests.
GET /waitForCompositionTask Wait until a composition task completes · Wait for operation to complete #
Ask an LLM
“How can my code block until a composition upsert is fully applied?”
“Is there a helper that polls a composition task until it's done?”
Tell an agent
Wait until task {taskID} on composition {compositionID} completes.
Keep polling composition {compositionID} until task {taskID} is published.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/algolia:algolia-composition-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

algolia-composition-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Composition API
  summary: The Algolia Composition API lets you run composed search requests on your Compositions
  description: '## Client libraries


    Use Algolia''s API clients and libraries to reliably integrate Algolia''s APIs with your apps.'
  version: 1.0.0
servers:
- url: https://{appId}.algolia.net
  variables:
    appId:
      default: ALGOLIA_APPLICATION_ID
- url: https://{appId}-1.algolianet.com
  variables:
    appId:
      default: ALGOLIA_APPLICATION_ID
- url: https://{appId}-2.algolianet.com
  variables:
    appId:
      default: ALGOLIA_APPLICATION_ID
- url: https://{appId}-3.algolianet.com
  variables:
    appId:
      default: ALGOLIA_APPLICATION_ID
- url: https://{appId}-dsn.algolia.net
  variables:
    appId:
      default: ALGOLIA_APPLICATION_ID
security:
- appId: []
  apiKey: []
tags:


# --- truncated at 32 KB (128 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/algolia/refs/heads/main/openapi/algolia-composition-api-openapi.yml