Table
Provides access to statistical data, including data available in reports. Returns results in the form of a table.
Request format
GET https://api.appmetrica.yandex.ru/stat/v1/data
? ids=<int,int,...>
& metrics=<string>
& [accuracy=<string>]
& [callback=<string>]
& [date1=<string>]
& [date2=<string>]
& [dimensions=<string>]
& [filters=<string>]
& [group=<group_type>]
& [id=<integer>]
& [include_undefined=<boolean>]
& [lang=<string>]
& [limit=<integer>]
& [offset=<integer>]
& [pretty=<boolean>]
& [sort=<string>]
|
Comma-separated list of counter numbers. Used instead of the |
|
Comma-separated list of metrics. Limit: 20 metrics per request. |
|
Accuracy of results. Allows you to manage sampling (the number of visits used to calculate the final value).
Default value: |
|
Callback function that processes the API response. |
|
Start date of the report period in the format YYYY-MM-DD. You can also use the values: Default value: |
|
End date of the report period in the format YYYY-MM-DD. You can also use the values: Default value: |
|
Comma-separated list of dimensions. Limit: 10 dimensions per request. |
|
Limit: Maximum of 10 unique dimensions and metrics, 20 separate filters, and 10,000 characters per filter string. |
|
Grouping data by time.
Default value: Acceptable values:
|
|
The tag number. Obsolete. Use |
|
Outputs rows that don't have defined dimension values. This only affects the first dimension. Disabled by default. |
|
Language. |
|
Number of items on the results page. Limit: 100000. Default value: 100 |
|
Index of the first row of requested data, starting from 1. Default value: 1. |
|
Specifies the formatting for results. To use formatting, set the value to |
|
Comma-separated list of dimensions and metrics to use for sorting. By default, sorting occurs in ascending order. To sort data in descending order, put the |
Response format
{
"total_rows" : <long>,
"sampled" : <boolean>,
"sample_share" : <double>,
"sample_size" : <long>,
"sample_space" : <long>,
"data_lag" : <int>,
"query" : {
"ids" : [ <int>, ... ],
"dimensions" : [ <string>, ... ],
"metrics" : [ <string>, ... ],
"sort" : [ <string>, ... ],
"date1" : <string>,
"date2" : <string>,
"filters" : <string>,
"limit" : <integer>,
"offset" : <integer>
},
"totals" : [ <double>, ... ],
"min" : [ <double>, ... ],
"max" : [ <double>, ... ],
"data" : [ {
"dimensions" : [ {
"key_1" : <string>,
"key_2" : ...
}, ... ],
"metrics" : [ <double>, ... ]
}, ... ]
}
Parameters |
Description |
|
Total number of rows in the response. |
|
Sampling flag. Indicates whether sampling was applied. Possible values: |
|
Percentage of data used for the calculation. Available values range from 0 to 1. |
|
Number of rows in the data sample. |
|
Number of data rows. |
|
Delay in updating data, in seconds. |
|
Original request. Contains the request parameters, including detailed parameters from the template and parameters for attribute parametrization. |
|
Total results for metrics across the entire dataset (with filtration). |
|
Minimum results for metrics among keys output. |
|
Maximum results for metrics among keys output. |
|
Response rows. An array in which each item is a single row of the result. |
|
Counter IDs. |
|
Array of dimensions. |
|
Array of metrics. |
|
Array of sortings. |
|
Start date of the report period in the format YYYY-MM-DD. |
|
End date of the report period in the format YYYY-MM-DD. |
|
Segmentation filter. |
|
Number of items on the results page. |
|
Index of the first row of requested data, starting from 1. |
|
Array of dimension values for this row. Each dimension value is an object. It must have the |
|
Array of metric values for this row. The values in this array are numbers or |
Sample request
cURLHTTP
curl -X GET \ 'https://api.appmetrica.yandex.ru/stat/v1/data?ids=1111&metrics=ym:ge:users' \ -H 'Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037'
GET /stat/v1/data?ids=1111&metrics=ym:ge:users HTTP/1.1 Host: api.appmetrica.yandex.ru Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037
If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.