Algolia Recommend API
Client libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API clients are covered by…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Client libraries
Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps.
The official API clients are covered by Algolia's Service Level Agreement.
For more information, see Algolia's ecosystem.
Base URLs
Base URLs for the Recommend API:
https://{APPLICATION_ID}.algolia.nethttps://{APPLICATION_ID}-dsn.algolia.net.
If your subscription includes a Distributed Search Network,
this ensures that requests are sent to servers closest to users.
Both URLs provide high availability by distributing requests with load balancing.
All requests must use HTTPS.
Retry strategy
To guarantee a high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks:
https://{APPLICATION_ID}-1.algolianet.comhttps://{APPLICATION_ID}-2.algolianet.comhttps://{APPLICATION_ID}-3.algolianet.com
These URLs use a different DNS provider than the primary URLs.
Randomize this list to ensure an even load across the three servers.
All Algolia API clients implement this retry strategy.
Authentication
Add these headers to authenticate requests:
x-algolia-application-id. Your Algolia application ID.x-algolia-api-key. An API key with the necessary permissions to make the request.
The required access control list (ACL) to make a request is listed in each endpoint's reference.
You can find your application ID and API key in the Algolia dashboard.
Request format
Request bodies must be JSON objects.
Response status and errors
The Recommend API returns JSON responses.
Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.
Successful responses return 2xx statuses. Client errors return 4xx statuses. Server errors return 5xx statuses.
Error responses have a message property with more information.
Version
The current version of the Recommend API is version 1, indicated by the /1/ in each endpoint's URL.
Endpoints 11
recommend
- GETSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - PUTSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - POSTSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - DELETESend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - POSTRetrieve recommendations
/1/indexes/*/recommendationsRetrieves recommendations from selected AI models. - GETRetrieve a rule
/1/indexes/:indexName/:model/recommend/rules/:objectIDRetrieves a Recommend rule that you previously created in the Algolia dashboard. - DELETEDelete a rule
/1/indexes/:indexName/:model/recommend/rules/:objectIDDeletes a Recommend rule from a recommendation scenario. - GETCheck task status
/1/indexes/:indexName/:model/task/:taskIDChecks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on… - POSTSearch for rules
/1/indexes/:indexName/:model/recommend/rules/searchSearches for Recommend rules. Use an empty query to list all rules for this recommendation scenario. - POSTCreate or update a batch of Recommend Rules
/1/indexes/:indexName/:model/recommend/rules/batchCreate or update a batch of Recommend Rules. Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same objectID already… - GETSwitch the API key used to authenticate requests
/setClientApiKey?apiKey=stringSwitch the API key used to authenticate requests.
API details
- Base URL
https://{appId}.algolia.nethttps://{appId}-1.algolianet.comhttps://{appId}-2.algolianet.comhttps://{appId}-3.algolianet.comhttps://{appId}-dsn.algolia.net- Authentication
- An API key in the x-algolia-application-id header
An API key in the x-algolia-api-key header - Operations
- 11 operations on 7 pathsGET 4POST 4DELETE 2PUT 1
- Main resources
- recommend 11
- Response formats
application/json- Description format
- OpenAPI 3.0.2, API version
1.0.0 - Links
- OpenAPI document
How to test the Algolia Recommend API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Algolia Recommend API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the x-algolia-application-id header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Send requests to the Algolia REST API” (GET /:path), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Algolia Recommend API?
Client libraries Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps. The official API clients are covered by… It is listed under Developer tools and has 11 endpoints.
Who publishes the Algolia Recommend API?
It is listed from Algolia's public API description (an OpenAPI document), not published by Algolia on Swastik Codes. Anyone who controls algolia.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Algolia Recommend API?
Its description lists 5 base URLs: https://{appId}.algolia.net, https://{appId}-1.algolianet.com, https://{appId}-2.algolianet.com, https://{appId}-3.algolianet.com, https://{appId}-dsn.algolia.net. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the Algolia Recommend API?
It accepts 2 methods: an API key in the x-algolia-application-id header; an API key in the x-algolia-api-key header.
How many endpoints does the Algolia Recommend API have?
11 operations on 7 paths (4 GET, 4 POST, 2 DELETE, 1 PUT). The largest groups are recommend.
Is forking the Algolia Recommend API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.