Metrica metrics over time
run_timeseriesRetrieve web analytics metrics as time series for trend analysis and charting. Get metric values per day, week, or month, optionally grouped by dimensions, over a specified date range.
Instructions
Return metrics split into a time series (/stat/v1/data/bytime): each metric comes back as an array of values, one per interval (day/week/month/…) over the date range. Use for trends and charts. Optionally group by dimensions (topKeys rows). Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date1 | No | Start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo). | |
| date2 | No | End date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo). | |
| group | No | Time interval granularity. Default day. | |
| filters | No | Metrica filter expression in native syntax, e.g. ym:s:regionCityName=='Moscow' AND ym:pv:URL=@'help'. | |
| metrics | Yes | Metric ids, e.g. ["ym:s:visits","ym:s:users"]. Max 20. Discover valid ids with get_metadata. Do not mix ym:s: (visits) and ym:pv: (hits) namespaces in one call. | |
| topKeys | No | Max number of dimension rows to chart (max 30). Default 7. | |
| accuracy | No | Sampling accuracy: low | medium | high | full, or a 0..1 share. Use "full" for exact data. | |
| timezone | No | Timezone offset for the report as ±hh:mm, e.g. "+03:00". Defaults to the counter timezone. | |
| counterId | No | Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured. | |
| dimensions | No | Dimension ids to group by, e.g. ["ym:s:lastsignTrafficSource"]. Max 10. Do not mix ym:s: and ym:pv: namespaces. | |
| fullResponse | No | If true, include all dimension sub-fields (id, icons, …). Default false: only the dimension name and metric values are returned, to save context. | |
| includeUndefined | No | Include rows where the first dimension value is undefined ("Not set"). Default false. |