---
title: "Get Facebook post monetization earnings"
method: GET
path: "/v1/analytics/facebook/post-earnings"
tags: ["Analytics"]
---

# Get Facebook post monetization earnings

`GET /v1/analytics/facebook/post-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.

## Query parameters

- `accountId` string, required
- `postId` string, required
- `metrics` string

## Response `200`

Lifetime per-post monetization earnings

- FacebookPostEarningsResponse — Lifetime monetization earnings for one Facebook post. Same "unit" / "currency" contract and same unavailable-vs-zero contract as the Page-level response; there is no date range, no metricType, and no daily "values", because the single lifetime bucket IS the total.
  - `success` boolean
  - `accountId` string
  - `postId` string — The platform post ID that was queried, echoed back.
  - `platform` string
  - `period` 'lifetime' — Always "lifetime": the total is cumulative since publication and must not be summed across dates or across posts.
  - `metrics` object — One entry per served metric. A metric reported here with "total": 0 genuinely earned nothing (or its Page is not enrolled, which Meta reports identically).
  - `unavailableMetrics` object[] — Requested metrics Meta could not serve. Present only when at least one metric is unavailable, and absent otherwise. Each listed metric is OMITTED from "metrics" rather than reported as 0. The request itself still succeeds with HTTP 200.
    - `metric` string — The requested metric name.
    - `reason` 'not_enrolled' | 'permission_missing' | 'unsupported_metric' | 'no_data' | 'unreadable_value' | 'mixed_currency' | 'upstream_error' — "not_enrolled": the account is not enrolled in the program behind this metric. "permission_missing": the connected user lacks access to this metric. "unsupported_metric": Meta does not accept this metric name on the API version Zernio uses. "no_data": Meta returned no bucket for this metric. "unreadable_value": Meta returned a value shape Zernio cannot read, so no total is reported. "mixed_currency": readable values disagree on currency or unit. "upstream_error": any other platform failure. "no_data" is the common case in practice; the others are defensive.
    - `message` string — Platform-provided explanation when available (access tokens redacted), otherwise Zernio copy.
  - `dataDelay` string

## Other responses

- `400` — Bad request. Common cases: - Invalid accountId format, or a metric name that is not a monetization metric - A "breakdown" param was supplied (breakdown dimensions are not exposed) - A "since", "until", "period", or "metricType" param was supplied (this endpoint returns a lifetime total and takes no date range) - Account has no Page access token (metadata.pageAccessToken missing) - Account is not a Facebook account
- `401` — Unauthorized
- `402` — Analytics access required. Legacy plans need the Analytics add-on; included by default on usage-based plans.
- `404` — Account not found

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/f81ca70ea6b9/schema)
