Skip to main content
After you have structured your data into records, you need to send it to Algolia to make it searchable.

Explore related content in the Algolia Academy

Push data to Algolia with the API clients

Index your data without coding

Index your data with coding

Name your index

Choose a unique, readable name, and make sure you don’t use any sensitive or personally identifiable information (PII) as your index name. This includes usernames, user IDs, or email addresses. As index names appear in network requests, you must consider them as being publicly available.

Authenticate with Algolia

You need an application ID and a valid API key to push your data. These credentials protect your data, and you can set different access levels for your team. Every indexing operation requires these credentials. The application ID gives you access to your indices, and the appropriate API key gives you the permission to perform indexing operations. For more information, see:

Unique object identifiers

The engine identifies each record with a unique objectID, ideally, one you set yourself. If you don’t, Algolia generates them for you. You can retrieve the objectID by browsing the index. Later on, when you need to update or delete records, you must provide the objectID.

Send records in batches

Algolia lets you send one or more records in a single API call or batch records. You can batch your indexing operations with the API or the dashboard. For optimal indexing performance, you should send your records in batches. An ideal batch size is approximately 10 MB, representing 1,000 to 10,000 records, depending on the average record size. Batching reduces network calls and speeds up indexing. You’ll see the most significant performance improvements if you have many records, but it’s good practice for everyone to batch indexing operations whenever possible. Batching doesn’t change how Algolia counts indexing operations. Every indexing operation adds to your count. For more information, see:

Update your data

After the initial data import, you need to keep your index up-to-date with the latest changes on your app or website. The appropriate update frequency depends on how often your content changes and how fast you need it to be searchable. Take the example of an ecommerce store:
  • You want to update price changes or product availability in real time.
  • You don’t need to update the number of sales (used for custom ranking) as often, so you can periodically send them in batches.
Aim to find a balance between:
  • Getting fresh information into the search experience as quickly as possible
  • Reducing the number of operations (which affects your performance and, potentially, the Algolia pricing).
For more information, see:

How to handle multiple users

You can use security-filtering to restrict the data users can see when searching. This allows for dedicated searchable content, which isn’t visible to unauthorized users.

Concurrency

When working in a concurrent environment, you might need more control to guarantee data consistency. The engine supports built-in operations that allow conditional updates based on versioning and optimistic locking.

Third-party integrations

You may use a framework or platform to power your app. Most of these solutions have their own databases and frontends. Algolia has several integrations to simplify the indexing process for popular frameworks and platforms:
⌘I