User API
Get New And Active Users Count
Description: Retrieves new and active users count based on the specified mode, start and end dates.
Note: If you struggle to figure out the segments, please check out the helper function - get_segment_definition
.
Parameters:
api_key
: API key (https://app.telemetree.io/settings/project)group_by
: List of fields to group byperiod
: The start and end datesfilters
: List of filters in Amplitude-like format
Returns:
UserCountResponse
: The transformed user count data.
Raises:
HTTPException
: If an error occurs during the retrieval process.
GET
Authorizations
Your API Key (Dashboard->Settings)
Query Parameters
List of fields to group by
Available options:
is_premium
, language
, referrer_type
, os
, brand
, model
, country
, write_access
Start date in YYYYMMDD format
End date in YYYYMMDD format
Segments in Amplitude-like format. Example used: [{"prop":"country","op":"is","values":["United States"]}]
Response
200
application/json
Successful Response
User count data
Example:
{
"counts": [],
"dates": ["2024-08-01", "2024-08-02", "2024-08-03"],
"filters": [
{
"op": "is",
"prop": "country",
"values": ["United States"]
}
],
"groupBy": ["is_premium"],
"groups": { "0": [1, 3, 6], "1": [1, 0, 0] }
}