Search
Perform semantic searches on your product catalog.
Endpoint
POST /api/search
Headers
| Header | Required | Description |
|---|---|---|
X-Widget-Token | Yes | Authentication token |
Content-Type | Yes | application/json |
Request body
{
"query": "running shoes",
"limit": 20,
"offset": 0,
"filters": {
"categories": ["sports"],
"brands": ["Nike", "Adidas"],
"priceMin": 50,
"priceMax": 200,
"inStock": true
}
}
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search term |
limit | number | No | Results per page (default: 20, max: 100) |
offset | number | No | Offset for pagination |
filters | object | No | Filters to apply |
Available filters
| Filter | Type | Description |
|---|---|---|
categories | string[] | Filter by categories |
brands | string[] | Filter by brands |
tags | string[] | Filter by tags |
priceMin | number | Minimum price |
priceMax | number | Maximum price |
inStock | boolean | Only available products |
onSale | boolean | Only products on sale |
Response
{
"query": "running shoes",
"results": [
{
"id": "prod_123",
"shopId": "shop_456",
"name": "Nike Air Max 90",
"description": "Classic running shoes",
"price": 129.99,
"salePrice": 99.99,
"currency": "USD",
"url": "https://store.com/nike-air-max-90",
"imageUrl": "https://store.com/images/nike-air-max-90.jpg",
"categories": ["sports", "shoes"],
"brands": ["Nike"],
"tags": ["running", "casual"],
"inStock": true,
"score": 0.95
}
],
"total": 150,
"searchLogId": "log_abc123",
"queryTimeMs": 45,
"availableFilters": {
"priceRange": {
"min": 29.99,
"max": 299.99
},
"brands": [
{ "brand": "Nike", "count": 45 },
{ "brand": "Adidas", "count": 38 }
],
"categories": [
{ "category": "shoes", "count": 120 }
]
},
"guidedFilters": [
{
"id": "filter_1",
"question": "What type of terrain?",
"type": "SINGLE_CHOICE",
"options": [
{ "label": "Road", "filter": { "tags": ["road"] }, "count": 80 },
{ "label": "Trail", "filter": { "tags": ["trail"] }, "count": 40 }
]
}
],
"aiResponse": "I found 150 running shoes. I recommend filtering by terrain type to find the most suitable ones."
}
Example
curl -X POST https://api.neuroon.ai/api/search \
-H "X-Widget-Token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "running shoes",
"limit": 10,
"filters": {
"priceMax": 150,
"inStock": true
}
}'
Notes
- Results are sorted by semantic relevance (score)
- The
scorefield indicates similarity (0-1, higher is better) guidedFiltersare AI-suggested filters based on intentaiResponseis an AI-generated response (requires Growth+ plan)