> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/ipt/ip-transit/describeiptransittraffic.md).

# DescribeIPTransitTraffic

## 1. API Description

This API (DescribeIPTransitTraffic) is used to queries IP Transit bandwidth data in the specified date range.

{% hint style="info" %}
**Notes**

* Only traffic data within the last 30 days can be queried.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                     | Description                                                                                                                                                                                                             |
| -------------- | -------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| iptId          | Yes      | String                                                                   | IP Transit ID.                                                                                                                                                                                                          |
| startTime      | Yes      | String                                                                   | <p>Query start time.</p><p>Use UTC time according to the ISO 8601 standard. Format: YYYY-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ.</p>                               |
| endTime        | No       | String                                                                   | <p>Query end time.</p><p>Use UTC time according to the ISO 8601 standard. Format: YYYY-MM-ddTHH<span data-gb-custom-inline data-tag="emoji" data-code="1f1f2-1f1f2">🇲🇲</span>ssZ.</p><p>Defaults to current time.</p> |
| period         | No       | Integer                                                                  | <p>Data sampling period.</p><p>Unit: seconds. Valid values: 20, 40, 60, 120, 300, 900.</p><p>Default value: 300</p>                                                                                                     |
| statistic      | No       | [TrafficStatistic](/api-reference/ipt/datastructure.md#trafficstatistic) | <p>Statistical method of traffic data within the sampling period.</p><p>Default value: Average</p>                                                                                                                      |

## 3. Output Parameters

| Parameter Name | Type                                                                    | Description                                                                                                           |
| -------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                  | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| dataList       | Array of [TrafficData](/api-reference/ipt/datastructure.md#trafficdata) | List of bandwidth data.                                                                                               |
| in95           | Integer                                                                 | 95th percentile value of inbound bandwidth.                                                                           |
| inAvg          | Integer                                                                 | Average value of inbound bandwidth.                                                                                   |
| inMax          | Integer                                                                 | Maximum value of inbound bandwidth.                                                                                   |
| inMin          | Integer                                                                 | Minimum value of inbound bandwidth.                                                                                   |
| out95          | Integer                                                                 | 95th percentile value of outbound bandwidth.                                                                          |
| outAvg         | Integer                                                                 | Average value of outbound bandwidth.                                                                                  |
| outMax         | Integer                                                                 | Maximum value of outbound bandwidth.                                                                                  |
| outMin         | Integer                                                                 | Minimum value of outbound bandwidth.                                                                                  |
| unit           | String                                                                  | Bandwidth unit, e.g., bps.                                                                                            |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}

1. **Query IP Transit traffic data within one day.**

```json
POST /api/v2/ipt HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeIPTransitTraffic
<Common Request Params>

Request:
{
  "iptId": "your-ipt-id",
  "startTime": "2024-01-01T00:00:00Z",
  "endTime": "2024-01-01T23:59:59Z"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2023-01-01T00:00:00Z"
      },
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2023-01-01T00:05:00Z"
      },
      {
        "internetRX": 635218,
        "internetTX": 9028,
        "time": "2023-01-01T00:10:00Z"
      }
    ],
    "in95": 873034,
    "inAvg": 793762,
    "inMax": 873034,
    "inMin": 635218,
    "out95": 11971,
    "outAvg": 10990,
    "outMax": 11971,
    "outMin": 9028,
    "unit": "bps"
  }
}
```

2. **Query the maximum IP Transit traffic per minute within one hour, using a 1-minute sampling period.**

```json
POST /api/v2/ipt HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeIPTransitTraffic
<Common Request Params>

Request:
{
  "iptId": "your-ipt-id",
  "startTime": "2026-01-01T00:00:00Z",
  "endTime": "2026-01-01T01:00:00Z",
  "period": 60,
  "statistic": "Maximum"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "internetRX": 912480,
        "internetTX": 12630,
        "time": "2026-01-01T00:00:00Z"
      },
      {
        "internetRX": 887215,
        "internetTX": 12104,
        "time": "2026-01-01T00:01:00Z"
      },
      {
        "internetRX": 701336,
        "internetTX": 9875,
        "time": "2026-01-01T00:02:00Z"
      }
    ],
    "in95": 912480,
    "inAvg": 833677,
    "inMax": 912480,
    "inMin": 701336,
    "out95": 12630,
    "outAvg": 11536,
    "outMax": 12630,
    "outMin": 9875,
    "unit": "bps"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
