Get Best Times General Metrics

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 host

This endpoint uses data.pandavideo.com instead of the standard api-v2.pandavideo.com. Make sure to use the correct host when calling it.

📘

Authorization

Requires a valid Panda API key in the Authorization header. 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

NameInTypeRequiredDescription
AuthorizationheaderstringYesPanda API token (without Bearer prefix)

Query Parameters

NameTypeRequiredDescription
start_datestringYesStart date of the range. Format: YYYY-MM-DD
end_datestringYesEnd 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 between start_date and end_date. Days with no activity appear as an empty array in views_data and with all-zero values in aggregated_data. The examples above are illustrative.

Response Schema

views_data

Raw hourly entries keyed by date (YYYY-MM-DD). Each value is an array of per-video hourly entries:

FieldTypeDescription
idstring (uuid)Video ID
hourintegerHour of the day in 24h format (0–23)
viewintegerTotal views in that hour
playintegerTotal plays in that hour
unique_viewintegerUnique viewers in that hour
unique_playintegerUnique plays in that hour

aggregated_data

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). Each bucket contains:

FieldTypeDescription
total_viewintegerTotal views in the bucket
total_playintegerTotal plays in the bucket
total_unique_viewintegerTotal unique viewers in the bucket
total_unique_playintegerTotal 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'
Query Params
date
required

Start date of the range. Format: YYYY-MM-DD.

date
required

End date of the range. Format: YYYY-MM-DD.

Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json