tencent cloud

APIs

DescribeBillingData

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-25 17:00:17

1. API Description

Domain name for API request: teo.intl.tencentcloudapi.com.

Query billing data via this API.

A maximum of 50 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeBillingData.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
StartTime Yes Timestamp ISO8601 Start time.
EndTime Yes Timestamp ISO8601 End time. The query time range (EndTime - StartTime) must be less than or equal to 31 days.
ZoneIds.N Yes Array of String Site ID set. This parameter is required. You can import up to 100 site IDs. To query data of all sites under the Tencent Cloud root account, use * instead. To query account-level data, you must have permission for all site resources of this interface.
MetricName Yes String Metric list. Valid values:
l4/l7 acceleration traffic:
  • acc_flux: content acceleration traffic, in bytes;
  • smt_flux: smart acceleration traffic, in bytes;
  • l4_flux: Layer 4 acceleration traffic, in bytes;
  • sec_flux: independent protection traffic, in bytes;
  • zxctg_flux: network optimization traffic in the Chinese mainland, in bytes.

  • l4/l7 acceleration bandwidth:
  • acc_bandwidth: content acceleration bandwidth, in bps;
  • smt_bandwidth: intelligent acceleration bandwidth, in bps;
  • l4_bandwidth: Layer 4 acceleration bandwidth, in bps;
  • sec_bandwidth: exclusive protection bandwidth, in bps;
  • zxctg_bandwidth: network optimization bandwidth in the Chinese mainland, in bps.

  • HTTP/HTTPS security requests:
  • sec_request_clean: HTTP/HTTPS requests, count.

  • VAS usage:
  • smt_request_clean: smart acceleration requests, count;
  • quic_request: quic requests, count;
  • bot_request_clean: bot requests, count;
  • cls_count: number of real-time log pushes, count;
  • ddos_bandwidth: elastic ddos protection bandwidth, in bps.

  • Edge computing usage:
  • edgefunction_request: number of edge function requests, count;
  • edgefunction_cpu_time: edge function cpu processing time, in milliseconds.

  • Media processing usage:
  • total_transcode: duration of audio, video JIT transcoding, and remuxing for all specifications, in seconds;
  • remux: remuxing duration, in seconds;
  • transcode_audio: audio transcoding duration, in seconds;
  • transcode_H264_SD: duration of standard definition video (short side <= 480 px) in H.264, in seconds;
  • transcode_H264_HD: duration of high-definition video (short side <= 720 px) in H.264, in seconds;
  • transcode_H264_FHD: duration of Full HD video (short side <= 1080 px) in H.264, in seconds;
  • transcode_H264_2K: duration of 2K video (short side <= 1440 px) in H.264, in seconds.
  • Interval Yes String Time granularity of the query. Valid values:
  • 5min: 5 minutes;
  • hour: 1-hour granularity;
  • day: 1 day.
  • Filters.N No Array of BillingDataFilter Filter criteria. The detailed values of filter criteria are as follows:
  • host: Filter by domain name, such as test.example.com.
  • proxy-id: filter by L4 proxy instance ID. Example value: sid-2rugn89bkla9.
  • region-id: Filter by billing region. Options:
    CH: Chinese mainland
    AF: Africa
    AS1: Asia-Pacific Region 1
    AS2: Asia-Pacific Region 2
    AS3: Asia-Pacific Region 3
    EU: Europe
    MidEast: Middle East
    NA: North America
    SA: South America

  • Description: BillingDataFilter with the same Type has an "OR" relationship with each other, while those with different Type have an "AND" relationship with each other.
    GroupBy.N No Array of String Aggregate dimension for grouping. Allows up to two dimensions for grouping at the same time. Values are as follows:
  • zone-id: Group by site ID. If the content identifier feature is used, priority is given to grouping by content identifier.
  • host: Group by domain name.
  • proxy-id: Group by Layer 4 Proxy Instance ID.
  • region-id: Group by billing region.
  • 3. Output Parameters

    Parameter Name Type Description
    Data Array of BillingData Data point list.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Query content acceleration traffic of a specified site in a specified billing region

    Query the content acceleration traffic billing volume of a specified zone-id in a specified region-id with daily granularity.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeBillingData
    <Common request parameters>
    
    {
        "StartTime": "2024-01-01T00:00:00+08:00",
        "EndTime": "2024-01-24T03:20:00+08:00",
        "Interval": "day",
        "MetricName": "acc_flux",
        "Filters": [
            {
                "Type": "region-id",
                "Value": "MidEast"
            }
        ],
        "ZoneIds": [
            "zone-2smdfso9dr58"
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "457e8933-4296-4878-9a7f-fb888559e29e",
            "Data": [
                {
                    "Time": "2023-12-31T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-01T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-02T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-03T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-04T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-05T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-06T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-07T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-08T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-09T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-10T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-11T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-12T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-13T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-14T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-15T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-16T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-17T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-18T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-19T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-20T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-21T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-22T16:00:00Z",
                    "Value": 0
                },
                {
                    "Time": "2024-01-23T16:00:00Z",
                    "Value": 0
                }
            ]
        }
    }

    Example2 Query content acceleration traffic for a specified site and group by site ID

    Query the billing usage of content acceleration traffic for a specified zone-id, group by zone-id, with daily granularity.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeBillingData
    <Common request parameters>
    
    {
        "StartTime": "2025-07-01T00:00:00+08:00",
        "EndTime": "2025-07-02T23:59:59+08:00",
        "Interval": "day",
        "MetricName": "acc_flux",
        "ZoneIds": [
            "zone-2m2gq4dnpmd2",
            "zone-30hqppzribht"
        ],
        "GroupBy": [
            "zone-id"
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "d2174285-8aac-4cdc-bc06-d81f2f6520da",
            "Data": [
                {
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 0,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 2751240612,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 0,
                    "ZoneId": "zone-30hqppzribht"
                },
                {
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 68443435,
                    "ZoneId": "zone-30hqppzribht"
                }
            ]
        }
    }

    Example3 Query content acceleration traffic of a specified site by domain name group

    This example shows you how to query the content acceleration traffic billing usage of a specified zone-id by domain name at daily granularity.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeBillingData
    <Common request parameters>
    
    {
        "StartTime": "2025-07-01T00:00:00+08:00",
        "EndTime": "2025-07-02T23:59:59+08:00",
        "Interval": "day",
        "MetricName": "acc_flux",
        "ZoneIds": [
            "zone-2m2gq4dnpmd2",
            "zone-30hqppzribht"
        ],
        "GroupBy": [
            "host"
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "d2174285-8aac-4cdc-bc06-d81f2f6520da",
            "Data": [
                {
                    "Host": "test1.example.com",
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 1387001003,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "Host": "test1.example.com",
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 1390529805,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "Host": "test2.example.com",
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 2879078,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "Host": "test2.example.com",
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 2889084,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                }
            ]
        }
    }

    Example4 Query content acceleration traffic for a specified site, grouped by site ID and billing region.

    Query the content acceleration traffic billing usage of a specified zone-id, group by zone-id and billing region, with daily granularity.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeBillingData
    <Common request parameters>
    
    {
        "StartTime": "2025-07-01T00:00:00+08:00",
        "EndTime": "2025-07-02T23:59:59+08:00",
        "Interval": "day",
        "MetricName": "acc_flux",
        "ZoneIds": [
            "zone-2m2gq4dnpmd2",
            "zone-30hqppzribht"
        ],
        "GroupBy": [
            "zone-id",
            "region-id"
        ]
    }

    Output Example

    {
        "Response": {
            "RequestId": "d2174285-8aac-4cdc-bc06-d81f2f6520da",
            "Data": [
                {
                    "RegionId": "SA",
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 549591531,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "RegionId": "SA",
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 549591531,
                    "ZoneId": "zone-2m2gq4dnpmd2"
                },
                {
                    "RegionId": "MidEast",
                    "Time": "2025-06-30T16:00:00Z",
                    "Value": 549591531,
                    "ZoneId": "zone-30hqppzribht"
                },
                {
                    "RegionId": "MidEast",
                    "Time": "2025-07-01T16:00:00Z",
                    "Value": 549591531,
                    "ZoneId": "zone-30hqppzribht"
                }
            ]
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError.ProxyServer Unknown error occurs on the real server.
    InvalidParameter.GroupByLimitExceeded The number of GroupBy parameters exceeds the limit.
    InvalidParameter.InvalidInterval Invalid interval. The value should be [min 5min hour day].
    InvalidParameter.InvalidMetric Invalid query dimension.
    InvalidParameter.ZoneHasNotBeenBoundToPlan Zone not bound to package.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック