---
title: "Get Active Users By Language"
method: GET
path: "/presence/language-counts"
tags: ["presence"]
---

# Get Active Users By Language

`GET /presence/language-counts`

Get count of active users grouped by language.

Returns:
    Dictionary with language codes as keys and counts of learners/natives as values.

Example response:
```json
{
    "languages": {
        "spanish": {"learners": 5, "natives": 3},
        "english": {"learners": 8, "natives": 12}
    },
    "total_users": 15,
    "timestamp": "2025-12-09T12:00:00Z"
}
```

Notes:
- Only shows languages with at least 3 total users (privacy protection)
- Results are cached for 30 seconds to reduce database load
- Uses WebSocket heartbeat tracking to determine active users

## Response `200`

Successful Response

- ActiveUsersByLanguageResponse
  - `languages` object, required
  - `total_users` integer, required
  - `timestamp` string, required

---

[API](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored.md) · [All operations](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluentea/aurqa-language-learning-platform-refactored/revisions/78f314acd8bf/schema)
