---
title: "Get Encoding Statistics"
method: GET
path: "/library/{libraryId}/statistics/encoding"
tags: ["Encoding Statistics"]
---

# Get Encoding Statistics

`GET /library/{libraryId}/statistics/encoding`

## Request

- Base URL: `https://video.bunnycdn.com`
- URL: `https://video.bunnycdn.com/library/{libraryId}/statistics/encoding`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/stream-api/docs/library/:libraryId/statistics/encoding/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns video encoding seconds for the library, split into premium and free tier. Each includes billable (normalized) and output seconds over time, plus totals by video codec, resolution, and JIT vs standard encoding. Data is available starting 2026-06-15.

## Path parameters

- `libraryId` integer, required

## Query parameters

- `dateFrom` string, date-time, nullable
- `dateTo` string, date-time, nullable
- `hourly` boolean
- `videoCodecs` string[], nullable
- `resolutions` integer[], nullable
- `jit` boolean, nullable

## Response `200`

Returns video encoding seconds for the requested video library, split by premium and free tier.

- VideoEncodingStatisticsModel
  - `hourly` boolean: Indicates whether the charts use hourly or daily UTC buckets.
  - `total` VideoEncodingBreakdownModel
    - `normalizedTotal` integer: Billable encoding seconds in the selected period: counted per output codec and weighted by the video's highest resolution (x0.5 below 720p, x1 up to 1080p, x3 above).
    - `normalizedChart` object, nullable: Billable (normalized) encoding seconds over time, grouped hourly or daily in UTC.
    - `outputTotal` integer: Encoded output seconds in the selected period: video length counted once per output codec, without resolution weighting.
    - `outputChart` object, nullable: Encoded output seconds over time, grouped hourly or daily in UTC.
    - `byVideoCodec` object, nullable: Encoding seconds grouped by output video codec (H264, VP9, HEVC, AV1).
    - `byResolution` object, nullable: Encoding seconds grouped by the video's highest output resolution. 0 means the resolution was unknown.
    - `byJit` object, nullable: Encoding seconds grouped by encoding type: 'jit' for just-in-time encodes, 'standard' for full encodes.
  - `premium` VideoEncodingBreakdownModel
    - `normalizedTotal` integer: Billable encoding seconds in the selected period: counted per output codec and weighted by the video's highest resolution (x0.5 below 720p, x1 up to 1080p, x3 above).
    - `normalizedChart` object, nullable: Billable (normalized) encoding seconds over time, grouped hourly or daily in UTC.
    - `outputTotal` integer: Encoded output seconds in the selected period: video length counted once per output codec, without resolution weighting.
    - `outputChart` object, nullable: Encoded output seconds over time, grouped hourly or daily in UTC.
    - `byVideoCodec` object, nullable: Encoding seconds grouped by output video codec (H264, VP9, HEVC, AV1).
    - `byResolution` object, nullable: Encoding seconds grouped by the video's highest output resolution. 0 means the resolution was unknown.
    - `byJit` object, nullable: Encoding seconds grouped by encoding type: 'jit' for just-in-time encodes, 'standard' for full encodes.
  - `free` VideoEncodingBreakdownModel
    - `normalizedTotal` integer: Billable encoding seconds in the selected period: counted per output codec and weighted by the video's highest resolution (x0.5 below 720p, x1 up to 1080p, x3 above).
    - `normalizedChart` object, nullable: Billable (normalized) encoding seconds over time, grouped hourly or daily in UTC.
    - `outputTotal` integer: Encoded output seconds in the selected period: video length counted once per output codec, without resolution weighting.
    - `outputChart` object, nullable: Encoded output seconds over time, grouped hourly or daily in UTC.
    - `byVideoCodec` object, nullable: Encoding seconds grouped by output video codec (H264, VP9, HEVC, AV1).
    - `byResolution` object, nullable: Encoding seconds grouped by the video's highest output resolution. 0 means the resolution was unknown.
    - `byJit` object, nullable: Encoding seconds grouped by encoding type: 'jit' for just-in-time encodes, 'standard' for full encodes.

## Other responses

- `400`: The date range or filters are invalid.
- `401`: The request authentication failed.
- `404`: The requested video library was not found.
- `500`: Internal Server Error
- `503`: Encoding statistics are not available.

## Changes

- **2026-11-12** `83116184952f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bunny/apis/stream-api/changes/library/:libraryId/statistics/encoding/get.md)

---

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