Get post analytics
With postId, returns analytics for a single post. Without postId, returns a paginated list of published posts with analytics. Accepts both PostPeer post IDs and external platform post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Each call costs 1 credit.
/v1/analytics/Authorization
accessKey In: header
Query Parameters
PostPeer post ID or external platform post ID (auto-resolved). When omitted, returns a paginated list of all published posts with analytics.
"twitter" | "instagram" | "youtube" | "tiktok" | "pinterest" | "linkedin" | "bluesky"Integration ID. Required for external ID lookups and source=platform.
Where the result came from. "postpeer" = posts published via PostPeer (stored in our DB). "platform" = fetched directly from the connected platform account.
"postpeer" | "platform"Inclusive start date (YYYY-MM-DD). Defaults to 90 days ago.
dateInclusive end date (YYYY-MM-DD). Defaults to today.
dateSort results by this metric
"date""date" | "likes" | "comments" | "impressions" | "views" | "shares" | "saves" | "clicks" | "engagement""asc" | "desc"Page size (1-100)
501 <= value <= 100Page number
11 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.postpeer.dev/v1/analytics/"{
"success": true,
"post": {
"source": "postpeer",
"postId": "string",
"content": "string",
"publishedAt": "2019-08-24T14:15:22Z",
"aggregated": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"engagementRate": 0
},
"platforms": [
{
"platform": "twitter",
"platformPostId": "string",
"platformPostUrl": "string",
"metrics": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"shares": 0,
"saves": 0,
"clicks": 0,
"views": 0,
"engagementRate": 0
}
}
]
}
}{
"success": true,
"message": "string"
}{
"success": true,
"message": "string"
}{
"success": true,
"message": "string"
}