Get daily aggregated metrics
Returns daily aggregated analytics metrics and a per-platform breakdown. Each day includes post count, platform distribution, and summed metrics (impressions, reach, likes, comments, shares, saves, clicks, views). Defaults to the last 180 days. Requires the Analytics add-on.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Filter by platform (e.g. "instagram", "tiktok"). Omit for all platforms.
Filter by profile ID. Omit for all profiles.
Filter by social account ID
Inclusive start date (ISO 8601). Defaults to 180 days ago.
date-timeInclusive end date (ISO 8601). Defaults to now.
date-timeFilter by post origin. "late" for posts published via Zernio, "external" for posts imported from platforms.
"all""all" | "late" | "external"How each post's engagement is attributed to a day. "publish" (default) sums each post's lifetime total on its publish date. "received" buckets the per-day increase in engagement by the day it actually arrived (engagement-over-time), so engagement on older posts appears on the day it was gained rather than the post's publish date.
"publish""publish" | "received"Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.analytics.getDailyMetrics();console.log(data);{
"dailyData": [
{
"date": "2025-12-01",
"postCount": 3,
"platforms": {
"instagram": 2,
"twitter": 1
},
"metrics": {
"impressions": 4520,
"reach": 3200,
"likes": 312,
"comments": 45,
"shares": 28,
"saves": 67,
"clicks": 89,
"views": 1560
}
}
],
"platformBreakdown": [
{
"platform": "instagram",
"postCount": 142,
"impressions": 89400,
"reach": 62100,
"likes": 8930,
"comments": 1204,
"shares": 567,
"saves": 2103,
"clicks": 3402,
"views": 45200
}
]
}{
"error": "Unauthorized"
}{
"error": "Analytics add-on required",
"code": "analytics_addon_required"
}Get post analytics timeline GET
Returns a daily timeline of analytics metrics for a specific post, showing how impressions, likes, and other metrics evolved day-by-day since publishing. Each row represents one day of data per platform. For multi-platform Zernio posts, returns separate rows for each platform. Requires the Analytics add-on.
Get best times to post GET
Returns the best times to post based on historical engagement data. Groups all published posts by day of week and hour (UTC), calculating average engagement per slot. Use this to auto-schedule posts at optimal times. Requires the Analytics add-on.