Get account analytics

View .md

List cached official account/profile metrics for connected social accounts.


List cached official account/profile metrics for connected accounts. The exact metric keys depend on the platform and granted scopes, and can include followers, reach, views, engagement, public metrics, page statistics and video profile stats.

GET/v1/analytics/accounts
API key (dra_…) or dashboard JWT

List cached official account/profile metrics for connected social accounts.

Authorizationstringheaderrequired

Bearer token. Use a Dravo API key (`dra_…`) or a dashboard JWT.

accountIdstringquery

Filter by connected account id.

platformstringquery

Filter by platform: instagram, facebook, x, linkedin or tiktok.

refreshbooleanquery

When true, bypass fresh cache and ask the platform again.

limitintquery

Page size, 1 to 100 (default 100).

itemsobject[]

One row per connected account; each row has the fields below.

account_idstring

Connected account id.

platformstring

Social network.

handlestringoptional

Account handle/username.

platform_account_idstringoptional

Native account id on the platform.

metricsobject

Official account metrics. Keys depend on the platform — see Metrics by platform below.

warningsstring[]

Non-fatal notices raised while syncing.

sync_statusstring

synced, partial, pending, failed or requires_reconnect.

error_messagestringoptional

Failure detail on sync errors.

last_updated_atstringoptional

Last refresh time.

stale_afterstringoptional

When the cache becomes stale.

totalinteger

Number of accounts returned.

Metrics by platform

Keys inside metrics vary per platform. Instagram, Facebook and TikTok return a fixed set; X and LinkedIn return keys straight from their APIs, so the exact set can vary with the access level and scopes granted to your app.

Instagram7 metrics
follower_countinteger

Followers of the account.

reachinteger

Unique accounts reached.

viewsinteger

Content views.

accounts_engagedinteger

Accounts that engaged.

total_interactionsinteger

All interactions across content.

likes / comments / shares / saves / repliesinteger

Interaction breakdown.

profile_views / website_clicks / profile_links_tapsinteger

Profile activity.

Facebook3 metrics
followers_countinteger

Page followers.

talking_about_count / were_here_count / checkinsinteger

Page profile counters.

page_post_engagements / page_consumptions / page_actions_post_reactions_total / page_video_views / page_views_total / page_total_actionsinteger

Page insight metrics.

X6 metrics
followers_countinteger

Followers of the account.

following_countinteger

Accounts followed.

tweet_countinteger

Posts published.

listed_countinteger

Lists the account appears on.

like_countinteger

Likes given.

verified_followers_countintegeroptional

Verified followers, when available.

LinkedIn1 metrics
page_statistics_* / follower_statistics_*integer

Page and follower totals flattened from LinkedIn statistics. Exact keys are derived from the API response.

TikTok4 metrics
follower_countinteger

Followers of the account.

following_countinteger

Accounts followed.

likes_countinteger

Total likes received.

video_countinteger

Videos published.

Error codes

401

Missing or invalid API key / JWT.

const response = await fetch("https://api.dravo.dev/v1/analytics/accounts", {  method: "GET",  headers: {  "Authorization": "Bearer " + process.env.DRAVO_API_KEY,}});const data = await response.json();console.log(data);
{  "items": [    {      "account_id": "acc_8f2c1d",      "platform": "x",      "handle": "@dravo",      "platform_account_id": "1234567890",      "metrics": {        "followers_count": 2400,        "following_count": 180,        "tweet_count": 320,        "listed_count": 14,        "like_count": 900      },      "warnings": [],      "sync_status": "synced",      "error_message": null,      "last_updated_at": "2026-06-29T09:00:00Z",      "stale_after": "2026-06-29T15:00:00Z"    },    {      "account_id": "acc_4b9e07",      "platform": "facebook",      "handle": "Dravo",      "platform_account_id": "1122334455",      "metrics": {        "followers_count": 12000,        "talking_about_count": 84,        "page_video_views": 3200      },      "warnings": [        "Facebook Page insight metrics unavailable."      ],      "sync_status": "partial",      "error_message": null,      "last_updated_at": "2026-06-29T09:00:00Z",      "stale_after": "2026-06-29T15:00:00Z"    }  ],  "total": 2}