get_data_by_time
Retrieves analytics data grouped by day, week, month, quarter, or year for specified metrics and date range.
Instructions
Get data for specific time periods grouped by day/week/month/quarter/year.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"counter_id": "<counter_id>",
"metrics": "<metrics>"
},
"name": "get_data_by_time"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| counter_id | Yes | Counter ID | |
| metrics | Yes | Metric names (max 20), e.g. ['ym:s:visits'] | |
| date_from | No | Start date YYYY-MM-DD | |
| date_to | No | End date YYYY-MM-DD | |
| dimensions | No | Dimension names (max 10) | |
| group | No | Time grouping: day|week|month|quarter|year | day |
| top_keys | No | Number of top results (1-30) | |
| timezone | No | Timezone offset, e.g. +03:00 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |