Brand_website_traffic
Website traffic for a brand over a window, with a comparison window and a per-channel breakdown. The window is either the last `days` days (default 30, up to 730) or an explicit `start`/`end` range. `compare` chooses what `previous` measures against: the preceding equal-length window, or the same calendar dates a year earlier. Read `hasFullPriorWindow` before reporting any delta. It answers whether we hold the whole comparison window, and it is the only thing separating 'traffic fell' from 'our history does not reach that far' -- which look identical in the numbers. `comparison.weekdayAligned` is false for a year-on-year window, where part of any short-window difference is weekday drift rather than traffic. Session-grain, so `sessions` is a true site total. `users` is not offered: no honest user total exists at this grain. `keyEventsPerSession` counts events per session and is NOT a rate, so it can exceed 1. Requires website analytics (included on every paid plan) and a connected Google Analytics property.
/api/brands/{brand_id}/traffic/Personal Access Token (create one from Settings -> API Keys in the dashboard). Send as Authorization: Bearer gr_live_.... An X-API-Key: gr_live_... header (see the apiKeyAuth scheme) is accepted as an equivalent alternative — send ONE of the two, not both.
In: header
Path Parameters
Query Parameters
What previous is measured against. previous (default) is the equal-length window immediately before this one. year is the same calendar dates one year earlier. Check hasFullPriorWindow before reading any year delta: most properties do not have a full prior year on record, and the difference between 'traffic halved' and 'our history starts in July' is not visible in the numbers alone.
Value in
- "previous"
- "year"
Window length in days, 1 to 730. Default 30. previous is always the same length by construction, so a delta is never a trend manufactured out of whatever history happens to exist. Ignored when start and end are both given.
Last day of a custom range, inclusive, as YYYY-MM-DD.
First day of a custom range, as YYYY-MM-DD. Must be sent together with end; one without the other is a 400 rather than a guess at which of the two meanings you wanted.
Response Body
application/json
curl -X GET "https://example.com/api/brands/0/traffic/"{ "brandId": 0, "connected": true, "propertyLabel": "string", "propertyTimezone": "string", "lastSyncedAt": "2019-08-24T14:15:22Z", "windowDays": 0, "windowStart": "2019-08-24", "windowEnd": "2019-08-24", "earliestDate": "2019-08-24", "hasFullPriorWindow": true, "comparison": { "mode": "string", "start": "2019-08-24", "end": "2019-08-24", "weekdayAligned": true }, "current": { "sessions": 0, "engagedSessions": 0, "aiSessions": 0, "conversions": 0.1, "engagementRate": 0, "keyEventsPerSession": 0 }, "previous": { "sessions": 0, "engagedSessions": 0, "aiSessions": 0, "conversions": 0.1, "engagementRate": 0, "keyEventsPerSession": 0 }, "channels": [ { "channel": "string", "sessions": 0, "engagedSessions": 0, "conversions": 0.1 } ]}Brand score history GET
Score-over-time trend points for the brand (per-prompt mean across all eligible prompts, same methodology as the brand detail's `averageScore`), plus a windowed hero delta over the same range.
List a brand's categories GET
GET /api/brands/:brandId/categories/ POST /api/brands/:brandId/categories/ Nested under brand. Demo-public brand (id=9) allows unauthenticated GET; POST is always authed + non-demo.