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

Before you begin

Make sure you have an Algolia account. Create one for free if you don’t already have one.

Set up the JSON connector

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

Create a JSON connector

Connect the JSON source for the hosted sample product dataset.
  1. Go to the Algolia dashboard and select your Algolia application.
  2. Go to the Connectors page in the Algolia dashboard.
  3. Select the JSON connector and click Connect.
2

Configure the source URL

  1. Select None as your authentication method under Is your data source protected?.
  2. In URL, enter https://dashboard.algolia.com/api/1/sample_datasets?type=apparel.
  3. Select GET as the HTTP Method.
3

Set the unique property identifier

  1. In Unique property identifier, enter objectID.
  2. In Connector name, enter Quickstart products JSON source.
  3. Select Create source.
4

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.
  1. Select Transform using the code editor and replace the placeholder Transformation code with this function:
    JavaScript
  2. Preview the transformation and confirm that the output record includes price_range.
  3. Save the transformation.
5

Create the destination index

Choose the Algolia index where the connector stores the product records.
  1. Under Connect your data to Algolia Search, enter quickstart-products.
    If you enter the name of an existing index, the connector overwrites the records and settings in that index.
  2. Under Index credentials, select Create one for me. To use an existing key, choose one with the addObject, deleteIndex, and editSettings ACLs.
  3. In Name, enter Quickstart products destination.
  4. Select Create destination.
6

Create an on-demand synchronization task

Ensure On demand and Full reindexing are selected.
7

Run the task

  1. Select Create task and then Run.
  2. Wait for the task to finish.
8

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 start the UI steps in that quickstart, configure product_type as a facet for the quickstart-products index.

Index your own JSON data

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

Source file format

Your JSON file must contain an array of JSON objects. For example:
JSON
Each object must include a property with a value that’s unique across all records (id in this example). In the source configuration, set Unique property identifier to that property so the connector can use it as the Algolia objectID.

Source file location

Update the connector source URL to point to your hosted JSON 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 JSON file from a standard request.
  • POST if your server requires a POST request.

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 the transformation to add computed attributes before the connector indexes your records. If you want to search, facet, or rank by a computed attribute, update the relevant index settings, such as searchableAttributes, attributesForFaceting, or customRanking.

Schedule

Choose when the connector fetches your data:
  • On demand. The connector only fetches data when you manually run it from the Algolia dashboard’s Tasks page.
  • Scheduled. The connector runs on a schedule. Select a schedule from the list or enter a custom schedule with a cron expression.

Limitations

This connector is subject to the following limitations:

See also

Last modified on July 7, 2026