Skip to main content
POST
Search

Description

Returns ranked catalog items for a free-text query. Search uses the Core API data plane at https://api.neuronsearchlab.com/v1/search; it is not a Platform API or console search endpoint. The search request embeds query, retrieves candidates, applies context filters and pipeline configuration, and returns the same recommendation item shape as GET /v1/recommendations.

Request

Response

For backwards-compatible rendering code, the response also includes recommendations with the same result array as data. Responses may include embedding_info, request-level explanation, and per-item explanation fields. Use the returned request_id in downstream events to attribute engagement to the search result set. The official JavaScript and PHP SDKs capture it automatically after search().

Errors

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Request-Id
string<uuid>

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.

X-Session-Id
string

Optional session identifier stored with served search telemetry.

X-Anonymous-Id
string

Optional anonymous identifier stored with served search telemetry when user_id is absent.

X-SDK
string

Optional SDK name stored with served search telemetry.

X-SDK-Version
string

Optional SDK version stored with served search telemetry.

X-Platform
string

Optional client platform stored with served search telemetry.

Body

application/json
query
string
required

Free-text query to embed and retrieve against.

Minimum string length: 1
Example:

"waterproof trail shoes"

user_id
string

End-user identifier for telemetry, personalization context, and attribution.

Example:

"user-abc123"

context_id
string

Numeric console context ID.

Example:

"101"

context_key
string

Context lookup key alias when your integration uses keys instead of numeric IDs.

limit

Number of results to return. Defaults to 20 and is capped at 100.

Required range: 1 <= x <= 100
Example:

"10"

filter

Metadata filter shorthand. Examples: category:footwear, type!=comment, OR:brand:Acme.

Example:
scope
string

JSON-encoded request scope. Today only filters is honored, using objects with column, operator, value, and optional logic.

Example:

"{\"filters\":[{\"column\":\"brand\",\"operator\":\"=\",\"value\":\"Acme\"}]}"

query_retrieval_enabled

Per-request override for query retrieval. Prefer configuring this in the active pipeline.

fusion_method
enum<string>

Semantic/keyword fusion strategy.

Available options:
rrf,
weighted
semantic_weight

Semantic retrieval weight when fusion_method is weighted.

Required range: 0 <= x <= 1
keyword_weight

Keyword retrieval weight when query retrieval is enabled.

Required range: 0 <= x <= 1
keyword_fields

Comma-separated fields or array of fields for keyword matching.

Example:

"name,description,category"

request_id
string<uuid>

Optional stable request ID for retries and attribution. Prefer the X-Request-Id header.

Response

Search results fetched.

object
enum<string>
required
Available options:
list
request_id
string<uuid>
required
url
string
required
Example:

"/v1/search"

data
object[]
required
recommendations
object[]
required
has_more
boolean
required
next_cursor
string | null
required
limit
integer
required
Required range: 1 <= x <= 100
quantity
integer
required
Required range: x >= 0
processing_time_ms
integer
required
Required range: x >= 0
mode
enum<string>
required
Available options:
single,
auto
query
string
required
Example:

"waterproof trail shoes"

message
string
Example:

"Search results fetched"

embedding_info
object
cold_start_fallback_used
boolean
explanation
object
excluded_viewed_items
object | null
section
object | null
done
boolean

Present in auto mode.

experiments
object[]
user_segments
string[]
pipeline_id
integer | null