Get recommendations
Retrieve personalized recommendations.
Documentation Index
Fetch the complete documentation index at: https://docs.neuronsearchlab.com/llms.txt
Use this file to discover all available pages before exploring further.
Description
Returns ranked recommendation objects for a user or item. Passcontext_id when the request should use a context configured in the console.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | no | End-user identifier. Falls back to the token subject when omitted. |
context_id | string | no | Numeric console context ID such as 101. Legacy ctx_ aliases such as ctx_101 are also accepted. |
limit | integer | no | Number of recommendations to return. Defaults to 20, maximum 100. |
starting_after | string | no | Cursor from the previous page. Accepts a recommendation ID or item ID. |
entity_type | string | no | User or Item. Defaults to User. |
name | string | no | Overrides the saved embedding display name. |
description | string | no | Overrides the saved embedding description. |
filter | string | no | Metadata filter shorthand. Repeat to combine filters. |
filters | string | no | Alias for repeated filter query parameters. |
scope | string | no | JSON-encoded request scope, currently honoring filters. |
mode | string | no | single or auto. Defaults to single. |
cursor | string | no | Auto-mode cursor from a previous response. |
window_days | integer | no | Auto-mode recent activity lookback. Defaults to 14. |
candidate_limit | integer | no | Auto-mode anchor candidate count. Defaults to 50. |
served_cap | integer | no | Auto-mode served-section cursor cap. Defaults to 50. |
request_id | string | no | Stable request ID for attribution. Prefer the X-Request-Id header. |
session_id | string | no | Session identifier for served-recommendation telemetry. |
anonymous_id | string | no | Anonymous identifier for served-recommendation telemetry. |
quantity remains accepted as a legacy alias for limit.
Response
recommendations field with the same result array. When a context enables grouping, data and recommendations contain grouped recommendation aggregates. Responses also include embedding_info, request-level explanation, and per-item explanation fields when available.
Errors
| Status | Scenario |
|---|---|
400 | Validation failed, malformed filter, or malformed pagination cursor |
401 | Missing/invalid access token or tenant resolution failed |
403 | Token does not include neuronsearchlab-api/read |
500 | Unexpected recommendation, database, or model-serving failure |
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Optional stable request ID for retries and downstream event attribution. The same ID is returned in the response body and X-Request-Id response header.
Optional session identifier stored with served-recommendation telemetry.
Optional anonymous identifier stored with served-recommendation telemetry when user_id is absent.
Optional SDK name stored with served-recommendation telemetry.
Optional SDK version stored with served-recommendation telemetry.
Optional client platform stored with served-recommendation telemetry.
Query Parameters
End-user identifier to personalize for. When omitted, the API falls back to the token subject.
Numeric console context ID. Legacy ctx_ aliases such as ctx_101 are also accepted.
Maximum number of recommendations to return. Defaults to 20 and is capped at 100.
1 <= x <= 100Legacy alias for limit.
1 <= x <= 100Cursor from the previous page. Accepts a recommendation ID, item ID, or raw item entity ID.
Entity type for personalization. Defaults to User.
User, Item Optional display name override for the request entity.
Optional description override for the request entity.
Recommendation serving mode. auto chooses the next section from recent user activity and returns an auto cursor.
single, auto Auto-mode cursor returned by a previous response.
Auto-mode activity lookback window in days. Defaults to 14.
x >= 1Auto-mode maximum number of recent activity anchors to evaluate. Defaults to 50.
x >= 1Auto-mode maximum number of served section keys retained in the cursor. Defaults to 50.
x >= 1JSON-encoded request scope. Today only filters is honored, using objects with column, operator, value, and optional logic.
Metadata filter shorthand. Repeat the parameter to combine multiple filters. Examples: category:electronics, type!=comment, OR:brand:Acme.
Alias for repeated filter query parameters.
Optional stable request ID. Prefer the X-Request-Id header when possible.
CamelCase alias for request_id.
Optional session identifier. Prefer the X-Session-Id header when possible.
CamelCase alias for session_id.
Optional anonymous identifier. Prefer the X-Anonymous-Id header when possible.
CamelCase alias for anonymous_id.
Response
Recommendation list
list "/v1/recommendations"
- Option 1
- Option 2
- Option 1
- Option 2
1 <= x <= 100x >= 0x >= 0single, auto "Recommendations fetched"
Present in auto mode.

