---
title: "Get DNS Query Statistics"
method: GET
path: "/dnszone/{id}/statistics"
tags: ["DNS Zone", "Statistics"]
---

# Get DNS Query Statistics

`GET /dnszone/{id}/statistics`

## Request

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/dnszone/{id}/statistics`
- Auth: one of:
  - API key in header `AccessKey`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-net-api/docs/dnszone/:id/statistics/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` integer, required

## Query parameters

- `dateFrom` string, date-time, nullable
- `dateTo` string, date-time, nullable

## Response `200`

Returns the statistics for the DNS Zone with the given ID

- DnsZoneStatisticsModel
  - `TotalQueriesServed` integer
  - `QueriesServedChart` object, nullable
  - `NormalQueriesServedChart` object, nullable
  - `SmartQueriesServedChart` object, nullable
  - `QueriesByTypeChart` object, nullable

## Other responses

- `401`: The request authorization failed
- `404`: The DNS Zone with the requested ID does not exist
- `500`: Internal Server Error

## Changes

- **2026-10-27** `2096a6606d8d`: 2 info
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `AccessKey`
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `bearer`

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/dnszone/:id/statistics/get.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
