Get follower stats
Returns follower count history and growth metrics for connected social accounts. Requires analytics add-on subscription. Follower counts are refreshed once per day.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Comma-separated list of account IDs (optional, defaults to all user's accounts)
Filter by profile ID
Start date in YYYY-MM-DD format (defaults to 30 days ago)
dateEnd date in YYYY-MM-DD format (defaults to today)
dateData aggregation level
"daily""daily" | "weekly" | "monthly"Response Body
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.accounts.getFollowerStats();console.log(data);{
"accounts": [
{
"_id": "64e1...",
"platform": "twitter",
"username": "@acme",
"currentFollowers": 1250,
"growth": 50,
"growthPercentage": 4.17,
"dataPoints": 30
}
],
"stats": {
"64e1...": [
{
"date": "2024-01-01",
"followers": 1200
},
{
"date": "2024-01-02",
"followers": 1250
}
]
},
"dateRange": {
"from": "2024-01-01T00:00:00.000Z",
"to": "2024-01-31T23:59:59.999Z"
},
"granularity": "daily"
}{
"error": "Unauthorized"
}{
"error": "Analytics add-on required",
"message": "Follower stats tracking requires the Analytics add-on. Please upgrade to access this feature.",
"requiresAddon": true
}Check accounts health GET
Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
Check whether an Instagram user follows the account GET
Resolves the follow relationship between an Instagram user and the connected account, plus their public profile counters. `userId` is the Instagram-scoped id (IGSID) Meta gives you on a webhook: `sender.id` on `message.received`, `comment.author.id` on `comment.received`. **Meta only answers for people who have MESSAGED the account.** Commenting grants no consent, so a commenter who has never DMed you is unresolvable - that is a platform rule, not a limitation of this endpoint. When it cannot be resolved the response is still `200` with `isFollower: null` and an `unavailableReason`, because "unknown" is a normal state to branch on: * `consent_required` - the user has never messaged this account. * `dm_access_disabled` - the account owner turned off Instagram Direct API access. * `not_messageable` - the id is not a messaging-scoped id. * `error` - a transient Graph API failure. To gate a comment automation on this, use the automation's `audience` rules instead of calling this per comment - they run the same lookup only on comments that actually match a keyword, and can ask the commenter to confirm with one tap. Answers are cached briefly per (account, user). Pass `refresh=true` right after asking someone to follow, so a follow from a moment ago is visible.