Endpoints
GET /analytics/posts/:postId
Return one analytics item for every social publication attached to a FeedHive post.
| Field | Type | Description |
|---|---|---|
| postId | string | FeedHive post identifier returned by the Posts API. |
curl --request GET \
--url https://api.feedhive.com/analytics/posts/post_123 \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'Response
{
"success": true,
"data": {
"post_id": "post_123",
"publications": [
{
"publication_id": "publication_123",
"post_id": "post_123",
"social_provider_id": "social_123",
"provider_type": "LINKEDIN",
"platform_post_id": "urn:li:share:123",
"status": "success",
"metrics": {
"impressions": 1240,
"likes": 42,
"comments": 3,
"clicks": 19
},
"collected_at": "2026-07-24T08:15:00.000Z",
"stale": false,
"error": null
}
]
}
}Every publication item has one status:
| Status | Meaning |
|---|---|
success | Current analytics are available. |
stale_fallback | Refresh failed or timed out and a previous snapshot was returned. |
unsupported | Analytics are not supported for that publication/provider. |
unavailable | No current or fallback analytics could be returned. |
For unsupported or unavailable, metrics is {}, collected_at is null, and error contains a stable code and human-readable message.
The endpoint returns 404 with "Post analytics not found" when the post does not exist or is outside the authenticated context.
GET /analytics/socials/:id
Return the latest normalized account analytics for a social ID from GET /socials.
| Field | Type | Description |
|---|---|---|
| id | string | Connected social account identifier returned by GET /socials. |
curl --request GET \
--url https://api.feedhive.com/analytics/socials/social_123 \
--header 'accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'Response
{
"success": true,
"data": {
"social_provider_id": "social_123",
"provider_type": "LINKEDIN",
"metrics": {
"followers": 4820,
"impressions": 19240,
"pageViews": 731
},
"collected_at": "2026-07-24T08:15:00.000Z",
"stale": false
}
}The endpoint returns 404 with "Social analytics not found" when the social is missing, inactive, or outside the authenticated context. If no snapshot can be produced, the response includes a stable error code such as ANALYTICS_UNSUPPORTED or ANALYTICS_UNAVAILABLE.
Metric availability and meaning vary by provider. Compare trends within the same provider and metric rather than treating all platform metrics as interchangeable.