List events
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuronsearchlab.com/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neuronsearchlab.com/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.neuronsearchlab.com/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": null,
"request_id": null,
"context_id": 101,
"placement": null,
"metadata": {
"context_id": 101
},
"occurred_at": 1777478400,
"created": 1777478405
}
],
"has_more": true,
"next_cursor": "12345",
"url": "/v1/events"
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Events
List events
List ingested events with cursor pagination.
GET
/
v1
/
events
List events
curl --request GET \
--url https://api.neuronsearchlab.com/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.neuronsearchlab.com/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neuronsearchlab.com/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.neuronsearchlab.com/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.neuronsearchlab.com/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": 12345,
"object": "event",
"user_id": "user-abc123",
"item_id": 3187,
"event_id": 42,
"session_id": null,
"request_id": null,
"context_id": 101,
"placement": null,
"metadata": {
"context_id": 101
},
"occurred_at": 1777478400,
"created": 1777478405
}
],
"has_more": true,
"next_cursor": "12345",
"url": "/v1/events"
}{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "Validation error",
"details": {
"fieldErrors": {
"name": [
"Required"
]
}
}
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized_no_client_id_in_jwt",
"message": "Unauthorized: No client ID in JWT"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}List recorded event occurrences. Event-type configuration is separate: use Events in the console or the Platform API to create labels and weights.
Use the filters and pagination below to inspect a user’s or item’s history. A search event can have no item; its query and result IDs describe the search. See Events for the ingestion contract.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Maximum number of resources to return. Defaults to 20 and is capped at 100.
Required range:
1 <= x <= 100Cursor from a previous event list response.
Pattern:
^[1-9][0-9]*$Filter to events recorded for one end-user ID.
Filter to one event type, such as click or purchase.
Was this page helpful?

