- For more information about preparing your data for indexing, see Format and structure your data.
- For alternatives to the API for pushing data, see Send your data to Algolia.
Required credentials
To send data to Algolia, you need an Application ID and a valid API key (withaddObjects
permission). You can find them in the API Keys section of Algolia’s dashboard.
- Application ID. Your Application ID is what Algolia uses to identify your app, where all your indices live.
- API key. API keys control access to Algolia’s API and determine what you’re allowed to do, such as searching an index, or adding new records. For better security, create specific API keys with minimal permissions for indexing tasks, which you should only use in server-side code. Keep your indexing API keys secret.
Set up the API client
First, install and set up your API client. For installation instructions, see:Fetch your data
Before sending anything to Algolia, you need to retrieve your data. You can do this in several ways, depending on the nature of your app.From a database
From a file
You can use this actors dataset to test this out.From the source code directly
Only use this method for exploration purposes or if you have a small amount of data.Send the data to Algolia
Once the records are ready, you can push them to Algolia using thesaveObjects
method.