stat_pivot
Build pivot-table reports from Yandex Metrika data by setting row dimensions and column pivot dimensions. Use this tool to cross-analyze metrics for deeper insights.
Instructions
Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Pivot table — GET /stat/v1/data/pivot. Rows by dimensions, columns by pivot_dimensions.
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) | |
| 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 | |
| pivot_limit | No | Pivot columns per page, max 100 (default: 5) | |
| pivot_offset | No | First pivot column index, starting from 1 (default: 1) | |
| pivot_dimensions | No | Pivot column dimensions comma-separated, max 10 | |
| include_undefined | No | Include rows with undefined dimension values (first dimension only) | |
| proposed_accuracy | No | Allow API to auto-increase accuracy for small samples | |
| direct_client_logins | No | Yandex Direct client logins comma-separated (Direct expenses reports) |