All endpoints are protected by Bearer token authentication managed by NeuronSearchLab. Make sure you obtain a valid access token via the
/auth/token endpoint before making requests.Base URL
Endpoints Overview
Below is a summary of available endpoints in the NeuronSearchLab API:🔐 Authentication
POST /auth/token
Obtain a bearer token for authenticating future requests. Pass Content-Type: application/json in the header and required credentials in the body (details will depend on how your NeuronSearchLab account is configured).
📦 Items
POST /items
Submit or update items to be used in recommendations. Each item can contain metadata, embeddings, and identifiers.
Authentication Scope: neuronsearchlab-api/write
📊 Events
POST /events
Submit user events (e.g. clicks, views, likes). Events are stored and used for personalization.
Authentication Scope: neuronsearchlab-api/write
🎯 Recommendations
GET /recommendations
Fetch personalized or context-aware recommendations for a user. You can pass a numeric context_id, user identifiers, or other parameters to tailor the output.
Authentication Scope: neuronsearchlab-api/read
CORS Support
Each endpoint supportsOPTIONS requests for CORS preflight. These include headers:
Access-Control-Allow-OriginAccess-Control-Allow-MethodsAccess-Control-Allow-Headers
Authentication
All protected endpoints require a valid Bearer token in theAuthorization header:
neuronsearchlab-api/readneuronsearchlab-api/write

