Get Facebook post monetization earnings
Returns lifetime monetization earnings for ONE Facebook post, read live from Meta on every request. Requires the Analytics add-on.
Earnings are CUMULATIVE since the post was published, not earnings within a date range, so this endpoint takes no since/until and the totals must not be summed across dates or across posts. Page-level daily earnings live on /v1/analytics/facebook/page-insights.
A post on a Page that is not enrolled in monetization, or that earned nothing, returns "total": 0 rather than an error: Meta does not distinguish the two. A metric Meta returned no bucket for at all is reported in "unavailableMetrics" and omitted from "metrics", never as a 0.
Amounts are the platform's raw numbers in the stated "unit" and are never rescaled by Zernio. Breakdown dimensions are not exposed and a "breakdown" param is rejected with 400. So are "since", "until", "period", and "metricType": scoping this endpoint to a window is not possible, and silently returning the lifetime total for one would let a caller sum a year of weekly requests into a figure ~52x the post's real earnings.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
The Zernio SocialAccount ID for the connected Facebook Page.
The platform post ID, exactly as returned in platformAnalytics[].platformPostId by /v1/analytics: "{pageId}_{postId}", or the bare video ID for Reels.
Comma-separated list of monetization metrics. Defaults to both:
- content_monetization_earnings
- monetization_approximate_earnings
content_monetization_earnings always carries unit "micro_amount" plus an ISO 4217 "currency". monetization_approximate_earnings is always a bare number, so its unit is "unspecified" and its "currency" is null. The two are on different scales and are not comparable to each other. Any other metric name is rejected with 400.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.analytics.getFacebookPostEarnings({ query: { accountId: 'account_abc123', postId: 'post_abc123', },});console.log(data);{
"success": true,
"accountId": "64e1a2b3c4d5e6f7a8b9c0d1",
"postId": "123456789_987654321",
"platform": "facebook",
"period": "lifetime",
"metrics": {
"content_monetization_earnings": {
"total": 1234000000,
"unit": "micro_amount",
"currency": "USD"
},
"monetization_approximate_earnings": {
"total": 1234,
"unit": "unspecified",
"currency": null
}
},
"dataDelay": "Meta restates monetization earnings after the fact. Per-post earnings are lifetime cumulative: they are the total since publication, not earnings within a date range, and must not be summed across dates."
}{
"error": "Unauthorized"
}Get Facebook post reactions GET
Returns the reaction breakdown for a Facebook Page post: a count per reaction type plus the overall total. The whole breakdown is fetched in a single Graph call. Note that the post analytics endpoint reports only an aggregate reaction count (surfaced there as `likes`), so use this endpoint when you need per-type counts.
Get TikTok account-level insights GET
Returns account-level TikTok insights from /v2/user/info/ (live) plus historical time series joined from Zernio's daily snapshotter (AccountStats). Response shape matches /v1/analytics/instagram/account-insights. Max 89 days, defaults to last 30 days. Requires the Analytics add-on and the user.info.stats scope on the account (412 if missing). Scope intentionally narrow. TikTok's public API exposes only the four counter metrics below. The deep metrics that live in TikTok Studio are NOT available on any public TikTok API, even for Business accounts: - profile_views - account-level impressions / reach - follower inflow / outflow breakdown - video watch time, average watch time, full-watched rate - impression_sources (FYP / Following / Hashtag / Search / Personal profile) TikTok's Research API doesn't expose those fields either, and is restricted to non-commercial academic use per TikTok's eligibility policy. There is no public API workaround. Post-level metrics (views, likes, comments, shares per video) are available via /v1/analytics?postId=... from TikTok's /v2/video/query/.