View API Reference



API Method Description PHP Ruby JS Python iOS Android C# Java Go Scala name
Custom batch

Perform several indexing operations in one API call.

batch batch batch batch Batch batch batch batchAsync Batch batch batch
Browse an index

Get all index content without any record limit. Can be used for backups.

browse browse browse browse Browse browse browse browseAsync Browse browse browse index
Get latest logs

Get the logs of the latest search and indexing operations.

getLogs getLogs get_logs get_logs GetLogs getLogs getLogs GetLogs logs
Configuring timeouts

Override the pre-configured timeouts.

Set extra header

Sends an extra http header to Algolia, for all subsequent queries


Retry logic

Algolia’s architecture is heavily redundant, to provide optimal reliability. Every application is hosted on at least three different servers. As a developer, however, you don’t need to worry about those details. The API Client handles them for you:

  • It leverages our dynamic DNS to perform automatic load balancing between servers.
  • Its retry logic switches the targeted server whenever it detects that one of them is down or unreachable. Therefore, a given request will not fail unless all servers are down or unreachable at the same time.

Application-level errors (e.g. invalid query) are still reported without retry.

Error handling

Requests can fail for two main reasons:

  1. Network issues: the server could not be reached, or did not answer within the timeout.
  2. Application error: the server rejected the request.

In the latter case, the error reported by the API client contains:

  • message: an error message indicating the cause of the error
  • status: an HTTP status code indicating the type of error

Here’s an example:

  "message":"Invalid Application ID",

The error message is purely informational and intended for the developer. You should never rely on its content programmatically, as it may change without notice.