Skip to main content

Endpoint

POST https://api.ugc.inc/stats/accounts

Overview

Get account statistics including follower counts, views, likes, and other metrics. Behavior:
  • If startDate and endDate are NOT provided: Returns the latest stat per account (one record per account) - optimal for dashboards showing current state
  • If startDate or endDate is provided: Returns all stats within the date range - use for historical analysis and trend tracking
Use this endpoint to track account growth and engagement over time.

Request Body

accountIds
string[]
Array of account IDs to get stats for. Omit to get all accounts.
startDate
string
Start date in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Optional. If omitted (along with endDate), returns latest stat per account.
endDate
string
End date in ISO 8601 format (e.g., 2024-12-31T23:59:59Z). Optional. If omitted (along with startDate), returns latest stat per account.
tag
string
Filter by account tag
org_group
string
Filter by organization group
user_group
string
Filter by user group

Response

data
AccountStat[]
Array of account statistics objects
curl -X POST https://api.ugc.inc/stats/accounts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountIds": ["acc_123456", "acc_789012"],
    "startDate": "2024-01-01T00:00:00Z",
    "endDate": "2024-12-31T23:59:59Z"
  }'
{
  "ok": true,
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "stat_abc123",
      "account_id": "acc_123456",
      "followers": 15420,
      "following": 342,
      "views": 1250000,
      "likes": 89500,
      "created_at": "2024-12-25T10:00:00Z"
    },
    {
      "id": "stat_def456",
      "account_id": "acc_123456",
      "followers": 15680,
      "following": 345,
      "views": 1285000,
      "likes": 91200,
      "created_at": "2024-12-26T10:00:00Z"
    }
  ]
}