stat_bytime
Retrieves time series analytics data from Yandex Metrika for charts and trend analysis. Group metrics by day, week, month, or hour to visualize performance over time.
Instructions
Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Time series report — GET /stat/v1/data/bytime. Use for charts and trends.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Counter IDs, comma-separated (e.g. 44147844 or 44147844,2215573) | |
| lang | No | Response language | |
| sort | No | Sort by dimensions/metrics comma-separated. Prefix with - for descending | |
| date1 | No | Period start: YYYY-MM-DD, today, yesterday, or ndaysAgo (default: 6daysAgo) | |
| date2 | No | Period end: YYYY-MM-DD, today, yesterday, or ndaysAgo (default: today) | |
| group | No | Time grouping: day, week, month, quarter, year, hour, minute, auto, all, etc. (default: week) | |
| limit | No | Page size, max 100000 (default: 100) | |
| format | No | Response format: json (default) or csv | |
| offset | No | First row index, starting from 1 (default: 1) | |
| preset | No | Report preset name. See https://yandex.ru/dev/metrika/ru/stat/presets.md | |
| filters | No | Segmentation filter expression. See https://yandex.ru/dev/metrika/ru/stat/segmentation.md | |
| metrics | Yes | Metrics comma-separated, max 20. Use ym:s: prefix for visits or ym:pv: for hits. See https://yandex.ru/dev/metrika/ru/stat/attrandmetr/dim_all.md | |
| accuracy | No | Sample size for report (sampling). See https://yandex.ru/dev/metrika/ru/stat/sampling.md | |
| timezone | No | Timezone as ±hh:mm, e.g. +03:00 (plus sign as %2B in URL) | |
| dimensions | No | Dimensions (groupings) comma-separated, max 10. See https://yandex.ru/dev/metrika/ru/stat/attrandmetr/dim_all.md | |
| annotation_groups | No | Annotation groups comma-separated (when include_annotations=true) | |
| include_undefined | No | Include rows with undefined dimension values (first dimension only) | |
| proposed_accuracy | No | Allow API to auto-increase accuracy for small samples | |
| include_annotations | No | Include chart annotations in response | |
| direct_client_logins | No | Yandex Direct client logins comma-separated (Direct expenses reports) |