Endpoint
POST https://api.ugc.inc/stats/aggregated/top-accounts
Overview
Get the top N accounts ranked by a specific metric (followers, following, views, or likes). Uses the latest statistics for each account. Perfect for displaying leaderboards and identifying best-performing accounts.
Request Body
The metric to sort by. One of: followers, following, views, likes
Number of accounts to return. Default: 5. Maximum: 100.
Array of account IDs to filter. Omit to include all accounts.
Filter by organization group
Response
Array of top accounts sorted by the requested metric Show TopAccount properties
Platform type (tiktok or instagram)
Total views across all posts
Total likes across all posts
ISO 8601 timestamp of the stat record
cURL
Python
JavaScript
React
curl -X POST https://api.ugc.inc/stats/aggregated/top-accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metric": "followers",
"limit": 5,
"tag": "fitness"
}'
{
"ok" : true ,
"code" : 200 ,
"message" : "Success" ,
"data" : [
{
"account_id" : "acc_123456" ,
"username" : "fitness_guru" ,
"nick_name" : "Fitness Guru" ,
"pfp_url" : "https://example.com/avatar.jpg" ,
"type" : "tiktok" ,
"tag" : "fitness" ,
"followers" : 125000 ,
"following" : 342 ,
"views" : 5600000 ,
"likes" : 420000 ,
"created_at" : "2024-01-15T10:00:00Z"
},
{
"account_id" : "acc_789012" ,
"username" : "workout_daily" ,
"nick_name" : "Daily Workouts" ,
"pfp_url" : "https://example.com/avatar2.jpg" ,
"type" : "tiktok" ,
"tag" : "fitness" ,
"followers" : 98500 ,
"following" : 289 ,
"views" : 3200000 ,
"likes" : 280000 ,
"created_at" : "2024-01-15T10:00:00Z"
}
]
}