Get post analytics

View .md

List cached official analytics for posts published through Dravo.


List cached official analytics for posts published through Dravo. Use postId to fetch a single Dravo post id or platform post id, or filter by account, platform and publish date.

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

List cached official analytics for posts published through Dravo. Missing or stale rows are refreshed from the platform API.

Authorizationstringheaderrequired

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

postIdstringquery

Filter to one Dravo post id or platform post id.

accountIdstringquery

Filter by connected account id.

platformstringquery

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

fromDatestring (ISO 8601)query

Only include published results created at or after this date.

toDatestring (ISO 8601)query

Only include published results created at or before this date.

refreshbooleanquery

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

pageintquery

Page number, starting at 1 (default 1).

limitintquery

Page size, 1 to 100 (default 25).

itemsobject[]

Analytics rows on this page; each row has the fields below.

post_idstring

Dravo post id. Groups every publication of the same content across networks; aggregate a post by summing items that share this id.

account_idstringoptional

Connected account these metrics come from.

platformstring

Social network: instagram, facebook, x, linkedin or tiktok.

platform_post_idstring

Native id of the post on the platform.

platform_post_urlstringoptional

Direct link to the published post.

textstringoptional

Text of the published post.

created_atstring (ISO 8601)

When the publish result was recorded by Dravo.

published_atstringoptional

When the post went live on the network.

metricsobject

Official metrics for this post. 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 when sync_status is failed or requires_reconnect.

last_updated_atstringoptional

Last time the metrics were refreshed from the platform.

stale_afterstringoptional

After this timestamp the cached metrics are refreshed on the next read.

totalinteger

Total rows matching the query.

pageinteger

Current page (1-based).

limitinteger

Page size.

overviewobject

Aggregated metrics across the rows on this page.

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
viewsinteger

Times the post was played or displayed.

reachinteger

Unique accounts that saw the post.

likesinteger

Likes on the post.

commentsinteger

Comments on the post.

sharesinteger

Times the post was shared.

savedinteger

Times the post was saved.

total_interactionsinteger

Sum of likes, comments, shares and saves.

Facebook3 metrics
post_engaged_usersinteger

Unique users who engaged with the post.

post_clicksinteger

Clicks anywhere on the post.

post_reactions_by_type_totalinteger

Total reactions across all reaction types.

X6 metrics
impression_countinteger

Times the post was seen.

like_countinteger

Likes on the post.

retweet_countinteger

Reposts of the post.

reply_countinteger

Replies to the post.

quote_countinteger

Quote posts of the post.

bookmark_countinteger

Times the post was bookmarked.

LinkedIn1 metrics
share_statistics_*integer

Engagement totals flattened from LinkedIn share statistics (impressions, clicks, likes, comments, shares, engagement). Exact keys are derived from the API response.

TikTok4 metrics
view_countinteger

Video views.

like_countinteger

Likes on the video.

comment_countinteger

Comments on the video.

share_countinteger

Shares of the video.

Error codes

401

Missing or invalid API key / JWT.

const response = await fetch("https://api.dravo.dev/v1/analytics/posts", {  method: "GET",  headers: {  "Authorization": "Bearer " + process.env.DRAVO_API_KEY,}});const data = await response.json();console.log(data);
{  "items": [    {      "post_id": "post_2a7f93",      "account_id": "acc_8f2c1d",      "platform": "instagram",      "platform_post_id": "18000000000000000",      "platform_post_url": "https://www.instagram.com/p/example/",      "text": "Shipping Dravo: one API for every social network.",      "created_at": "2026-06-23T10:15:30Z",      "published_at": "2026-06-23T10:16:02Z",      "metrics": {        "views": 1240,        "reach": 980,        "likes": 84,        "comments": 6,        "shares": 12      },      "warnings": [],      "sync_status": "synced",      "error_message": null,      "last_updated_at": "2026-06-29T09:00:00Z",      "stale_after": "2026-06-29T15:00:00Z"    }  ],  "total": 1,  "page": 1,  "limit": 25,  "overview": {    "posts": 1,    "metrics": {      "views": 1240,      "reach": 980,      "likes": 84,      "comments": 6,      "shares": 12    }  }}