---
title: "Traffic statistics"
method: GET
path: "/api/v1/plans/{id}/stats"
tags: ["Plans & line generation"]
---

# Traffic statistics

`GET /api/v1/plans/{id}/stats`

## Request

- Base URL: `https://hproxy.com`
- URL: `https://hproxy.com/api/v1/plans/{id}/stats`
- Auth: API key in header `X-API-Key`

How a **Residential Premium** plan was used, bucket by bucket: bytes, requests and success rate straight from the network's own metering of that plan. Add `/targets` to the path (`GET /plans/{id}/stats/targets`) for the breakdown by target host and country, heaviest first (`rows[]` with `host`, `country`, `bandwidthBytes`, `requests`, `successRate`, `avgLatencyMs`; `limit` 1 to 500). Plans on other products answer 400.

## Path parameters

- `id` string, required

## Query parameters

- `days` integer
- `granularity` string

## Response `200`

Success

- object

## Other responses

- `400`: Invalid input. The body names the field and the accepted set.
- `401`: Missing or invalid API key.
- `429`: Rate limited. Retry after the delay in the response.

---

[API](https://skmtc.dev/hproxy/apis/hproxy-api.md) · [All operations](https://skmtc.dev/hproxy/apis/hproxy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hproxy/apis/hproxy-api/revisions/9f6898fe76e2?raw)
