API 文档
  • History
  • Introduction
  • API Category
  • Making API Requests
    • Request Structure
    • Common Params
    • Signature v3
    • Signature
    • Responses
  • Site APIs
    • CreateZone
    • DescribeIdentifications
    • ModifyZone
    • DeleteZone
    • ModifyZoneStatus
    • CheckCnameStatus
    • IdentifyZone
    • DescribeZones
    • VerifyOwnership
    • 导出区域配置
    • 导入区域配置
    • 描述区域配置导入结果
  • Acceleration Domain Management APIs
    • CreateAccelerationDomain
    • DescribeAccelerationDomains
    • ModifyAccelerationDomain
    • ModifyAccelerationDomainStatuses
    • DeleteAccelerationDomains
    • CreateSharedCNAME
    • BindSharedCNAME
    • DeleteSharedCNAME
  • Site Acceleration Configuration APIs
    • CreateRule
    • DeleteRules
    • DescribeHostsSetting
    • DescribeRules
    • DescribeRulesSetting
    • DescribeZoneSetting
    • ModifyRule
    • ModifyZoneSetting
  • 边缘函数API
    • 创建函数
    • 描述函数
    • 修改函数
    • 创建函数规则
    • 删除函数
    • 描述函数规则
    • 修改函数规则
    • 修改函数规则优先级
    • 删除函数规则
    • 描述函数运行时环境
    • 处理函数运行时环境
  • Alias Domain APIs
    • CreateAliasDomain
    • DescribeAliasDomains
    • ModifyAliasDomain
    • ModifyAliasDomainStatus
    • DeleteAliasDomain
  • Security Configuration APIs
    • CreateSecurityIPGroup
    • DescribeSecurityIPGroup
    • ModifySecurityIPGroup
    • DeleteSecurityIPGroup
    • DescribeOriginProtection
    • DescribeSecurityTemplateBindings
    • ModifySecurityPolicy
    • BindSecurityTemplateToEntity
    • DescribeSecurityIPGroupInfo
  • Layer 4 Application Proxy APIs
    • CreateL4Proxy
    • ModifyL4Proxy
    • ModifyL4ProxyStatus
    • DescribeL4Proxy
    • DeleteL4Proxy
    • CreateL4ProxyRules
    • ModifyL4ProxyRules
    • ModifyL4ProxyRulesStatus
    • DescribeL4ProxyRules
    • DeleteL4ProxyRules
    • CreateApplicationProxy
    • ModifyApplicationProxy
    • ModifyApplicationProxyStatus
    • DescribeApplicationProxies
    • DeleteApplicationProxy
    • CreateApplicationProxyRule
    • ModifyApplicationProxyRule
    • ModifyApplicationProxyRuleStatus
    • DeleteApplicationProxyRule
  • Content Management APIs
    • CreatePurgeTask
    • DescribePurgeTasks
    • CreatePrefetchTask
    • DescribePrefetchTasks
    • DescribeContentQuota
  • Data Analysis APIs
    • DescribeDDoSAttackData
    • DescribeDDoSAttackEvent
    • DescribeDDoSAttackTopData
    • DescribeOverviewL7Data
    • DescribeTimingL4Data
    • DescribeTimingL7AnalysisData
    • DescribeTopL7AnalysisData
    • DescribeTimingL7CacheData
    • DescribeTopL7CacheData
  • Log Service APIs
    • DownloadL7Logs
    • DownloadL4Logs
    • CreateCLSIndex
    • CreateRealtimeLogDeliveryTask
    • ModifyRealtimeLogDeliveryTask
    • DeleteRealtimeLogDeliveryTask
    • DescribeRealtimeLogDeliveryTasks
  • Billing APIs
    • CreatePlan
    • UpgradePlan
    • RenewPlan
    • ModifyPlan
    • IncreasePlanQuota
    • DestroyPlan
    • CreatePlanForZone
    • BindZoneToPlan
    • DescribeBillingData
    • DescribeAvailablePlans
  • Certificate APIs
    • DescribeDefaultCertificates
    • ModifyHostsCertificate
  • Load Balancing APIs
    • CreateOriginGroup
    • ModifyOriginGroup
    • DeleteOriginGroup
    • DescribeOriginGroup
    • 创建负载均衡器
    • 修改负载均衡器
    • 删除负载均衡器
    • 描述负载均衡器列表
    • 描述源站组健康状态
  • Custom Response Page APIs
    • CreateCustomizeErrorPage
    • DescribeCustomErrorPages
    • ModifyCustomErrorPage
    • DeleteCustomErrorPage
  • DNS记录API
    • 创建DNS记录
    • 删除DNS记录
    • 描述DNS记录
    • 修改DNS记录状态
    • 修改DNS记录
  • Diagnostic Tool APIs
    • DescribeIPRegion
  • Version Management APIs
    • CreateConfigGroupVersion
    • DeployConfigGroupVersion
    • DescribeConfigGroupVersionDetail
    • DescribeConfigGroupVersions
    • DescribeDeployHistory
    • DescribeEnvironments
  • Data Types
  • Error Codes
当前内容仅提供英语版本,中文版我们将尽快补充,感谢您的理解。

DescribeBillingData

1. API Description

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

This API is used to query billing data.

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: DescribeBillingData.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
StartTimeYesTimestamp ISO8601The start time.
EndTimeYesTimestamp ISO8601The end time. The query time range (EndTime - StartTime) must be less than or equal to 31 days.
ZoneIds.NYesArray of StringZone ID set. This parameter is required. A maximum of 100 zone IDs can be passed in. If you need to query data for all zones under the Tencent Cloud main account, please use "*" instead. To query account-level data, you need to have full resource permissions for all zones of this interface.
MetricNameYesStringMetric name. Valid values:
Layer 4/7 Acceleration Traffic (Unit: Byte):
  • acc_flux: content acceleration traffic, in bytes;
  • smt_flux: smart acceleration traffic, in bytes;
  • l4_flux: layer 4 acceleration traffic, in bytes;
  • sec_flux: exclusive protection traffic, in bytes;
  • zxctg_flux: network optimization traffic in the chinese mainland, in bytes;


  • Layer 4/7 Acceleration Bandwidth (Unit: bps):
  • acc_bandwidth: content acceleration bandwidth, in bps.
  • smt_bandwidth: smart 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 (Unit: counts):
  • sec_request_clean: number of HTTP/HTTPS requests;


  • Value-added Service Usage:
  • smt_request_clean: number of smart acceleration requests, in counts;
  • quic_request: number of quic requests;

  • bot_request_clean: number of bot requests;
  • cls_count: number of real-time log entries pushed;
  • ddos_bandwidth: elastic ddos protection bandwidth, in bps.


  • Edge Computing Usage:
  • edgefunction_request: number of edge function executions, in counts
  • edgefunction_cpu_time: edge function CPU processing time, in milliseconds


  • Media Processing Usage (Unit: seconds):
  • total_transcode: duration of jit transcoding and transmuxing for all specifications of audio and video, in seconds;
  • remux: transmuxing duration, in seconds;
  • transcode_audio: audio transcoding duration, in seconds;
  • transcode_H264_SD: specifies the duration of standard-definition videos encoded in H.264 (short side <= 480 px), in seconds;
  • transcode_H264_HD: specifies the duration of high-definition video (short side <= 720 px) encoded in H.264, in seconds;
  • transcode_H264_FHD: specifies the duration of a full hd video (short side <= 1080 px) encoded in H.264, in seconds;
  • transcode_H264_2K: specifies the duration of a 2K video (short side <= 1440 px) encoded in H.264, expressed in seconds.


  • IntervalYesStringTime granularity of the query. Valid values:
  • 5min: 5 minutes;
  • hour: 1 hour;
  • day: 1 day.
  • Filters.NNoArray of BillingDataFilterFilter 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, such as 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




    Note: Filters of the same Type use OR logic, while filters of different Type use AND logic.


    GroupBy.NNoArray of String

    Grouping aggregation dimensions. A maximum of two dimensions can be used for grouping simultaneously. The values are as follows:



    • zone-id: Group by zone ID. If content identifiers are used, grouping by content identifier takes priority.

    • host: Group by domain name.

    • proxy-id: Group by layer-4 proxy instance ID.

    • region-id: Group by billing region.

    3. Output Parameters

    Parameter NameTypeDescription
    DataArray of BillingDataData point list.
    Note: This field may return null, which indicates a failure to obtain a valid value.
    RequestIdStringThe 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 Querying content acceleration traffic in the specified zone and billing region

    This example shows you how to query the billing volume of content acceleration traffic with a specific zone ID and region ID on a 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 specified zones and group by zone ID

    Query the billing usage of content acceleration traffic for specified zone-ids, grouped by zone-id with a daily time 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 for specified zones and group by domain

    Query the billing usage of content acceleration traffic for specified zone-ids, grouped by domain name with a daily time 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 specified zones grouped by zone ID and billing region

    Query the billing usage of content acceleration traffic for specified zone IDs, grouped by both zone ID and billing region with daily time 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 CodeDescription
    InternalError.ProxyServerAn unknown error occurred in the backend server.
    InvalidParameter.GroupByLimitExceeded
    InvalidParameter.InvalidIntervalInvalid interval. The value should be either [min 5min hour day].
    InvalidParameter.InvalidMetricThe query dimension is invalid.
    InvalidParameter.ZoneHasNotBeenBoundToPlanThe zone is not bound to a package.
    edgeone Logo
    Copyright © 2013-2025 Tencent Cloud. All Rights Reserved.