Post metrics
Read the latest like, comment, share, and view counts for a challenge post, or take a fresh snapshot.
Metrics are stored as snapshots. GET returns the most recent one; POST …/refresh fetches new counts from the platform and stores a new snapshot.
Latest snapshot
GET /admin/challenges/{challengeId}/metrics
curl {API_BASE_URL}/admin/challenges/1/metrics \
-H "Authorization: Bearer <API_TOKEN>"{
"data": {
"likeCount": 5432,
"commentCount": 312,
"shareCount": 89,
"viewCount": 125000,
"fetchedAt": "2026-06-02T15:00:11.000Z"
}
}data is null when no snapshot has been taken yet.
| Field | Type | Notes |
|---|---|---|
likeCount | integer | |
commentCount | integer | |
shareCount | integer or null | Not reported by every platform |
viewCount | integer or null | Reels and TikTok videos; null for image posts |
fetchedAt | date-time | When this snapshot was taken |
Refresh
POST /admin/challenges/{challengeId}/metrics/refresh
curl -X POST {API_BASE_URL}/admin/challenges/1/metrics/refresh \
-H "Authorization: Bearer <API_TOKEN>"Returns the freshly stored PostMetrics object in data.
Errors
The refresh route returns a scraping error when the post cannot be read. The most common case is an age-restricted Instagram post (422 POST_AGE_RESTRICTED), which only the post's author can fix by reposting without the restriction.