Skip to main content
Version: 202607

Get data analysis by traffic channel

POST 

/openapi/2026-07/data-analysis/traffic-channel

Retrieve traffic channel analytics grouped by traffic type and traffic channel, including visiting users, sales, orders and each of their shares of the grand total.

Request

Bodyrequired

    begin_timestringrequired

    Start time, a Unix timestamp in seconds passed as a string, e.g. "1748736000"

    end_timestringrequired

    End time, a Unix timestamp in seconds passed as a string, e.g. "1781481600". Should be greater than begin_time

    dimensionsstring[]required

    Dimensions to group by. Supported values:

    • last_referrer_first_show: Traffic type (first-level channel)
    • last_referrer_show: Traffic channel (second-level channel)
    metricsstring[]required

    Metrics to query. Supported values:

    • uv: Number of visiting users
    • sales: Sales amount
    • orders: Number of orders
    • uv_rate: Share of visiting users against the grand total
    • sales_rate: Share of sales against the grand total
    • orders_rate: Share of orders against the grand total
    time_zoneint32

    Notice: Values outside the range -12 to 14 might lead to unexpected results in time-based calculations. Time zone offset (in hours) used for analysis. Recommended range: -12 to 14

    cursorstring

    Cursor for pagination

    page_sizeint32

    Page size for pagination

    Default value: 10
    sort_bystring

    Field to sort by. Must be one of the requested metrics; uv_rate, sales_rate and orders_rate sort by their underlying raw values

    sort_directionstring

    Sorting direction: asc (ascending) or desc (descending)

    has_summaryboolean

    Whether to return the summary grand-total row

    filtersstring

    Dimension filter conditions as a JSON string, keyed by dimension name: {"<dimension>": {"operator": "<operator>", "value": <value>}} The value type to send depends on the operator (operators are case-insensitive):

    • in, not in -> value is an ARRAY, e.g. ["Social"]. A scalar will NOT match, so always send an array for these operators.
    • like, not like -> value is a STRING, e.g. "google"
    • =, >, >=, <, <= -> value is a SCALAR (string or number) Supported keys are the two dimensions: last_referrer_first_show and last_referrer_show; entries are combined with AND. Unknown keys or unsupported operators are silently ignored, so a filter "not taking effect" usually means a mistyped key/operator. Valid dimension values are the ones returned by the traffic channel options endpoint. e.g. {"last_referrer_first_show": {"operator": "in", "value": ["Social"]}, "last_referrer_show": {"operator": "in", "value": ["Facebook", "TikTok"]}}
    filter_crawler_typestring

    Crawler-filtering policy that controls whether bot/crawler traffic is excluded from the statistics. Values:

    • no_filter_crawler: do not filter; count all traffic (default)
    • official_crawler: exclude known crawlers/bots

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    countint32

    Total number of dimension combinations (pagination total)

    last_updated_atstring

    Latest statistics update time, e.g. "2026-03-26T00:00:00Z"

    cursorstring

    Cursor for pagination

    has_moreboolean

    Whether there are more records

    data object[]

    List of traffic channel report rows

  • Array [
  • last_referrer_first_showstring

    Traffic type (first-level channel), e.g. "Social". Returned when last_referrer_first_show is requested in dimensions

    last_referrer_showstring

    Traffic channel (second-level channel), e.g. "Facebook". Returned when last_referrer_show is requested in dimensions

    uvstring

    Number of visiting users, formatted string with thousands separators, e.g. "1,234"

    uv_originalint64

    Number of visiting users, numeric value

    salesstring

    Sales amount, formatted string with thousands separators, e.g. "5,678.90"

    sales_originaldouble

    Sales amount, numeric value

    ordersstring

    Number of orders, formatted string with thousands separators, e.g. "89"

    orders_originalint64

    Number of orders, numeric value

    uv_ratestring

    Share of visiting users against the grand total, formatted string, e.g. "45.6%"

    uv_rate_originaldouble

    Share of visiting users against the grand total, numeric value, e.g. 45.6 (represents 45.6%)

    sales_ratestring

    Share of sales against the grand total, formatted string, e.g. "32.1%"

    sales_rate_originaldouble

    Share of sales against the grand total, numeric value, e.g. 32.1 (represents 32.1%)

    orders_ratestring

    Share of orders against the grand total, formatted string, e.g. "28.7%"

    orders_rate_originaldouble

    Share of orders against the grand total, numeric value, e.g. 28.7 (represents 28.7%)

  • ]
  • summary object

    Grand-total row, returned when has_summary is true

    last_referrer_first_showstring

    Traffic type (first-level channel), e.g. "Social". Returned when last_referrer_first_show is requested in dimensions

    last_referrer_showstring

    Traffic channel (second-level channel), e.g. "Facebook". Returned when last_referrer_show is requested in dimensions

    uvstring

    Number of visiting users, formatted string with thousands separators, e.g. "1,234"

    uv_originalint64

    Number of visiting users, numeric value

    salesstring

    Sales amount, formatted string with thousands separators, e.g. "5,678.90"

    sales_originaldouble

    Sales amount, numeric value

    ordersstring

    Number of orders, formatted string with thousands separators, e.g. "89"

    orders_originalint64

    Number of orders, numeric value

    uv_ratestring

    Share of visiting users against the grand total, formatted string, e.g. "45.6%"

    uv_rate_originaldouble

    Share of visiting users against the grand total, numeric value, e.g. 45.6 (represents 45.6%)

    sales_ratestring

    Share of sales against the grand total, formatted string, e.g. "32.1%"

    sales_rate_originaldouble

    Share of sales against the grand total, numeric value, e.g. 32.1 (represents 32.1%)

    orders_ratestring

    Share of orders against the grand total, formatted string, e.g. "28.7%"

    orders_rate_originaldouble

    Share of orders against the grand total, numeric value, e.g. 28.7 (represents 28.7%)