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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
GET /general/hour
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 — useful for identifying the best times of day to publish or schedule content.
Different hostThis endpoint uses
data.pandavideo.cominstead of the standardapi-v2.pandavideo.com. Make sure to use the correct host when calling it.
AuthorizationRequires a valid Panda API key in the
Authorizationheader. The metrics returned correspond to the organization that owns the API key.
HTTP Method & Path
GET /general/hour
Base URL: https://data.pandavideo.com
Authentication Requirements
- Security Scheme:
PandaAuth(apiKey) - Header:
Authorization: <your_api_token>(no Bearer prefix)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | Yes | Panda API token (without Bearer prefix) |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
start_date | string | Yes | Start date of the range. Format: YYYY-MM-DD |
end_date | string | Yes | End date of the range. Format: YYYY-MM-DD |
Request Body
No request body is required.
Response
Success Response (200)
Returns an object with two top-level fields:
views_data— raw hourly entries keyed by date. Each value is an array of per-video entries.aggregated_data— totals keyed by date, broken into 2-hour buckets (0-2,2-4, …,22-00).
{
"views_data": {
"2026-05-25": [
{
"id": "07c8153a-fb76-43a8-bfe3-15280d9783ae",
"hour": 11,
"view": 1,
"play": 1,
"unique_view": 1,
"unique_play": 1
}
],
"2026-05-24": []
},
"aggregated_data": {
"2026-05-25": {
"0-2": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"2-4": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"4-6": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"6-8": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"8-10": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"10-12": { "total_view": 4, "total_play": 4, "total_unique_view": 4, "total_unique_play": 4 },
"12-14": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"14-16": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"16-18": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"18-20": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"20-22": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 },
"22-00": { "total_view": 0, "total_play": 0, "total_unique_view": 0, "total_unique_play": 0 }
}
}
}
The real response contains entries for each day betweenstart_dateandend_date. Days with no activity appear as an empty array inviews_dataand with all-zero values inaggregated_data. The examples above are illustrative.
Response Schema
views_data
views_dataRaw hourly entries keyed by date (YYYY-MM-DD). Each value is an array of per-video hourly entries:
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Video ID |
hour | integer | Hour of the day in 24h format (0–23) |
view | integer | Total views in that hour |
play | integer | Total plays in that hour |
unique_view | integer | Unique viewers in that hour |
unique_play | integer | Unique plays in that hour |
aggregated_data
aggregated_dataTotals 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). Each bucket contains:
| Field | Type | Description |
|---|---|---|
total_view | integer | Total views in the bucket |
total_play | integer | Total plays in the bucket |
total_unique_view | integer | Total unique viewers in the bucket |
total_unique_play | integer | Total unique plays in the bucket |
Error Responses
- 401 Unauthorized: API token inválido ou ausente
- 403 Forbidden: Token sem permissão para acessar este recurso
- 422 Unprocessable Entity: Parâmetros de data inválidos (formato ou intervalo)
- 500 Internal Server Error: Erro no servidor
Example Usage
cURL
curl -X GET \
'https://data.pandavideo.com/general/hour?start_date=2026-04-25&end_date=2026-05-25' \
-H 'Authorization: your_api_token_here'