Get recommendations
curl --request GET \
--url https://api.neuronsearchlab.com/v1/recommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/recommendations"
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/recommendations', 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/recommendations",
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/recommendations"
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/recommendations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/recommendations")
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",
"message": "Recommendations fetched",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"url": "/v1/recommendations",
"data": [
{
"id": 3187,
"object": "recommendation",
"item_id": 3187,
"rank": 1,
"score": 0.94,
"item": {
"id": 3187,
"object": "item",
"name": "Wireless Headphones",
"description": "Noise-cancelling Bluetooth headphones.",
"metadata": {
"category": "electronics"
}
},
"explanation": {
"summary": "Ranked by vector similarity to the user's stored profile embedding.",
"shown_because": [
"Ranked by vector similarity to the user's stored profile embedding."
]
}
}
],
"has_more": false,
"next_cursor": null,
"limit": 10,
"embedding_info": {
"source": "db",
"used_default": false,
"default_reason": null,
"dimension": 64,
"expected_dimension": 64
},
"cold_start_fallback_used": false,
"explanation": {
"scope": "request",
"note": "Each recommendation item includes its own explanation object with source, score, pipeline, rules, experiments, and context."
},
"recommendations": [],
"quantity": 1,
"excluded_viewed_items": null,
"processing_time_ms": 182,
"mode": "single"
}Recommendations
Get recommendations
Retrieve personalized recommendations.
GET
/
v1
/
recommendations
Get recommendations
curl --request GET \
--url https://api.neuronsearchlab.com/v1/recommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.neuronsearchlab.com/v1/recommendations"
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/recommendations', 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/recommendations",
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/recommendations"
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/recommendations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neuronsearchlab.com/v1/recommendations")
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",
"message": "Recommendations fetched",
"request_id": "c7f0d2bb-56b1-4ca7-8f09-84d8e4ed02b4",
"url": "/v1/recommendations",
"data": [
{
"id": 3187,
"object": "recommendation",
"item_id": 3187,
"rank": 1,
"score": 0.94,
"item": {
"id": 3187,
"object": "item",
"name": "Wireless Headphones",
"description": "Noise-cancelling Bluetooth headphones.",
"metadata": {
"category": "electronics"
}
},
"explanation": {
"summary": "Ranked by vector similarity to the user's stored profile embedding.",
"shown_because": [
"Ranked by vector similarity to the user's stored profile embedding."
]
}
}
],
"has_more": false,
"next_cursor": null,
"limit": 10,
"embedding_info": {
"source": "db",
"used_default": false,
"default_reason": null,
"dimension": 64,
"expected_dimension": 64
},
"cold_start_fallback_used": false,
"explanation": {
"scope": "request",
"note": "Each recommendation item includes its own explanation object with source, score, pipeline, rules, experiments, and context."
},
"recommendations": [],
"quantity": 1,
"excluded_viewed_items": null,
"processing_time_ms": 182,
"mode": "single"
}Fetch a ranked list for an application user and a context. Send the user’s stable ID explicitly so different visitors do not share the credential’s fallback identity.
GET /v1/recommendations?user_id=user-123&context_id=101&limit=10
Use the response
Readdata for the ranked results and keep request_id with the rendered list. Send that ID with subsequent clicks or purchases to preserve attribution. recommendations is a compatibility alias for the same results. Item identifiers are integers.
If the context enables item grouping, the result contains group aggregates rather than a flat item list. This is different from context groups, which coordinate several rails.
For ordinary pagination, use the returned continuation value with starting_after. For auto sections, use mode=auto and the returned next_cursor as cursor; stop when done is true or no next cursor is available.
The optional search_intent and explanation fields describe signals that contributed to the ranking. See search signals and Explainability to interpret them.
See Recommendations for similar-item rails, baskets, anonymous users and filtering. Use the batch endpoint for several rails on one page.Authorizations
Headers
Query Parameters
Response
Recommendation list
Was this page helpful?

