Analytics
Which analytics metrics Facebook returns for Page posts.
Call GET /v1/analytics?platform=facebook (Analytics API).
| Metric | Available |
|---|---|
| Impressions | |
| Likes | |
| Comments | |
| Shares | |
| Clicks | |
| Views |
Meta's CDN links for post images and covers expire.
When one has lapsed, the analytics response re-reads the media from Meta. It serves thumbnailUrl and the mediaItems images from Zernio storage instead, so those URLs do not expire and you can cache them.
Video file URLs stay Meta's signed links and are refreshed on read once they lapse.
const { data: analytics } = await zernio.analytics.getAnalytics({
query: { platform: 'facebook', fromDate: '2026-08-01', toDate: '2026-08-31' }
});
console.log(analytics.posts);Response (200), one entry per post:
{
"posts": [
{
"_id": "65f1c0a9e2b5af0012ab34cd",
"platform": "facebook",
"status": "published",
"publishedAt": "2026-08-14T10:00:05Z",
"platformPostUrl": "https://www.facebook.com/123456789012345/posts/987654321",
"analytics": {
"impressions": 15420,
"likes": 342,
"comments": 28,
"shares": 45,
"clicks": 189,
"views": 0,
"engagementRate": 2.78
}
}
]
}Three Facebook-only endpoints go deeper:
- Page insights: page-level aggregates (media views, post engagements, video metrics, follower counts) over at most 89 days, defaulting to the last 30. Metric names follow the current Meta Graph API; the legacy
page_impressions,page_fans,page_fan_addsandpage_fan_removesmetrics were deprecated by Meta on November 15, 2025 and are rejected.followers_gainedandfollowers_lostcome from Zernio's daily follower snapshotter. - Post reactions: a count per reaction type for one post. The post analytics above report only the aggregate, as
likes. - Post earnings: lifetime monetization earnings for one post, read live from Meta. There is no date range, so never sum the totals across dates. A Page not enrolled in monetization returns
total: 0.
Was this page helpful?