API resource

Facebook

Page insights and earnings, post reactions, and switching which Page an account posts to.

Get Facebook Page insights

GET/v1/analytics/facebook/page-insights

Works on: Facebook

Returns page-level Facebook insights (media views, views, post engagements, video metrics, follower counts). Response shape matches /v1/analytics/instagram/account-insights so the same client handling works across platforms. Metric names track the current (post-November 2025) Meta Graph API. The legacy page_impressions / page_fans / page_fan_adds / page_fan_removes metrics were deprecated by Meta on November 15, 2025 and are NOT accepted by this endpoint. Use the replacements below. Because Meta did not provide direct adds/removes replacements, Creator OS synthesizes followers_gained / followers_lost from the daily follower snapshotter. Max 89 days, defaults to last 30 days.

Query parameters

accountIdstringrequired

The account id for the connected Facebook Page.

metricsstring

Comma-separated list of metrics. Defaults to "page_media_view,page_post_engagements,page_follows,followers_gained,followers_lost".

fromDatestring

Start date (YYYY-MM-DD). Defaults to 30 days ago.

toDatestring

End date (YYYY-MM-DD). Defaults to today.

sincestring

Alias of fromDate, kept for existing callers

untilstring

Alias of toDate, kept for existing callers

metricTypestring

"total_value" (default) returns aggregated totals only. "time_series" returns daily values in the "values" array.

curl "https://creatoros-production-5658.up.railway.app/v1/analytics/facebook/page-insights?accountId=acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y" \
  -H "Authorization: Bearer $CREATOROS_API_KEY"
Response 200
{
  "success": true,
  "accountId": "acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y",
  "platform": "facebook",
  "dateRange": {
    "since": "string",
    "until": "string"
  },
  "metricType": "time_series",
  "breakdown": "string",
  "metrics": {},
  "unavailableMetrics": [
    {
      "metric": "string",
      "reason": "not_enrolled",
      "message": "string"
    }
  ],
  "dataDelay": "Data may be delayed up to 48 hours"
}

Get Facebook post monetization earnings

GET/v1/analytics/facebook/post-earnings

Works on: Facebook

Returns lifetime monetization earnings for ONE Facebook post, read live from Meta on every request. Requires analytics access on your plan. 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.

Query parameters

accountIdstringrequired

The account id for the connected Facebook Page.

postIdstringrequired

The platform post ID, exactly as returned in platformAnalytics[].platformPostId by /v1/analytics: "{pageId}_{postId}", or the bare video ID for Reels.

metricsstring

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".

curl "https://creatoros-production-5658.up.railway.app/v1/analytics/facebook/post-earnings?accountId=acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y&postId=%3CpostId%3E" \
  -H "Authorization: Bearer $CREATOROS_API_KEY"
Response 200
{
  "success": true,
  "accountId": "64e1a2b3c4d5e6f7a8b9c0d1",
  "postId": "123456789_987654321",
  "platform": "facebook",
  "period": "lifetime",
  "metrics": {},
  "unavailableMetrics": [
    {
      "metric": "string",
      "reason": "not_enrolled",
      "message": "string"
    }
  ],
  "dataDelay": "string"
}

Get Facebook post reactions

GET/v1/accounts/{accountId}/facebook-post-reactions

Works on: Facebook

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. The post analytics endpoint reports only an aggregate reaction count (surfaced there as `likes`), so use this endpoint when you need per-type counts.

Path parameters

accountIdstringrequired

The ID of the Facebook Page account

Query parameters

postIdstringrequired

The Facebook post ID

curl "https://creatoros-production-5658.up.railway.app/v1/accounts/acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y/facebook-post-reactions?postId=%3CpostId%3E" \
  -H "Authorization: Bearer $CREATOROS_API_KEY"
Response 200
{
  "accountId": "acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y",
  "platform": "facebook",
  "username": "string",
  "postId": "string",
  "total": 0,
  "breakdown": {
    "like": 0,
    "love": 0,
    "haha": 0,
    "wow": 0,
    "sad": 0,
    "angry": 0,
    "care": 0
  },
  "lastUpdated": "string"
}

List Facebook pages

GET/v1/accounts/{accountId}/facebook-page

Works on: Facebook

Returns all Facebook pages the connected account has access to, including the currently selected page.

Path parameters

accountIdstringrequired

No description

Query parameters

refreshstring

When true, bypasses the page cache and fetches fresh pages from Meta. Rate-limited server-side to 1 refresh per 60s. Pages no longer accessible to the connected account will be removed from the list on refresh.

curl "https://creatoros-production-5658.up.railway.app/v1/accounts/acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y/facebook-page" \
  -H "Authorization: Bearer $CREATOROS_API_KEY"
Response 200
{
  "pages": [
    {
      "id": "string",
      "name": "string",
      "username": "string",
      "category": "string",
      "fan_count": 0
    }
  ],
  "selectedPageId": "string",
  "cached": true
}

Update Facebook page

PUT/v1/accounts/{accountId}/facebook-page

Works on: Facebook

Switch which Facebook Page is active for a connected account.

Path parameters

accountIdstringrequired

No description

Body

selectedPageIdstringrequired

No description

curl -X PUT "https://creatoros-production-5658.up.railway.app/v1/accounts/acc_Fb2Qp7Vz4Ny9Tx1Lm6Rc3Wb8Js5Df0Ga7Ue2Ki4Oq9Y/facebook-page" \
  -H "Authorization: Bearer $CREATOROS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "selectedPageId": "<selectedPageId>"
  }'
Response 200
{
  "message": "string",
  "selectedPage": {
    "id": "string",
    "name": "string"
  }
}