Gets a branch from the pivot table
Used to get data broken down by time period (for example, by day, week, or month). Use this request type to create charts and track statistics over time.
Request
GET
https://api-metrica.yandex.net/stat/v1/data/pivot/drilldown
Query parameters
|
Name |
Description |
|
ids |
Type: integer[] Comma-separated list of tag IDs. Example: |
|
metrics |
Type: string Comma-separated list of metrics. Limit: 20 metrics per request. Example: |
|
accuracy |
Type: string Sample size for the report. Use it to control the sampling rate (the number of sessions used for calculating results). Example: `` |
|
callback |
Type: string Callback function that processes the API response. Example: `` |
|
date1 |
Type: string Start date of the sample period in YYYY-MM-DD format. You can also use the values: Default: Example: `` |
|
date2 |
Type: string End date of the sample period in YYYY-MM-DD format. You can also use the values: Default: Example: `` |
|
dimensions |
Type: string Comma-separated list of dimensions. Limit: 10 dimensions per request. Example: |
|
direct_client_logins |
Type: string[] Comma-separated usernames of Yandex Direct clients. They can be used for generating the Yandex Direct — costs report. Example: |
|
filters |
Type: string Segmentation filter. Limits: up to 10 unique dimensions and metrics; up to 20 separate filters; up to 10,000 characters per filter row; and up to 100 values per filtering condition. Example: `` |
|
include_undefined |
Type: boolean Outputs rows that don't have defined dimension values. This only affects the first dimension. Disabled by default. |
|
lang |
Type: string Language. Example: `` |
|
limit |
Type: string Number of items on the results page. Limit: 100,000. Default: Example: `` |
|
offset |
Type: string Index of the first row of requested data, starting from 1. Default: Example: `` |
|
parent_id |
Type: string[] Row for expanding further. Consists of a JSON list of keys. Example: `` |
|
pivot_dimensions |
Type: string Comma-separated list of dimensions. Limit: 10 dimensions per request. Example: |
|
pivot_limit |
Type: string Number of columns on the results page. Limit: 100. Default: Example: `` |
|
pivot_offset |
Type: string Index of the first row of requested data, starting from 1. Default: Example: `` |
|
pivot_parent_id |
Type: string[] Column selection for further expansion. Consists of a JSON list of keys. Example: `` |
|
pivot_row_ids |
Type: string Column selection for creating a table. Contains listing of key lists. Example: `` |
|
preset |
Type: string Example: |
|
pretty |
Type: string Specifies the formatting for results. To use formatting, set the value to Default: Example: `` |
|
proposed_accuracy |
Type: boolean If parameter is set to |
|
row_ids |
Type: string String selection for creating a table. Contains listing of key lists. Example: `` |
|
sort |
Type: string Comma-separated list of dimensions and metrics to use for sorting. By default, data is sorted in descending order (indicated by the Example: `` |
|
timezone |
Type: string Time zone in ±hh:mm format within the range of [-23:59; +23:59] (the plus sign should be denoted as Example: |
Responses
200 OK
OK
Body
application/json
{
"query": {
"ids": [
0
],
"timezone": "example",
"preset": "example",
"dimensions": [
"example"
],
"metrics": [
"example"
],
"sort": [
"example"
],
"date1": "example",
"date2": "example",
"filters": "example",
"pivot_dimensions": [
"example"
]
},
"data": [
{
"dimensions": [
{}
],
"metrics": [
[
0.5
]
]
}
],
"meta": {
"dimensions": [
{
"id": "example",
"dim": "example",
"name": "example",
"short_name": "example",
"group_name": "example",
"description": "example",
"type": "example",
"disallow_by_time": true,
"allow_filters": true,
"parameter": {
"id": "example",
"description": "example",
"dim": "example"
},
"fields": {},
"allow_sort": true,
"default_sort": "asc",
"allow_null": true,
"sub_table": "example",
"permission_scope": "example",
"since": "example",
"advanced": true,
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"chained_attributes_group_name": "example",
"chained_attributes_group_index": 0,
"secret": true,
"exposes_secret_data": true,
"disjoint": true
}
],
"metrics": [
{
"dim": "example",
"metric_string": "example",
"name": "example",
"description": "example",
"allow_normalisation": true,
"require_dynamic_correction": true,
"allow_filters": true,
"type": "int",
"allow_sort": true,
"default_sort": "asc",
"advanced": true,
"support_confidence": true,
"negative": true,
"parameters": [
null
],
"sub_table": "example",
"required_dimension": "example",
"permission_scope": "example",
"since": "example",
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"secret": true,
"exposes_secret_data": true
}
],
"pivot_dimensions": [
null
]
},
"total_rows": 0,
"total_rows_rounded": true,
"sampled": true,
"sampleable": true,
"contains_sensitive_data": true,
"sample_share": 0.5,
"max_sample_share": 0.5,
"min_sample_share": 0.5,
"sample_size": 0,
"sample_space": 0,
"data_lag": 0,
"total_columns": 0,
"totals": [
0.5
],
"pivot_groups": {
"pivot_groups": [
[
{}
]
],
"pivot_group_totals": [
[
0.5
]
]
}
}
|
Name |
Description |
|
contains_sensitive_data |
Type: boolean Indicates whether sensitive data can be omitted from the response. This includes data calculated by Yandex algorithms: demographic data (gender, age, and other), login page addresses, search phrases, and robot information. If the value is |
|
data |
Type: PivotRow[] Example
|
|
data_lag |
Type: integer Delay in updating data, in seconds. |
|
meta |
Type: MetaPivot Request metadata. Contains a description of request dimensions and metrics. Example
|
|
pivot_groups |
Type: PivotGroupsSummary Example
|
|
query |
Type: PivotQueryExternal Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization. Example
|
|
sample_share |
Type: number Percentage of data used for the calculation. Available values range from 0 to 1. |
|
sample_size |
Type: integer Number of rows in the requested data. |
|
sample_space |
Type: integer Number of data rows. |
|
sampled |
Type: boolean Sampling flag. Indicates whether sampling was applied. Possible values: |
|
total_rows |
Type: integer The total number of rows in the response for the entire dataset (after filtering). |
|
total_rows_rounded |
Type: boolean Indicates that the total number of rows was rounded. |
|
totals |
Type: number[] Example
|
PivotQueryExternal
Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization.
|
Name |
Description |
|
date1 |
Type: string Start date of the sample period in YYYY-MM-DD format. Example: |
|
date2 |
Type: string End date of the sample period in YYYY-MM-DD format. Example: |
|
dimensions |
Type: string[] Example
|
|
filters |
Type: string Segmentation filter. Example: |
|
metrics |
Type: string[] Example
|
|
pivot_dimensions |
Type: string[] Example
|
|
preset |
Type: string Report preset. Example: |
|
sort |
Type: string[] Example
|
|
timezone |
Type: string Time zone of the sample period in ±hh:mm format. Example: |
Example
{
"timezone": "example",
"preset": "example",
"dimensions": [
"example"
],
"metrics": [
"example"
],
"sort": [
"example"
],
"date1": "example",
"date2": "example",
"filters": "example",
"pivot_dimensions": [
"example"
]
}
PivotRow
Response rows. An array in which each item is a single row of the result.
|
Name |
Description |
||
|
dimensions |
Type: object[]
Array of dimension values for this row. Each dimension value is an object. It must have the Example
|
||
|
metrics |
Type: number[][] Array of arrays of metric values for this row. The outer array lists metrics, and the inner arrays list values of a specific metric for each time group. Example
|
Example
{
"dimensions": [
{}
],
"metrics": [
[
0.5
]
]
}
ParamMetaExternal
List of metric parameters
|
Name |
Description |
|
description |
Type: string Parameter description Example: |
|
dim |
Type: string Name of a dimension with values Example: |
|
id |
Type: string Parameter ID Example: |
Example
{
"id": "example",
"description": "example",
"dim": "example"
}
DimensionMetaExternal
|
Name |
Description |
||
|
advanced |
Type: boolean Dimension for an advanced user |
||
|
allow_filters |
Type: boolean Whether filters can be used |
||
|
allow_null |
Type: boolean Whether "Undefined" can be shown for this dimension |
||
|
allow_sort |
Type: boolean Whether sorting by this dimension is allowed |
||
|
chained_attributes_group_index |
Type: integer Dimension order in a group of linked dimensions |
||
|
chained_attributes_group_name |
Type: string Name of a group of linked dimensions Example: |
||
|
default_sort |
Type: string Default sorting method Enum: |
||
|
description |
Type: string Metric description Example: |
||
|
dim |
Type: string Dimension Example: |
||
|
disallow_by_time |
Type: boolean Whether this dimension is allowed along with grouping data by time. |
||
|
features |
Type: string[] Tag characteristics required for dimension use Example
|
||
|
fields |
Type: object
Additional fields for the current dimension Example
|
||
|
group_name |
Type: string Names of dimensions when enumerating them Example: |
||
|
id |
Type: string Dimension ID without any prefix or parameters Example: |
||
|
name |
Type: string Dimension name Example: |
||
|
parameter |
Type: ParamMetaExternal List of metric parameters Example
|
||
|
permission_scope |
Type: string Dimension access group Example: |
||
|
required_keys |
Type: string[] Example
|
||
|
short_name |
Type: string Dimension name Example: |
||
|
since |
Type: string Date when dimension data appeared Example: |
||
|
sub_table |
Type: string Subtable Example: |
||
|
type |
Type: string Dimension interface type Example: |
Example
{
"id": "example",
"dim": "example",
"name": "example",
"short_name": "example",
"group_name": "example",
"description": "example",
"type": "example",
"disallow_by_time": true,
"allow_filters": true,
"parameter": {
"id": "example",
"description": "example",
"dim": "example"
},
"fields": {},
"allow_sort": true,
"default_sort": "asc",
"allow_null": true,
"sub_table": "example",
"permission_scope": "example",
"since": "example",
"advanced": true,
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"chained_attributes_group_name": "example",
"chained_attributes_group_index": 0
}
MetricMetaExternal
Array of request metric metadata.
|
Name |
Description |
|
advanced |
Type: boolean Metric for advanced users |
|
allow_filters |
Type: boolean Whether filters can be used |
|
allow_normalisation |
Type: boolean Whether values can be normalized |
|
allow_sort |
Type: boolean Whether data can be sorted by this metric |
|
default_sort |
Type: string Default sorting method Enum: |
|
description |
Type: string Metric description Example: |
|
dim |
Type: string Yandex Metrica Example: |
|
exposes_secret_data |
Type: boolean Discloses sensitive data |
|
features |
Type: string[] Tag characteristics required for metric use Example
|
|
metric_string |
Type: string Metric with a parameter value Example: |
|
name |
Type: string Metric name Example: |
|
negative |
Type: boolean Whether the metric is a negative indicator in terms of data interpretation, for example, the bounce rate, robot percentage, and so on. |
|
parameters |
Type: ParamMetaExternal[] List of metric parameters Example
|
|
permission_scope |
Type: string Metric access group Example: |
|
require_dynamic_correction |
Type: boolean Whether values require adjustments in the time report |
|
required_dimension |
Type: string Dimension required for the metric Example: |
|
required_keys |
Type: string[] Example
|
|
secret |
Type: boolean Contains sensitive data |
|
since |
Type: string Date when metric data appeared Example: |
|
sub_table |
Type: string Subtable Example: |
|
support_confidence |
Type: boolean Whether confidence can be estimated by this metric |
|
type |
Type: string Metric type Enum: |
Example
{
"dim": "example",
"metric_string": "example",
"name": "example",
"description": "example",
"allow_normalisation": true,
"require_dynamic_correction": true,
"allow_filters": true,
"type": "int",
"allow_sort": true,
"default_sort": "asc",
"advanced": true,
"support_confidence": true,
"negative": true,
"parameters": [
{
"id": "example",
"description": "example",
"dim": "example"
}
],
"sub_table": "example",
"required_dimension": "example",
"permission_scope": "example",
"since": "example",
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"secret": true,
"exposes_secret_data": true
}
MetaPivot
Request metadata. Contains a description of request dimensions and metrics.
|
Name |
Description |
|
dimensions |
Type: DimensionMetaExternal[] Example
|
|
metrics |
Type: MetricMetaExternal[] Example
|
|
pivot_dimensions |
Type: DimensionMetaExternal[] Example
|
Example
{
"dimensions": [
{
"id": "example",
"dim": "example",
"name": "example",
"short_name": "example",
"group_name": "example",
"description": "example",
"type": "example",
"disallow_by_time": true,
"allow_filters": true,
"parameter": {
"id": "example",
"description": "example",
"dim": "example"
},
"fields": {},
"allow_sort": true,
"default_sort": "asc",
"allow_null": true,
"sub_table": "example",
"permission_scope": "example",
"since": "example",
"advanced": true,
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"chained_attributes_group_name": "example",
"chained_attributes_group_index": 0,
"secret": true,
"exposes_secret_data": true,
"disjoint": true
}
],
"metrics": [
{
"dim": "example",
"metric_string": "example",
"name": "example",
"description": "example",
"allow_normalisation": true,
"require_dynamic_correction": true,
"allow_filters": true,
"type": "int",
"allow_sort": true,
"default_sort": "asc",
"advanced": true,
"support_confidence": true,
"negative": true,
"parameters": [
null
],
"sub_table": "example",
"required_dimension": "example",
"permission_scope": "example",
"since": "example",
"required_keys": [
"example"
],
"features": [
"offline_calls"
],
"secret": true,
"exposes_secret_data": true
}
],
"pivot_dimensions": [
null
]
}
PivotGroupsSummary
|
Name |
Description |
||
|
pivot_group_totals |
Type: number[][] Example
|
||
|
pivot_groups |
Type: object[][]
Example
|
Example
{
"pivot_groups": [
[
{}
]
],
"pivot_group_totals": [
[
0.5
]
]
}
No longer supported, please use an alternative and newer version.