POST https://api.ugc.inc/stats/aggregated/top-posts
Overview
Get the top N posts ranked by a specific metric (views, likes, comments, or shares). Uses the latest statistics for each post. Perfect for displaying top content and identifying viral posts.
Request Body
string
required
The metric to sort by. One of: views, likes, comments, shares
number
Number of posts to return. Default: 5. Maximum: 100.
string[]
Array of post IDs to filter. Omit to include all posts.
Response
TopPost[]
Array of top posts sorted by the requested metric
Show TopPost properties
string
Post identifier
string
Associated account ID
string | null
Post caption/description
string[] | null
Array of media URLs
string
Post type (video or slideshow)
string | null
Platform-specific post ID
number | null
Total views
number | null
Total likes
number | null
Total comments
number | null
Total shares
string
ISO 8601 UTC timestamp (ends in Z) of the stat record