Analytics
Access search metrics and statistics.
Metrics summary
GET /api/shops/{shopId}/analytics/summary
Headers
X-Shop-API-Key: YOUR_API_KEY
Query params
| Param | Type | Description |
|---|---|---|
from | string | Start date (ISO 8601) |
to | string | End date (ISO 8601) |
Response
{
"period": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-31T23:59:59Z"
},
"totalSearches": 15420,
"totalClicks": 4326,
"ctr": 28.05,
"uniqueUsers": 8540,
"avgQueryLength": 3.2
}
Top searches
GET /api/shops/{shopId}/analytics/top-queries
Query params
| Param | Type | Description |
|---|---|---|
from | string | Start date |
to | string | End date |
limit | number | Number of results (default: 10) |
Response
{
"queries": [
{
"query": "running shoes",
"count": 542,
"clicks": 187,
"ctr": 34.5
},
{
"query": "nike shirts",
"count": 328,
"clicks": 95,
"ctr": 28.9
}
]
}
Top products
GET /api/shops/{shopId}/analytics/top-products
Response
{
"products": [
{
"productId": "prod_123",
"name": "Nike Air Max 90",
"views": 1250,
"clicks": 342,
"ctr": 27.4
}
]
}
Zero-result searches
GET /api/shops/{shopId}/analytics/zero-results
Identify what users are searching for but not finding.
Response
{
"queries": [
{
"query": "red hoodie",
"count": 45,
"lastSearched": "2024-01-15T14:30:00Z"
}
]
}
Example
# Get last month's summary
curl -X GET "https://api.neuroon.ai/api/shops/shop_123/analytics/summary?from=2024-01-01&to=2024-01-31" \
-H "X-Shop-API-Key: sk_live_abc123"
Notes
- Data is updated every hour
- Historical data available according to your plan
- For real-time analytics, contact sales