Track Acquisition Trends Over Time With the Traffic Breakdown Endpoint

Query acquisition session and conversion counts by date with GET /v1/reports/acquisition/traffic-breakdown. Daily, weekly or monthly buckets broken down by channel or campaign.

Emircan Uye
6 min read
Guides

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:

FieldDescription
dateThe date of the time bucket in YYYY-MM-DD format
sessionsNumber of sessions in that bucket
conversionsNumber of conversions in that bucket
breakdownKeyThe channel name (such as OrganicSearch, PaidSearch, Direct) or campaign value
breakdownKey1Additional breakdown dimension when using campaigns mode with source or medium
breakdownKey2Second 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

ParameterDescription
tenantIdRequired. UUID of the tenant to report on.
sourceIdOptional. UUID of one source of the tenant. Omit to include all sources.
timeframeReporting period: today, yesterday, last7days, last30days or custom. Defaults to today.
startDate, endDateFirst and last day of a custom period, YYYY-MM-DD, inclusive. Required when timeframe=custom.
timezoneIANA time zone name such as Europe/Istanbul. Sets calendar day boundaries. Defaults to Europe/Istanbul.
intervalBucket size: minute, hour, day, week or month. Defaults to day.
attributionModelHow conversions are credited: first_touch, last_touch or last_non_direct_touch. Defaults to the tenant setting.
attributionWindowDaysLookback window: 7, 14 or 30. Defaults to the tenant setting.
conversionEventNamesEvent names counted as conversions. Repeat the parameter or separate with commas. Defaults to the tenant's conversion events.
trafficScopeWhich sessions to include: consented_traffic, unconsented_traffic or all_traffic. Defaults to the tenant setting.
breakdownModeDimension of the breakdown: channels, campaigns, source or medium. Defaults to channels.
campaignsBreakdownModeWith breakdownMode=campaigns, break down by source, medium or both with all. Defaults to all.
aiFocusSet 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 caseEndpoint
Full acquisition report with charts, scorecards and tableGET /v1/reports/acquisition
Traffic table only, with pagination and filteringGET /v1/reports/acquisition/traffic-distribution
Time series of sessions and conversions by channel or campaignGET /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:

  1. Create an API key on the Connections page in Beacon
  2. Note your tenant UUID from the workspace settings
  3. Call GET /v1/reports/acquisition/traffic-breakdown with your key and tenant ID
  4. 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.

Never miss a resource.

Subscribe to our newsletter.

FAQs
5 Questions

Frequently Asked Questions

How the traffic breakdown endpoint in the Hardal Reports API works.

What is the traffic breakdown endpoint?
GET /v1/reports/acquisition/traffic-breakdown returns dated session and conversion counts broken down by channel or campaign. Each row has a date, session count, conversion count and breakdown key naming the channel or campaign.
What interval options are available?
The interval parameter accepts minute, hour, day, week or month. It defaults to day. Invalid values return HTTP 400.
How is this different from traffic distribution?
Traffic breakdown returns time-series data with dates for trend analysis. Traffic distribution returns ranked rows without dates for the current state. Use breakdown when you need to see how traffic changed over time. Use distribution when you need a ranked list of sources.
Which scopes does the endpoint require?
Requests need a Bearer token with the reports:read scope. Create a scoped API key on the Connections page in Beacon.
Can I filter to AI assistant traffic only?
Yes. Set aiFocus to true to include only traffic from AI assistants such as ChatGPT, Perplexity, Gemini, Claude and Copilot.