X (Twitter)
Insights
Analytics and normalized metrics for X posts.
Fetch post analytics for a published X destination. Metrics are mapped into the shared Onepostly insights shape used across platforms.
Request
curl "https://api.onepostly.com/v1/posts/POST_ID/insights?destinationId=DEST_ID" \
-H "x-api-key: op_YOUR_KEY"Requires tweet.read. Wallet: billed as an X read at X list prices.
Normalized fields
| Field | Meaning |
|---|---|
impressions | Impression count when available |
reach | Always null on X |
likes | Like count |
comments | Reply count |
shares | Retweets + quotes |
saves | Bookmark count |
plays | Same as impressions when present |
engagement | likes + comments + shares + saves (null if all inputs are null) |
Missing values are null (not 0), unless a composite field deliberately treats missing parts as 0 when at least one sibling is present (shares, engagement).
Example response shape
{
"status": "ready",
"metrics": {
"impressions": 1200,
"reach": null,
"likes": 42,
"comments": 3,
"shares": 11,
"saves": 5,
"plays": 1200,
"engagement": 61
}
}Errors
| Code | Meaning |
|---|---|
MISSING_EXTERNAL_ID | Destination not published |
INSIGHTS_PERMISSION | Missing tweet.read or unauthorized |
INSUFFICIENT_WALLET | Onepostly wallet empty |
INSIGHTS_FAILED | Tweet not found or other hard failure |
Tips
- For retweet counts, prefer
metrics.sharesover listing retweeters (list can be flaky) - Impressions may stay
nulldepending on X access tier
See also
- Overview — scopes and wallet
- Engagement
- OpenAPI