Guides / Sending and managing data / Send and update your data / Connectors

The JSON connector lets you read objects from a JSON file and store them in an Algolia index.

The connector imports a single array of JSON objects as records. Each record must have a unique identifier to be used as the object ID in Algolia.

In the following example, userID could serve as the object ID.

1
2
3
4
5
6
7
8
9
10
11
12
[
  {
    "userID": 1001,
    "firstName": "Marianne",
    "lastName": "Neal"
  },
  {
    "userID": 1002,
    "firstName": "Austin",
    "lastName": "Wolfe"
  }
]

Configure your data source

  1. Open the Connectors page in the Algolia dashboard.
  2. Select the JSON connector and click Connect.
  3. Click Get started.
  4. Select the authentication method:
    • None if the file is public.
    • Basic Auth if you need a username and password to access the file.
  5. Enter the FTP or HTTP URL to your JSON file. For HTTP URLs, you can further select whether to fetch the JSON file with a GET or a POST request. This depends on your server.
  6. In the Unique property identifier field, enter the property of your JSON objects that should serve as unique identifiers for your Algolia records (objectID).
  7. Enter a name for the source. This helps you distinguish between different sources.
  8. Click Create source.

Configure your data source

Configure your destination

  1. Create a new Algolia API key or select an existing one for indexing your data.
  2. Enter an index name, where the connector should store the records. If you enter a name of an existing index, it’ll be overwritten.
  3. Enter a name for the destination. This helps you distinguish between different destinations.
  4. Click Create destination.

Configure your destination

Configure your task

  1. Select when the connector should fetch your data:
    • On demand. The connector only fetches data if you manually run it from the Tasks.
    • Scheduled. The connector runs on a schedule. You can select a schedule from the list, or enter a custom schedule with a cron expression.
  2. Click Create task.

Configure your task

Manage your task

To see the status of your tasks, run them, deactivate them, or delete them, go to the Tasks in the Algolia dashboard.

Did you find this page helpful?