---
title: "Get Best Times General Metrics"
method: GET
path: "/general/hour"
---

# Get Best Times General Metrics

`GET /general/hour`

## Request

- Base URL: `https://data.pandavideo.com`
- URL: `https://data.pandavideo.com/general/hour`
- Auth: none declared

Retrieve hourly viewing metrics across all videos for the given date range. Returns two views of the same data: raw entries per video grouped by date and hour, and aggregated totals grouped by date and 2-hour time buckets. Video IDs are `video_external_id` values.

**Time window and time zone**

- `start_date` and `end_date` accept `YYYY-MM-DD` or `YYYY-MM-DDTHH:00` (minutes must be `00`).
- The window is `[start, end)`. A date without an hour covers the whole day: `start_date=2026-10-20&end_date=2026-10-20` returns all of October 20.
- `timezone` (IANA, e.g. `America/Sao_Paulo`) defines how the dates are read and how days and hours are labeled in the response. Without `timezone` and without hours in the dates, days and hours are in UTC (same response as before).
- Unique metrics over a window are the sum of the unique metrics of each hour: a viewer who comes back in different hours is counted once per hour.
- Returns `400` for an invalid time zone, a time zone with a non whole-hour UTC offset (e.g. `Asia/Kolkata`), minutes other than `00`, or `end_date` not after `start_date`.

**Most recent data**: with `timezone` (or hours in the dates) the current day is included up to the last closed hour (hourly processing at minute 5 of each hour, UTC). Without `timezone`, data goes up to the previous day, available after the daily processing at 00:30 UTC.

## Query parameters

- `start_date` string, required
- `end_date` string, required
- `timezone` string

## Response `200`

Hourly viewing metrics. Contains two views of the same data: raw entries (views_data) and aggregated 2-hour buckets (aggregated_data).

- object
  - `views_data` object: Raw hourly entries keyed by date (YYYY-MM-DD).
  - `aggregated_data` object: Totals keyed by date (YYYY-MM-DD). Each value is an object whose keys are 2-hour buckets (0-2, 2-4, 4-6, 6-8, 8-10, 10-12, 12-14, 14-16, 16-18, 18-20, 20-22, 22-00).
  - `timezone` string: Time zone used for the window and the keys. Only present when `timezone` or hours were sent.

## Other responses

- `400`: Invalid time window or time zone
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/pandavideo/apis/panda-analytics-video-api-2.md) - [All operations](https://skmtc.dev/pandavideo/apis/panda-analytics-video-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/pandavideo/apis/panda-analytics-video-api-2/revisions/b91a08a16590?raw)
