Skip to main content
Use the CSV connector to index from a hosted CSV file without writing an indexing script. In this quickstart, you create a source for a public product dataset, use an Algolia destination, and an on-demand synchronization task.

Before you begin

If you don’t have an Algolia account, create one for free.

Index a sample dataset with the CSV connector

Create a source, destination, transformation, and synchronization task for the sample product dataset.
  • The source tells the connector where to fetch the CSV file.
  • The destination tells the connector which Algolia index to write to.
  • The transformation changes records before the connector indexes them.
  • The task controls when the connector runs.
1

Choose the CSV connector

Go to the Algolia dashboard and select your Algolia application. Open the Connectors page.Find CSV, then select Connect.
2

Configure the CSV source

Under Configure your data source, select Create a new source.Under Is your data source protected?, select None.In URL, enter:
For HTTP Method, select GET.
3

Configure column types

In Unique column identifier, enter objectID.Under Column type mapping, add these columns and select the corresponding type:
4

Create the CSV source

In Connector name, enter Quickstart products CSV source, then select Create source.
5

Transform the records

This transformation adds a price_range attribute to each record. After the connector indexes your records, you can display price_range or configure it as a facet.Select Transform using the code editor and replace the placeholder Transformation code with this function:
JavaScript
Select Save.
6

Choose the destination index

Under Configure your destination, select Create a new destination.Under Search, enter quickstart-products as the index name.
If you enter the name of an existing index, the connector overwrites the records and settings in that index.
7

Create the destination

Under Index credentials, select Create one for me. To use an existing API key, choose one with the addObject, deleteIndex, and editSettings ACLs.In Name, enter CSV quickstart products destination, then select Create destination.
8

Create an on-demand synchronization task

Under Configure your task, select On demand and Full reindexing.Select Create task, then Run and wait for the task to finish.
9

Verify the indexed records

When the task completes, open the quickstart-products index in the Algolia dashboard. The index contains product records with attributes such as title, description, product_type, price, price_range, and showcase_image.
You can use this index as the data source for Build your first search experience. Before you build the UI, configure product_type as an attribute for faceting in the quickstart-products index.

Index your own CSV data

To index your own records, update the connector source URL to point to a CSV file you host. After you update the source, run the connector task again to index your records.

Source file format

The first row of your CSV file must contain the column names. Each remaining row represents one record. For example:
CSV
Each record needs a unique objectID attribute. In the source configuration, use Unique property identifier to set this attribute. Choose a column whose values are unique for every row (id in this example). Enclose fields that contain commas, double quotation marks, or line breaks in double quotation marks. For more information, see Common Format and MIME Type for Comma-Separated Values (CSV) Files .

Source file location

Update the connector source URL to point to your hosted file. The source URL can use http, https, ftp, ftps, or sftp. For http or https sources, choose the request method your server expects:
  • GET if your server returns the file from a standard request.
  • POST if your server requires a POST request.

Source authentication

Select the authentication method for your file:
  • None if the file is public.
  • Basic Auth if the file requires a username and password.

Transformations

Use transformations to add computed attributes or change values before the connector indexes your records. To use a transformed attribute for search, faceting, or ranking, update the relevant index settings, such as searchableAttributes, attributesForFaceting, or customRanking.
Test transformations with repeated task runs. Transformations that read from and write to the same attribute, or extract a value and then delete the source attribute, can produce different results when the task runs again.

Synchronization schedule

After you create a task, you can edit it in the Algolia dashboard to choose when the connector runs:
  • On demand. Run the connector manually.
  • Scheduled. Select a predefined schedule or enter a custom cron expression.

Indexing strategy

You can choose how the connector updates your index. For information about full reindexing, full record updates, and partial record updates, see Data synchronization strategies.

Limitations

This connector is subject to the following limitations:

See also

Last modified on August 5, 2026