Agent analytics
Shopping
Observed shopping results for the selected project and scope.
GET
/api/domains/{host}/agent-analyticsRequest#
GET /api/domains/{host}/agent-analytics?section=shopping
curl --fail-with-body 'https://app.keptai.com/api/domains/example.com/agent-analytics?section=shopping&days=30' \
-H "Authorization: Bearer $KEPT_API_TOKEN"
const response = await fetch(
'https://app.keptai.com/api/domains/example.com/agent-analytics?section=shopping&days=30',
{ headers: { Authorization: `Bearer ${process.env.KEPT_API_TOKEN}` } }
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
import json, os, urllib.request
request = urllib.request.Request(
'https://app.keptai.com/api/domains/example.com/agent-analytics?section=shopping&days=30',
headers={'Authorization': 'Bearer ' + os.environ['KEPT_API_TOKEN']}
)
with urllib.request.urlopen(request) as response:
print(json.load(response))
Parameters#
| Parameter | Values |
|---|---|
| host (path) | Project domain without a scheme or path. |
| section | Use shopping for this page. |
| days | 7, 30, or 90; default 30. |
| engine | Supported engine ID; comma-separated values are supported. |
| topic, category, brand | Optional comma-separated values from scope-options. |
Response and interpretation#
The response is JSON in the shopping section’s application shape. Preserve its structure when building an integration; do not assume it shares a schema with other sections. Use the actual returned data rather than invented example values.
Results depend on the available collected data and selected filters.
See Scope options for valid filters and Authentication for errors.