Docs
Facebook

Insights

Analytics and normalized metrics for Facebook Page posts.

Fetch post analytics for a published Facebook Page destination. Metrics are mapped into the shared Onepostly insights shape used across platforms.

Requires read_insights (engagement counts also need pages_read_engagement).

Request

curl "https://api.onepostly.com/v1/posts/POST_ID/insights" \
  -H "x-api-key: op_YOUR_KEY"

Optional: ?refresh=1 (or refresh=true) to bypass cache and refetch from Facebook.

Response includes one entry per destination under insights.destinations.

Normalized fields

FieldNotes
impressionsPost impressions when available
reachUnique impressions / unique video views when available
likesReactions / likes when available
commentsComment count when available
sharesShare count when available
savesAlways null on Facebook
playsVideo views when available
engagementEngaged users / clicks, or sum of likes + comments + shares

Missing values are null (not 0), unless a composite field sums available siblings.

Stories are ephemeral — metrics may be limited or short-lived; empty / pending outcomes are expected.

Example response shape

{
  "insights": {
    "postId": "…",
    "status": "ready",
    "destinations": [
      {
        "destinationId": "…",
        "platform": "facebook",
        "status": "ready",
        "metrics": {
          "impressions": 8500,
          "reach": 6200,
          "likes": 210,
          "comments": 18,
          "shares": 7,
          "saves": null,
          "plays": null,
          "engagement": 410
        }
      }
    ]
  }
}

Errors / statuses

Code / statusMeaning
NOT_PUBLISHEDDestination not published yet
INSIGHTS_PENDINGMetrics not ready yet — retry later
INSIGHTS_FAILEDHard failure fetching metrics
MISSING_EXTERNAL_IDNo object id on the destination

Tips

  • Prefer ?refresh=1 only when you need fresh numbers; otherwise cached snapshots are returned
  • For video, check plays in addition to impressions
  • Stories insights may disappear after the story expires

See also