Traffic Distribution Now Has Its Own Reports API Endpoint

Query the acquisition traffic distribution table directly with GET /v1/reports/acquisition/traffic-distribution. Smaller payloads, built-in pagination, optional daily breakdown and simpler scripts for BI tools, warehouses and AI agents.

Emircan Uye
7 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 only the acquisition traffic distribution table, you had to call the combined acquisition endpoint and discard everything else.

That is no longer necessary. The API now exposes a dedicated endpoint for traffic distribution: GET /v1/reports/acquisition/traffic-distribution. It returns only the table rows you need, with built-in pagination, grouping, filtering and sorting.

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 to paginate through traffic rows.

Lighter payloads. A BI connector that syncs the traffic table does not need chart data. A data warehouse loader pulling every row does not need the overview metrics repeated on each page.

Simpler scripts. A Python function or Node automation can call the table endpoint, page through results with offset, and stop when total is reached. No need to parse a nested response structure.

Better fit for AI agents. An agent checking which sources drove conversions yesterday can call the traffic endpoint directly. The response is small enough to fit in context without truncation.

What the endpoint returns

Each row in the response represents one traffic source combination. Fields include:

FieldDescription
sourceThe traffic source, such as google or partner.example
mediumThe medium, such as organic, cpc or referral
campaignThe campaign name, if present
channelThe classified channel, such as OrganicSearch, PaidSearch or Direct
sessionsTotal sessions attributed to this row
conversionsTotal conversions
conversion_rateConversions divided by sessions
bounce_rateSessions with only one page view
revenueTotal revenue in the tenant's reporting currency
revenue_per_conversionAverage revenue per conversion
eventCountsAn object with counts for any custom event metrics you requested

The response also includes:

  • pagination with limit, offset and total
  • groupBy showing the current grouping level
  • sort showing the sort column and direction
  • columns listing the returned fields
  • eventMetrics listing any custom event metric names

Example request

curl -X GET "https://api.usehardal.com/v1/reports/acquisition/traffic-distribution?tenantId=YOUR_TENANT_ID&timeframe=last30days&limit=25&offset=0" \
  -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": {
    "rows": [
      {
        "source": "direct",
        "medium": "",
        "campaign": "",
        "channel": "Direct",
        "sessions": 1680,
        "conversions": 40,
        "conversion_rate": 0.0238,
        "bounce_rate": 0.44,
        "revenue": 3000,
        "revenue_per_conversion": 75,
        "eventCounts": {}
      },
      {
        "source": "google",
        "medium": "organic",
        "campaign": "",
        "channel": "OrganicSearch",
        "sessions": 1260,
        "conversions": 40,
        "conversion_rate": 0.0317,
        "bounce_rate": 0.38,
        "revenue": 3000,
        "revenue_per_conversion": 75,
        "eventCounts": {}
      }
    ],
    "pagination": {
      "limit": 25,
      "offset": 0,
      "total": 5
    },
    "groupBy": "none",
    "sort": {
      "sortBy": "sessions",
      "sortDirection": "desc"
    }
  }
}

Query parameters

The endpoint accepts the same query parameters as the combined acquisition endpoint, minus the chart and time series options:

ParameterDescription
tenantIdRequired. UUID of the tenant to report on.
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. Defaults to Europe/Istanbul.
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.
eventMetricNamesUp to 10 event names to count per row, returned in eventCounts.
trafficScopeWhich sessions to include: consented_traffic, unconsented_traffic or all_traffic.
groupByGroup rows by one dimension: source, medium, campaign, channel or none. Defaults to none.
filterFieldColumn to filter by: source, medium, campaign or channel. Requires filterValue.
filterValueText to match in filterField. Case-insensitive partial match.
sortByColumn to sort by. Defaults to sessions.
sortDirectionasc or desc. Defaults to desc.
limitMaximum rows to return, 1 to 500. Defaults to 50.
offsetRows to skip, 0 to 10000. Defaults to 0.
aiFocusSet to true to include only AI assistant traffic.
dailyBreakdownSet to true to return one row per day per grouping instead of period totals. Adds a date field (YYYY-MM-DD) to each row. Limited to 30 calendar days.

If you send filterField without filterValue, the API returns HTTP 400 with error code acquisition-filter-incomplete.

Daily breakdown for trend analysis

Period totals are useful for scorecard metrics, but sometimes you need to see how traffic evolved day by day. Set dailyBreakdown=true to receive one row per day per grouping instead of aggregated totals.

Why it matters. A weekly total can hide mid-week dips or weekend spikes. Daily data lets a BI dashboard plot a time series, a script detect anomalies, or an AI agent compare weekday versus weekend performance. Because the rows are already grouped and paginated, you can build a trend chart without post-processing a large aggregate response.

How it works. Each row gains a date field in YYYY-MM-DD format, expressed in the report time zone. Rows sort by date ascending, then by the requested sort column, then by dimensions. Pagination totals count date-plus-grouping pairs, so a 7-day request grouped by channel with 5 channels can return up to 35 rows.

Attribution semantics. Sessions are counted on the day the session started. Conversions and revenue are counted on the day the conversion occurred. Because a visitor can start a session on Monday and convert on Tuesday, a row can show conversions with zero sessions. In that case, conversion_rate is 0.

30-day limit. Daily mode accepts at most 30 calendar days inclusive. Longer ranges return HTTP 400. If you need more history, page through consecutive 30-day windows.

Sparse rows. Days with no data for a grouping are omitted. If Paid Search had no sessions or conversions on a particular day, that date-channel pair does not appear in the response.

Example request

curl -X GET "https://api.usehardal.com/v1/reports/acquisition/traffic-distribution?tenantId=YOUR_TENANT_ID&timeframe=custom&startDate=2026-10-01&endDate=2026-10-07&timezone=Europe/Istanbul&groupBy=channel&dailyBreakdown=true&limit=10&columns=channel,sessions,conversions,conversion_rate" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "success": true,
  "data": {
    "rows": [
      {
        "date": "2026-10-01",
        "channel": "PaidSearch",
        "sessions": 1,
        "conversions": 0,
        "conversion_rate": 0,
        "eventCounts": {}
      },
      {
        "date": "2026-10-02",
        "channel": "PaidSearch",
        "sessions": 0,
        "conversions": 1,
        "conversion_rate": 0,
        "eventCounts": {}
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "total": 2
    },
    "groupBy": "channel",
    "sort": {
      "sortBy": "sessions",
      "sortDirection": "desc"
    }
  }
}

The second row has zero sessions but one conversion: the visitor started a session on 1 October and converted on 2 October. The conversion appears on the conversion day, not the session day.

This feature is rolling out shortly. Existing integrations that omit dailyBreakdown or set it to false continue to receive period totals and are unaffected.

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 with error code tenant-not-granted.

When to use each endpoint

Use caseEndpoint
Full acquisition report with charts and scorecardsGET /v1/reports/acquisition
Traffic table only, with paginationGET /v1/reports/acquisition/traffic-distribution
Syncing all rows to a warehouseTraffic distribution with paging
AI agent checking top sourcesTraffic distribution with low limit
Day-by-day trend analysisTraffic distribution with dailyBreakdown=true
Dashboard embedding the full viewCombined acquisition

The existing dashboard and API contract

The new endpoint does not change the combined acquisition report or the Beacon dashboard. If you already call /v1/reports/acquisition, that endpoint continues to work and returns the same response shape.

The traffic distribution data in the new endpoint matches the trafficDistribution part of the combined report. If you filter and sort the same way, the rows are identical.

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-distribution with your key and tenant ID
  4. Page through results using offset and limit

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
6 Questions

Frequently Asked Questions

How the new traffic distribution endpoint in the Hardal Reports API works.

What is the traffic distribution endpoint?
GET /v1/reports/acquisition/traffic-distribution returns only the paginated acquisition table rows. It is a focused alternative to the combined acquisition report when you need just the traffic breakdown.
What does each row contain?
Rows include source, medium, campaign, channel, sessions, conversions, conversion_rate, bounce_rate, revenue, revenue_per_conversion and an eventCounts object for any custom event metrics you request.
How is pagination handled?
The response includes a pagination object with limit, offset and total. You can page through results using the limit and offset query parameters.
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 and sort the results?
Yes. Use filterField and filterValue to filter by source, medium, campaign or channel. Use sortBy and sortDirection to sort by any column. Use groupBy to aggregate rows.
Can I get daily data instead of period totals?
Yes. Set dailyBreakdown=true to receive one row per day per grouping. Daily mode is limited to 30 calendar days. Sessions count on session start day; conversions and revenue count on conversion day.