---
title: "Get optimizer statistics"
method: GET
path: "/pullzone/{pullZoneId}/optimizer/statistics"
tags: ["Statistics"]
---

# Get optimizer statistics

`GET /pullzone/{pullZoneId}/optimizer/statistics`

## Request

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

## Path parameters

- `pullZoneId` integer, required

## Query parameters

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

## Response `200`

The statistics data for the passed parameters.

- OptimizerStatisticsModel
  - `RequestsOptimizedChart` object, nullable: The constructed chart of optimized requests
  - `AverageCompressionChart` object, nullable: Average compression chart of the responses
  - `TrafficSavedChart` object, nullable: The constructed chart of saved traffic
  - `AverageProcessingTimeChart` object, nullable: The constructed chart of saved traffic
  - `TotalRequestsOptimized` number, double: The total number of optimized requests
  - `TotalTrafficSaved` number, double: The total requests saved
  - `AverageProcessingTime` number, double: The average processing time of each request
  - `AverageCompressionRatio` number, double: The average compression ratio of CDN responses

## Other responses

- `400`: Failed fetching statistics per time range. Model validation failed
- `401`: The request authorization failed
- `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`
- **2026-08-07** `205129a7ebd5`: 6 info
  - api operation id `PullZonePublic_OptimizerStatistics` removed and replaced with `GetOptimizerStatisticsEndpoint_GetOptimizerStatistics`
  - the endpoint scheme security `AccessKey` was added to the API
  - the endpoint scheme security `bearer` was added to the API
  - api tag `Statistics` added
  - …2 more

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/pullzone/:pullZoneId/optimizer/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)
