Algolia Insights API
Events represent user interactions with your app or website. They unlock powerful features, such as recommendations, personalization, smarter search results,…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Events represent user interactions with your app or website.
They unlock powerful features, such as recommendations, personalization, smarter search results,
and analytics that help you optimize your user experience.
Client libraries
Use Algolia's API clients, libraries, and integrations to collect events from your UI and send them to the Insights API.
For more information, see Algolia's ecosystem.
Base URLs
The base URLs for making requests to the Insights API are:
https://insights.us.algolia.iohttps://insights.de.algolia.iohttps//insights.algolia.io(routes requests to the closest of the above servers, based on your geographical location)
All requests must use HTTPS.
Authentication
Add these headers to authenticate requests:
x-algolia-application-id. Your Algolia application ID.x-algolia-api-key. An API key with the necessary permissions to make the request.
The required access control list (ACL) to make a request is listed in each endpoint's reference.
You can find your application ID and API key in the Algolia dashboard.
Request format
Request bodies must be JSON objects.
Response status and errors
Response bodies are JSON objects.
Deleting a user token returns an empty response body with rate-limiting information as headers.
Successful responses return 2xx statuses. Client errors return 4xx statuses. Server errors return 5xx statuses.
Error responses have a message property with more information.
The Insights API doesn't validate if the event parameters such as indexName, objectIDs, or userToken,
correspond to anything in the Search API. It just checks if they're formatted correctly.
Check the Events health section,
whether your events can be used for Algolia features such as Analytics, or Dynamic Re-Ranking.
Version
The current version of the Insights API is version 1, indicated by the /1/ in each endpoint's URL.
Endpoints 7
insights
- GETSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - PUTSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - POSTSend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - DELETESend requests to the Algolia REST API
/:pathThis method lets you send requests to the Algolia REST API. - POSTSend events
/1/eventsSends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB. - DELETEDelete user token events
/1/usertokens/:userTokenDeletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To… - GETSwitch the API key used to authenticate requests
/setClientApiKey?apiKey=stringSwitch the API key used to authenticate requests.
API details
- Base URL
https://insights.{region}.algolia.iohttps://insights.algolia.io- Authentication
- An API key in the x-algolia-application-id header
An API key in the x-algolia-api-key header - Operations
- 7 operations on 4 pathsGET 2POST 2DELETE 2PUT 1
- Main resources
- insights 7
- Response formats
application/jsontext/html- Description format
- OpenAPI 3.0.2, API version
1.0.0 - Links
- Documentation · OpenAPI document
How to test the Algolia Insights API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Algolia Insights API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the x-algolia-application-id header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Send requests to the Algolia REST API” (GET /:path), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Algolia Insights API?
Events represent user interactions with your app or website. They unlock powerful features, such as recommendations, personalization, smarter search results,… It is listed under Developer tools and has 7 endpoints.
Who publishes the Algolia Insights API?
It is listed from Algolia's public API description (an OpenAPI document), not published by Algolia on Swastik Codes. Anyone who controls algolia.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Algolia Insights API?
Its description lists 2 base URLs: https://insights.{region}.algolia.io, https://insights.algolia.io. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the Algolia Insights API?
It accepts 2 methods: an API key in the x-algolia-application-id header; an API key in the x-algolia-api-key header.
How many endpoints does the Algolia Insights API have?
7 operations on 4 paths (2 GET, 2 POST, 2 DELETE, 1 PUT). The largest groups are insights.
Is forking the Algolia Insights API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.