Skip to main content
The Python API client follows semantic versioning.

Upgrade to version 3

From version 2

This document lists every known breaking change:
  • Remove support for Python 2
  • Add support for Python 3.9 and later
  • Remove deprecated RecommendationClient,
Update your algoliasearch dependency to >=3.0,<4.0 using pip:
Command line
Then, update your requirements in your setup.py or requirements.txt to: algoliasearch>=3.0,<4.0.

From version 1

Update to version 2 first, then update from version 2 to 3.

Upgrade from version 1.20 to version 2

This document lists every known breaking change. Not all these changes may affect your application, since some of these breaking changes happen in obscure parts of the client. Update your algoliasearch dependency to >=2.0,<3.0 using pip:
Command line
Then, update your requirements in your setup.py or requirements.txt to: algoliasearch>=2.0,<3.0.

SearchClient

You can initialize the SearchClient as follows:

List of method signature changes

SearchIndex

You can initialize the SearchIndex as follows:

List of method signature changes

AnalyticsClient

You can initialize the AnalyticsClient as follows:

List of method signature changes

InsightsClient

You can initialize the InsightsClient as follows:

List of method signature changes

Use configuration

You can instantiate all clients with configuration objects. This is useful to change the way a client behaves. All setters have been removed. If, for instance, you rely on set_extra_headers or set_timeout, you need to change your code to use a configuration object:

Optional methods parameters and requestOptions

To have the most consistent, predictable, and future-proof method signature, the API client follows three rules:
  • All required parameters have a single argument each
  • All optional arguments are passed in a request_options dictionary, as the last argument
  • The client never sets any default values
Here are some examples:

Exceptions

The import of the base AlgoliaException exception has changed:
Last modified on March 23, 2026