> For the complete documentation index, see [llms.txt](https://doc.thordata.com/interface-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.thordata.com/interface-documentation/zh-hk/gong-gong-api/zhang-hu/cha-xun-liu-liang-shi-yong-ji-lu.md).

# 查詢流量使用記錄

### 基礎信息

**接口說明：**&#x901A;過接口獲取Thordata主賬戶流量使用日誌

**請求地址：**<https://openapi.thordata.com/api/account/usage-statistics>

**請求方式：**<mark style="color:green;">GET</mark>

### 請求參數

**Params：**

| 參數名稱        | 參數类型   | 是否必須 | 描述                                                                                      |
| ----------- | ------ | ---- | --------------------------------------------------------------------------------------- |
| `token`     | string | 必須   | 請登入[**儀表板 >> 菜單 >> 我的賬戶**](https://dashboard.thordata.com/account-settings)查看您的token參數值 |
| `from_date` | string | 必須   | 開始查詢日期，格式：yyyy-mm-dd                                                                    |
| `to_date`   | string | 必須   | 結束查詢日期，格式：yyyy-mm-dd                                                                    |

### 響應示例

```json
{
    "code": 200,
    "data": {
        "total_usage_traffic": 1500000,
        "traffic_balance": 10000000,
        "query_days": 3,
        "range_usage_traffic": 1500000,
        "data": [
            {
                "date": "2025-01-01",
                "usage_traffic": 500000
            },
            {
                "date": "2025-01-02",
                "usage_traffic": 500000
            },
            {
                "date": "2025-01-03",
                "usage_traffic": 500000
            }
        ]
    },
    "msg": "ok"
}
```

{% hint style="info" %}
若返回的code值非200，請查閱[**錯誤碼說明**](/interface-documentation/zh-hk/cuo-wu-ma/cuo-wu-ma-shuo-ming.md)列表並進行修改
{% endhint %}

<table><thead><tr><th width="243">参数名稱</th><th>参数類型</th><th width="113">是否必須</th><th>描述</th></tr></thead><tbody><tr><td><code>code</code></td><td>number</td><td>非必須</td><td>-</td></tr><tr><td><code>data</code></td><td>object</td><td>非必須</td><td>-</td></tr><tr><td><code>total_usage_traffic</code></td><td>number</td><td>必須</td><td>總使用流量（kb）</td></tr><tr><td><code>traffic_balance</code></td><td>number</td><td>必須</td><td>剩餘流量（kb）</td></tr><tr><td><code>query_days</code></td><td>number</td><td>必須</td><td>查詢天數</td></tr><tr><td><code>range_usage_traffic</code></td><td>number</td><td>必須</td><td>查詢日期內的總使用流量（kb）</td></tr><tr><td><code>date</code></td><td>string</td><td>必須</td><td>日期</td></tr><tr><td><code>usage_traffic</code></td><td>number</td><td>必須</td><td>當天使用流量（kb）</td></tr><tr><td><code>msg</code></td><td>string</td><td>非必須</td><td>-</td></tr></tbody></table>
