---
title: "Get user statistics and geographical distribution."
method: GET
path: "/api/v1/stats/users"
---

# Get user statistics and geographical distribution.

`GET /api/v1/stats/users`

Only SUPERADMIN users can access user statistics.

Query Parameters:
- period: Time period filter (last_day, last_week, last_month, last_year, all)
- group_by: Grouping interval (quarter_hour, hour, day, week, month)
- country: Filter by specific country

Example Response:
{
    "data": {
        "registration_trends": [
            {"date": "2025-08-07", "new_users": 12, "total_users": 250},
            {"date": "2025-08-08", "new_users": 8, "total_users": 258}
        ],
        "geographic_distribution": [
            {"country": "USA", "user_count": 100, "percentage": 40.0},
            {"country": "Brazil", "user_count": 75, "percentage": 30.0},
            {"country": "Germany", "user_count": 50, "percentage": 20.0}
        ],
        "activity_stats": {
            "active_users_in_period": 234,
            "active_users_countries": 45,
            "never_executed": 123
        }
    }
}

Returns:
    JSON response with user statistics

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
