Analytics
Fetch performance metrics for published post items.
Get Post Item Analytics
GET /api/v1/post-items/{post_item_id}/analytics
Fetch the latest performance snapshot for a single post item. Use the item_id returned by POST /api/v1/posts or GET /api/v1/posts/{id}.
Metrics are polled once a day for up to 90 days after the item is posted. After that, fetched_at stops advancing. There's no on-demand refresh, so check fetched_at to see how old the numbers are.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
post_item_id | string | The post item ID |
Response
| Field | Type | Description |
|---|---|---|
post_item_id | string | The item ID you queried |
post_type | string | e.g. instagram-reel, tiktok-video |
platform | string | Platform derived from post_type |
status | string | Item status (draft, posting, posted, failed) |
metrics | object | null | See below. null when the item hasn't been posted or polled |
Metrics Object
| Field | Type | Description |
|---|---|---|
views | number | Views or impressions reported by platform |
likes | number | Likes or reactions |
comments | number | Comments count |
fetched_at | string | ISO timestamp of the snapshot |
Not all platforms report all three fields. Missing values are returned as 0.
Example
curl https://powerpost.ai/api/v1/post-items/550e8400-e29b-41d4-a716-446655440000/analytics \
-H "x-api-key: pp_live_sk_YOUR_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_ID"const res = await fetch(
`https://powerpost.ai/api/v1/post-items/${itemId}/analytics`,
{
headers: {
'x-api-key': 'pp_live_sk_YOUR_KEY',
'X-Workspace-Id': 'YOUR_WORKSPACE_ID',
},
}
)
const data = await res.json()import requests
res = requests.get(
f"https://powerpost.ai/api/v1/post-items/{item_id}/analytics",
headers={
"x-api-key": "pp_live_sk_YOUR_KEY",
"X-Workspace-Id": "YOUR_WORKSPACE_ID",
},
)
data = res.json()Sample Response
{
"post_item_id": "550e8400-e29b-41d4-a716-446655440000",
"post_type": "instagram-reel",
"platform": "instagram",
"status": "posted",
"metrics": {
"views": 12450,
"likes": 890,
"comments": 42,
"fetched_at": "2026-04-15T09:00:00Z"
}
}Errors
| Code | Description |
|---|---|
| 401 | Invalid API key |
| 404 | Post item not found or belongs to a different workspace |
| 429 | Rate limit exceeded |