Skip to main content
Fetch lets you enrich your Algolia data directly within a code transformation. Use a JavaScript function in your transformation to retrieve data from third-party APIs. Using Fetch affects your record ingestion rate. Each Fetch request must complete within and its response can be at most . Use third-party APIs that consistently respond within the Fetch timeout.
This feature isn’t available on every plan. Refer to your pricing plan to see if it’s included.

Create a code transformation

  1. Go to the Algolia dashboard and select your Algolia .
  2. On the left sidebar, select Data sources.
  3. Open the Connectors page.
  4. Select a connector and click Connect to start creating your task.
  5. Create a new source or select an existing one.
  6. To create a transformation function, click Create transformation.

Retrieve and store secrets

External APIs may require credentials such as an API key, a username and password, or an OAuth access token. You can store these credentials as a secret and reference them in your transformation code.
  1. Obtain an API key or other required credentials from the third-party provider.
  2. In your code transformation, click Secret.
  3. Paste the API key or credentials, enter a name for the secret, then click Add.
You can now add the secret to your transformation function.
JavaScript
Replace SECRET_NAME with the name you assigned to the secret.

Use Fetch helper functions

  1. Click Helper Functions.
  2. Select Fetch / API.
  3. Select a helper and click Add.
Choose a predefined helper for a listed service, or use a generic Fetch helper to call another API.

Predefined third-party APIs

Generic Fetch helpers

These functions let you connect to a service with an API. They support the following authentication methods:
There’s a timeout and response size limit on all transformations that include Fetch requests.
Last modified on November 23, 2026