API Reference / API Methods / Advanced methods
List of methods

It’s recommended to use the Kotlin API client, which is better suited for Android development.

We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.

We released a new version of the PHP API client in public beta. Read the beta documentation for more information.

We released a new version of the Java API client in public beta. Read the beta documentation for more information.

Retry logic

To provide reliability, Algolia’s architecture is redundant. Every application is hosted on at least three different servers (clusters).

As a developer, you don’t need to worry about these details, the API clients handle them for you:

  • Leverage the dynamic distributed search network to perform automatic load balancing between servers.
  • The retry logic switches the targeted server whenever it detects that one of them is down or unreachable. A given request won’t fail unless all servers are down or unreachable at the same time.

Application-level errors, for example, invalid queries are still reported without retry.

Error handling

Requests can fail for two main reasons:

  1. Network issues: the server couldn’t be reached, or didn’t answer within the timeout.
  2. Application error: the server rejected the request.

For application errors, the API client reports:

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

For example:

1
2
3
4
{
  "message":"Invalid Application ID",
  "status":404
}
Did you find this page helpful?