Skip to main content

Endpoint

POST https://api.ugc.inc/stats/aggregated/daily

Overview

Get daily aggregated statistics showing total changes across all filtered accounts per day. This endpoint is optimized for rendering time-series charts and dashboards. Returns one record per day containing the sum of daily changes for all metrics (followers, following, views, likes) across all accounts matching your filters.

Request Body

startDate
string
required
Start date in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
endDate
string
required
End date in ISO 8601 format (e.g., 2024-12-31T23:59:59Z)
accountIds
string[]
Array of account IDs to include in aggregation. Omit to include all accounts.
tag
string
Filter by account tag
org_group
string
Filter by organization group
user_group
string
Filter by user group

Response

data
DailyAggregatedStat[]
Array of daily aggregated statistics
curl -X POST https://api.ugc.inc/stats/aggregated/daily \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2024-01-01T00:00:00Z",
    "endDate": "2024-01-31T23:59:59Z",
    "tag": "fitness"
  }'
{
  "ok": true,
  "code": 200,
  "message": "Success",
  "data": [
    {
      "date": "2024-01-01",
      "followers": 234,
      "following": 12,
      "views": 45600,
      "likes": 3420,
      "posts": 15
    },
    {
      "date": "2024-01-02",
      "followers": 189,
      "following": 8,
      "views": 38900,
      "likes": 2890,
      "posts": 12
    }
  ]
}