Overview
The Zype Analytics 3 API gives you powerful, flexible access to real-time and historical data about how viewers engage with your content. This guide will walk you through the essentials of getting started, including authentication, rate limits, and example queries for common use cases.
Authentication and API Keys
Step 1: Obtain Your API Key
Go to Zype Admin > Gear Menu > API Keys
Create or use an existing key with the appropriate Analytics 3 scope
Step 2: Send Authenticated Requests
Use
?api_key={API_KEY}query param appended to any analytics API request
https://analytics.zype.com/v3/engagement/plays?api_key=YOUR_API_KEY
Real-Time vs Historical Data
All data in Analytics 3 is available in real time, with no delay. However, queries are considered:
| Type | Definition | Use Case Examples |
|---|---|---|
| Real-Time | Data from the last 24 hours | Dashboards, live event monitoring |
| Historical | Data older than 24 hours | Reporting, performance reviews, trends |
Use the following query parameters to define your time window:
filters[start_date_gte]=YYYY-MM-DDTHH:MM:SSZfilters[start_date_lte]=YYYY-MM-DDTHH:MM:SSZ
Real-Time & Historical Examples
Real-Time: Plays in the Last Hour by Platform
Query the /engagement/plays endpoint for near real-time data, grouped by platform:
curl "https://analytics.zype.com/v3/engagement/plays?filters[start_date_gte]=2025-07-09T13:00:00Z&filters[start_date_lte]=2025-07-09T14:00:00Z&group_by=platform&api_key=YOUR_API_KEY"
📌 Returns plays by platform (e.g., Web, iOS, Roku) in the last hour. Adjust start_date_gte as needed using ISO 8601 format.
Real-Time: Playlist Plays Today
Query the /engagement/plays endpoint to summarize long-term viewer engagement:
curl "https://analytics.zype.com/v3/engagement/plays?filters[start_date_gte]=2025-07-09T00:00:00Z&filters[start_date_lte]=2025-07-09T23:59:59Z&filters[playlist_name_eq]=My+Playlist&group_by=platform&api_key=YOUR_API_KEY"
📌 Returns all plays for a specific playlist today, grouped by platform. Adjust start_date_gte as needed using ISO 8601 format.
Historical: Top 10 Videos by Hours Watched (Last 30 Days)
Query the /hours_watched
curl "https://analytics.zype.com/v3/engagement/hours_watched?filters[start_date_gte]=2025-06-09T00:00:00Z&filters[start_date_lte]=2025-07-09T00:00:00Z&group_by=video_id&sort_by=hours_watched_desc&limit=10&api_key=YOUR_API_KEY"
📌 Returns the 10 most-watched videos over the past 30 days by total hours watched.
Filtered Query: Hours Watched for a Specific Video (Last 7 Days)
curl "https://analytics.zype.com/v3/engagement/hours_watched?filters[start_date_gte]=2025-07-02T00:00:00Z&filters[start_date_lte]=2025-07-09T00:00:00Z&filters[video_id_eq]=64c23e9b3f1e8b0001f54a6d&api_key=YOUR_API_KEY"
📌 This returns total hours watched for the video with ID 64c23e9b3f1e8b0001f54a6d over the past 7 days.
Filter & Grouping Options
You can filter and group by various dimensions:
Common filters
filters[platform_eq]=Webfilters[video_id_eq]=64c23e9b3f1e8b0001f54a6dfilters[playlist_name_eq]=My Playlistfilters[country_eq]=USfilters[monetization_type_eq]=subscription
Common Grouping
group_by=platformgroup_by=video_idgroup_by=playlist_namegroup_by=playlist_idgroup_by=country
Common Sorting
sort_by=hours_watched_descsort_by=played_desc
Was this article helpful?
Articles in this section
- Zype Analytics V2 to 3 Migration Guide
- Zype Analytics 3: Chart & Metric Guide
- Zype Analytics 3: Integrating Third-Party Players (Web, Mobile, OTT)
- Getting Started with the Analytics 3 API
- Rate Limits and Data Retention
- Real-Time vs Historical Data
- Analytics Data Disclaimer
- Zype Legacy App Templates Upgrade Path to Analytics 3
- FAQ Analytics 3