**Version: 202701**

# Get data analysis by traffic channel

**POST** `/openapi/2027-01/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

**application/json**

**Body | Example**

**Body (required)**

- `begin_time` string (required)

  Start time, a Unix timestamp in seconds passed as a string, e.g. "1748736000"
- `end_time` string (required)

  End time, a Unix timestamp in seconds passed as a string, e.g. "1781481600". Should be greater than begin\_time
- `dimensions` string[] (required)

  Dimensions to group by. Supported values:

  *   `last_referrer_first_show`: Traffic type (first-level channel)
  *   `last_referrer_show`: Traffic channel (second-level channel)
- `metrics` string[] (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_zone` int32

  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
- `cursor` string

  Cursor for pagination
- `page_size` int32

  Page size for pagination

  **Default value:** `10`
- `sort_by` string

  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_direction` string

  Sorting direction: asc (ascending) or desc (descending)
- `has_summary` boolean

  Whether to return the `summary` grand-total row
- `filters` string

  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. e.g. {"last\_referrer\_first\_show": {"operator": "in", "value": \["Social"\]}, "last\_referrer\_show": {"operator": "in", "value": \["Facebook", "TikTok"\]}}
- `filter_crawler_type` string

  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

```json
{
  "begin_time": "string",
  "end_time": "string",
  "dimensions": [
    "string"
  ],
  "metrics": [
    "string"
  ],
  "time_zone": 0,
  "cursor": "string",
  "page_size": 10,
  "sort_by": "string",
  "sort_direction": "string",
  "has_summary": true,
  "filters": "string",
  "filter_crawler_type": "string"
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `count` int32

    Total number of dimension combinations (pagination total)
  - `last_updated_at` string

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

    Cursor for pagination
  - `has_more` boolean

    Whether there are more records
  - `data` object[]

    List of traffic channel report rows

    *   Array \[

    - `last_referrer_first_show` string

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

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

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

      Number of visiting users, numeric value
    - `sales` string

      Sales amount, formatted string with thousands separators, e.g. "5,678.90"
    - `sales_original` double

      Sales amount, numeric value
    - `orders` string

      Number of orders, formatted string with thousands separators, e.g. "89"
    - `orders_original` int64

      Number of orders, numeric value
    - `uv_rate` string

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

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

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

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

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

      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_show` string

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

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

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

      Number of visiting users, numeric value
    - `sales` string

      Sales amount, formatted string with thousands separators, e.g. "5,678.90"
    - `sales_original` double

      Sales amount, numeric value
    - `orders` string

      Number of orders, formatted string with thousands separators, e.g. "89"
    - `orders_original` int64

      Number of orders, numeric value
    - `uv_rate` string

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

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

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

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

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

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

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "count": 0,
    "last_updated_at": "string",
    "cursor": "string",
    "has_more": true,
    "data": [
      {
        "last_referrer_first_show": "string",
        "last_referrer_show": "string",
        "uv": "string",
        "uv_original": 0,
        "sales": "string",
        "sales_original": 0,
        "orders": "string",
        "orders_original": 0,
        "uv_rate": "string",
        "uv_rate_original": 0,
        "sales_rate": "string",
        "sales_rate_original": 0,
        "orders_rate": "string",
        "orders_rate_original": 0
      }
    ],
    "summary": {
      "last_referrer_first_show": "string",
      "last_referrer_show": "string",
      "uv": "string",
      "uv_original": 0,
      "sales": "string",
      "sales_original": 0,
      "orders": "string",
      "orders_original": 0,
      "uv_rate": "string",
      "uv_rate_original": 0,
      "sales_rate": "string",
      "sales_rate_original": 0,
      "orders_rate": "string",
      "orders_rate_original": 0
    }
  }
}
```
