Hardal is the first-party data and agentic analytics platform. We help enterprises send accurate signals to their ad platforms and grow revenue, using server-side data from their websites, mobile apps and AI agents.
The /v1 Reports API already offers endpoints for the overview report, breakdowns, comparisons, events and funnels. If you wanted to see how acquisition traffic changed over time, broken down by channel or campaign, you had to call the combined acquisition endpoint and extract the time series yourself.
That is no longer necessary. The API now exposes a dedicated endpoint for traffic breakdown: GET /v1/reports/acquisition/traffic-breakdown. It returns dated session and conversion counts in time buckets you choose.
What the endpoint does
The traffic breakdown endpoint returns an array of rows. Each row represents one time bucket for one channel or campaign. The fields are:
| Field | Description |
|---|---|
| date | The date of the time bucket in YYYY-MM-DD format |
| sessions | Number of sessions in that bucket |
| conversions | Number of conversions in that bucket |
| breakdownKey | The channel name (such as OrganicSearch, PaidSearch, Direct) or campaign value |
| breakdownKey1 | Additional breakdown dimension when using campaigns mode with source or medium |
| breakdownKey2 | Second additional breakdown dimension when using campaigns mode with all |
The response is a flat array ordered by date and breakdown key. You get one row per time bucket per dimension value.
Why a separate endpoint
The combined acquisition report returns scorecards, charts, time series and the traffic table in one response. That is useful when you want the full picture. It is not useful when a script only needs the trend data.
Trend analysis. Plot how organic search traffic grew over the past 30 days. Compare paid search conversions week over week. See which channel is gaining or losing share.
Lightweight time series. A BI connector pulling trend data does not need the traffic table or overview metrics. A data warehouse loader building a time series does not need pagination logic.
AI agent context. An agent answering "how did paid search perform this week compared to last week" can call the traffic breakdown endpoint directly. The response fits in context without truncation.
Example request
curl -X GET "https://api.usehardal.com/v1/reports/acquisition/traffic-breakdown?tenantId=YOUR_TENANT_ID&timeframe=last7days&interval=day&breakdownMode=channels" \
-H "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_TENANT_ID with your tenant UUID and YOUR_API_KEY with a key that has the reports:read scope. You can create a key on the Connections page in Beacon.
Example response
{
"success": true,
"data": [
{
"date": "2026-10-01",
"sessions": 208,
"conversions": 5,
"breakdownKey": "Direct"
},
{
"date": "2026-10-01",
"sessions": 156,
"conversions": 5,
"breakdownKey": "OrganicSearch"
},
{
"date": "2026-10-01",
"sessions": 78,
"conversions": 3,
"breakdownKey": "PaidSearch"
},
{
"date": "2026-10-02",
"sessions": 240,
"conversions": 6,
"breakdownKey": "Direct"
},
{
"date": "2026-10-02",
"sessions": 180,
"conversions": 6,
"breakdownKey": "OrganicSearch"
},
{
"date": "2026-10-02",
"sessions": 90,
"conversions": 4,
"breakdownKey": "PaidSearch"
}
],
"timestamp": "2026-11-01T09:30:00.000Z",
"path": "/v1/reports/acquisition/traffic-breakdown",
"requestId": "req_01JD2V8Q9Z6R4XK7T3M5N8P2WA"
}
Each row gives you the date, session count, conversion count and breakdown key. You can pivot the data by date to build a time series chart, or by breakdown key to compare channels over time.
Query parameters
| Parameter | Description |
|---|---|
| tenantId | Required. UUID of the tenant to report on. |
| sourceId | Optional. UUID of one source of the tenant. Omit to include all sources. |
| timeframe | Reporting period: today, yesterday, last7days, last30days or custom. Defaults to today. |
| startDate, endDate | First and last day of a custom period, YYYY-MM-DD, inclusive. Required when timeframe=custom. |
| timezone | IANA time zone name such as Europe/Istanbul. Sets calendar day boundaries. Defaults to Europe/Istanbul. |
| interval | Bucket size: minute, hour, day, week or month. Defaults to day. |
| attributionModel | How conversions are credited: first_touch, last_touch or last_non_direct_touch. Defaults to the tenant setting. |
| attributionWindowDays | Lookback window: 7, 14 or 30. Defaults to the tenant setting. |
| conversionEventNames | Event names counted as conversions. Repeat the parameter or separate with commas. Defaults to the tenant's conversion events. |
| trafficScope | Which sessions to include: consented_traffic, unconsented_traffic or all_traffic. Defaults to the tenant setting. |
| breakdownMode | Dimension of the breakdown: channels, campaigns, source or medium. Defaults to channels. |
| campaignsBreakdownMode | With breakdownMode=campaigns, break down by source, medium or both with all. Defaults to all. |
| aiFocus | Set to true to include only AI assistant traffic. |
If you send an invalid interval value, the API returns HTTP 400 with a validation error.
Breakdown modes
The breakdownMode parameter controls what breakdownKey contains:
channels (default): Each row's breakdownKey is a channel name such as Direct, OrganicSearch, PaidSearch, Referral or OrganicSocial.
campaigns: Each row's breakdownKey is a campaign name. Use campaignsBreakdownMode to control whether the breakdown includes source, medium or both. When set to all, the response includes breakdownKey, breakdownKey1 and breakdownKey2.
source: Shorthand for campaigns broken down by source only.
medium: Shorthand for campaigns broken down by medium only.
When to use each acquisition endpoint
The Reports API now offers three acquisition endpoints. Each serves a different purpose:
| Use case | Endpoint |
|---|---|
| Full acquisition report with charts, scorecards and table | GET /v1/reports/acquisition |
| Traffic table only, with pagination and filtering | GET /v1/reports/acquisition/traffic-distribution |
| Time series of sessions and conversions by channel or campaign | GET /v1/reports/acquisition/traffic-breakdown |
Use the combined acquisition endpoint when you need the full picture: overview metrics, charts, time series and the traffic table in one response. This is what powers the Beacon dashboard.
Use traffic distribution when you need a ranked list of sources with metrics like conversion rate, bounce rate and revenue. It supports pagination, filtering and sorting. Best for syncing the traffic table to a warehouse or for an AI agent checking which sources perform best.
Use traffic breakdown when you need to see how traffic changed over time. It returns dated counts in the interval you choose. Best for trend charts, week-over-week comparisons and time-based analysis.
Authentication
Requests need a Bearer token in the Authorization header. The token must have the reports:read scope.
Create a scoped API key on the Connections page in Beacon. Keys are scoped to specific tenants and shown only once at creation. If a request uses a key that lacks access to the requested tenant, the API returns HTTP 403.
Start using it
If you have a Hardal account with API access, you can call the endpoint today:
- Create an API key on the Connections page in Beacon
- Note your tenant UUID from the workspace settings
- Call
GET /v1/reports/acquisition/traffic-breakdownwith your key and tenant ID - Choose an interval and breakdown mode for your use case
For background on the Reports API and MCP integration, see Connect Claude, ChatGPT, and Codex to Live First-Party Analytics. For how marketing attribution works, including the attribution models this endpoint supports, read the attribution guide.