Get Facebook Page demographics
Returns the follower breakdown of a connected Facebook Page by country and/or city, from Meta's latest daily snapshot. Country keys are ISO 3166-1 alpha-2 codes; city keys are "City, Region, Country" strings as Meta returns them. Meta removed age and gender demographics for Pages (page_fans_gender_age) on November 15 2025 with no replacement, so only country and city are available. Meta reports small counts at a privacy floor, so the long tail can show identical low values. Requires the Analytics add-on.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
The Zernio SocialAccount ID for the Facebook account
Comma-separated list of demographic dimensions: country, city. Defaults to both if omitted.
Response Body
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.analytics.getFacebookDemographics({ query: { accountId: 'account_abc123', },});console.log(data);{ "success": true, "accountId": "64e1a2b3c4d5e6f7a8b9c0d1", "platform": "facebook", "metric": "follower_demographics", "snapshotDate": "2026-10-03", "demographics": { "country": [ { "dimension": "MA", "value": 145 }, { "dimension": "IN", "value": 105 } ], "city": [ { "dimension": "Casablanca, Morocco", "value": 21 }, { "dimension": "Johannesburg, South Africa", "value": 3 } ] }, "note": "Followers by country and city from Meta's latest daily snapshot. Meta removed age and gender for Pages in November 2025."}Get an analytics dashboard
Everything an analytics dashboard needs in one call: window totals, follower growth, a per-day series, top posts, recent posts and, optionally, the same figures for the previous period. Daily and total metrics use received attribution: each day holds the engagement that arrived that day, on any post, so `totals` is always the sum of `daily`. `topPosts` and `recentPosts` list posts published in the window with their lifetime metrics. A post cross-posted to several platforms appears once per platform. All dates are UTC days. Requires the Analytics add-on.
List conversation analytics
Per-conversation listing with per-row totals + first/last message timestamps. The inbox analog of GET /v1/analytics (posts listing): same filter shape, same pagination, same sort/order semantics. Use as the entry point for the per-conversation analytics drawer at /v1/analytics/inbox/conversations/{conversationId}. Rows are enriched with the conversation's participant info (`participantName`, `participantUsername`, `participantPicture`) and last-message preview by joining the Conversation document scoped to the caller's team. Max date range is 365 days.