Get post analytics
Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Zernio Post IDs and External Post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Single post lookups may return 202 (sync pending) or 424 (all platforms failed). For follower stats, use /v1/accounts/follower-stats.
LinkedIn personal accounts: Analytics are only available for posts published through Zernio. LinkedIn's API only returns metrics for posts authored by the authenticated user. Organization/company page analytics work for all posts.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Returns analytics for a single post. Accepts both Zernio Post IDs and External Post IDs. Zernio IDs are auto-resolved to External Post analytics.
Filter by platform (default "all")
Filter by profile ID (default "all")
Filter by social account ID
Filter by post source: late (posted via Zernio API), external (synced from platform), all (default)
"all""all" | "late" | "external"Inclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days.
dateInclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
datePage size (default 50)
501 <= value <= 100Page number (default 1)
11 <= valueSort by date, engagement, or a specific metric
"date""date" | "engagement" | "impressions" | "reach" | "likes" | "comments" | "shares" | "saves" | "clicks" | "views" | "follows"Sort order
"desc""asc" | "desc"Response Body
application/json
application/json
application/json
application/json
application/json
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.getAnalytics();console.log(data);{
"postId": "65f1c0a9e2b5af0012ab34cd",
"latePostId": null,
"status": "published",
"content": "Check out our new product launch!",
"scheduledFor": "2024-11-01T10:00:00Z",
"publishedAt": "2024-11-01T10:00:05Z",
"analytics": {
"impressions": 15420,
"reach": 12350,
"likes": 342,
"comments": 28,
"shares": 45,
"saves": 0,
"clicks": 189,
"views": 0,
"engagementRate": 2.78,
"lastUpdated": "2024-11-02T08:30:00Z"
},
"platformAnalytics": [
{
"platform": "twitter",
"status": "published",
"platformPostId": "123456789",
"accountId": "64e1f0a9e2b5af0012ab34cd",
"accountUsername": "@acmecorp",
"analytics": {
"impressions": 15420,
"reach": 12350,
"likes": 342,
"comments": 28,
"shares": 45,
"saves": 0,
"clicks": 189,
"views": 0,
"engagementRate": 2.78,
"lastUpdated": "2024-11-02T08:30:00Z"
},
"syncStatus": "synced",
"platformPostUrl": "https://twitter.com/acmecorp/status/123456789",
"errorMessage": null
}
],
"platform": "twitter",
"platformPostUrl": "https://twitter.com/acmecorp/status/123456789",
"isExternal": false,
"syncStatus": "synced",
"message": null,
"thumbnailUrl": "https://storage.example.com/image.jpg",
"mediaType": "image",
"mediaItems": [
{
"type": "image",
"url": "https://storage.example.com/image.jpg",
"thumbnail": "https://storage.example.com/image.jpg"
}
]
}{
"postId": "string",
"latePostId": "string",
"status": "published",
"content": "string",
"scheduledFor": "2019-08-24T14:15:22Z",
"publishedAt": "2019-08-24T14:15:22Z",
"analytics": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"follows": 0,
"igReelsAvgWatchTime": 0,
"igReelsVideoViewTotalTime": 0,
"engagementRate": 0,
"lastUpdated": "2019-08-24T14:15:22Z"
},
"platformAnalytics": [
{
"platform": "string",
"status": "published",
"platformPostId": "string",
"accountId": "string",
"accountUsername": "string",
"analytics": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"follows": 0,
"igReelsAvgWatchTime": 0,
"igReelsVideoViewTotalTime": 0,
"engagementRate": 0,
"lastUpdated": "2019-08-24T14:15:22Z"
},
"syncStatus": "synced",
"platformPostUrl": "http://example.com",
"errorMessage": "string"
}
],
"platform": "string",
"platformPostUrl": "http://example.com",
"isExternal": true,
"syncStatus": "synced",
"message": "string",
"thumbnailUrl": "http://example.com",
"mediaType": "image",
"mediaItems": [
{
"type": "image",
"url": "http://example.com",
"thumbnail": "http://example.com",
"altText": "string"
}
]
}{
"error": "Invalid query parameters",
"details": {}
}{
"error": "Unauthorized"
}{
"error": "Analytics add-on required",
"code": "analytics_addon_required"
}{
"error": "Not found"
}{
"postId": "string",
"latePostId": "string",
"status": "published",
"content": "string",
"scheduledFor": "2019-08-24T14:15:22Z",
"publishedAt": "2019-08-24T14:15:22Z",
"analytics": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"follows": 0,
"igReelsAvgWatchTime": 0,
"igReelsVideoViewTotalTime": 0,
"engagementRate": 0,
"lastUpdated": "2019-08-24T14:15:22Z"
},
"platformAnalytics": [
{
"platform": "string",
"status": "published",
"platformPostId": "string",
"accountId": "string",
"accountUsername": "string",
"analytics": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"follows": 0,
"igReelsAvgWatchTime": 0,
"igReelsVideoViewTotalTime": 0,
"engagementRate": 0,
"lastUpdated": "2019-08-24T14:15:22Z"
},
"syncStatus": "synced",
"platformPostUrl": "http://example.com",
"errorMessage": "string"
}
],
"platform": "string",
"platformPostUrl": "http://example.com",
"isExternal": true,
"syncStatus": "synced",
"message": "string",
"thumbnailUrl": "http://example.com",
"mediaType": "image",
"mediaItems": [
{
"type": "image",
"url": "http://example.com",
"thumbnail": "http://example.com",
"altText": "string"
}
]
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}Delete automation DELETE
Permanently delete an automation and all its trigger logs.
Sync an external post POST
Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.