android_small_white Created with Sketch.

Getting Started


Add the following dependency to your Gradle build file:

dependencies {
    // [...]
    compile 'com.algolia:algoliasearch-android:3.10.1'


You can browse the automatically generated reference documentation. (See also the offline-enabled version.)

This project is open-source under the MIT License.

Init Index

To begin, you will need to initialize the client. In order to do this you will need your Application ID and API Key. You can find both on your Algolia account.

Client client = new Client("YOUR_APP_ID", "YOUR_API_KEY");

The api key that is displayed here is your ADMIN API Key. To maintain security, never use your ADMIN API Key on your frontend or share it with anyone. In your frontend, use the SEARCH ONLY API Key or any other key that has search only rights.

If you are building a native app on mobile, be sure to not include the search API key directly in the source code. You should instead consider fetching the key from your servers during the app’s startup.