> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bentoo.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage Data Query Interface

### Function

Queries proxy usage data such as traffic consumption, IP validity rate, and session duration. Supports filtering by time range and can be integrated with your own system for data monitoring.

### Call Information

* **Request URL**: `https://api.xxx.com/proxies/data/query`
* **Request Method**: `GET`
* **Request Header**: `Authorization: Bearer [Your API Key]`

### Parameter Description (Optional)

| Parameter Name | Type   | Description                                                                                      |
| -------------- | ------ | ------------------------------------------------------------------------------------------------ |
| `start_time`   | String | Start time, format: `YYYY-MM-DD HH:MM` (GMT).                                                    |
| `end_time`     | String | End time, format: `YYYY-MM-DD HH:MM` (GMT). Default: current time.                               |
| `type`         | String | Data type: `traffic` = traffic consumption, `session` = session data. Default: returns all data. |

### Example (Query Traffic Consumption Data for the Past 7 Days)

* **Request URL**: `https://api.xxx.com/proxies/data/query?start_time=2025-12-19 00:00&type=traffic`

### Successful Response Example (Traffic Plan)

```json theme={null}
{
  "code": 200,
  "msg": "Retrieval successful",
  "data": {
    "total_traffic": 5.23,
    "daily_data": [
      {"date": "2025-12-19", "traffic": 0.85},
      {"date": "2025-12-20", "traffic": 0.92}
      // Remaining daily data entries...
    ],
    "remaining_traffic": 4.77
  }
}
```
