Introduction
The Logs API can be used to retrieve non-aggregated data collected by Yandex Metrica. This API is designed for users looking to process statistical data on their own to tackle their specific analytical challenges.
You can store and manage the retrieved data using ClickHouse.
Note
Session data is updated as new information becomes available. On average, 99% of sessions conclude within 3 days of their start.
To use the API, get an authorization token. It must be included in every API request. Quotas are consumed with each request, and if they are exceeded, further user actions are temporarily blocked.
For one Yandex Metrica tag, the total size of data transmitted in requests (including logs that weren't deleted from storage) is 10 GB.
Note
Statistical information for the current day is not available, because it may be incomplete. We recommend requesting data for the previous day and earlier periods.
Restrictions
You can request data for a period of no more than 1 year per request.
The total quota for downloaded and uploaded data is 10 GB. This limitation applies to all prepared log files.
To free up your storage quota, regularly delete both prepared and downloaded log files. This way, you can prevent exceeding the storage limit.
Note
To determine how much space is currently available to you for storing Yandex Metrica log files, get a list of your log requests and manually sum the values from the size
field.
How to increase the quota
To increase your quota, activate Yandex Metrica Pro.
Questions and answers
Why do the numbers I see in the Logs API and the Yandex Metrica web interface not match?
This might happen because the interface employs extra data processing algorithms. To ensure that this data is processed correctly, the system stores numbers using the IEEE 754 standard.
Warning
The IEEE 754 standard may introduce inaccuracies in arithmetic operations. To increase the precision of calculations, the system multiplies numbers by a specific factor.
Integers are handled without any loss of precision. However, the resulting values of floating-point numbers may differ from their initial values. When attempting to revert these modified numbers to their initial values, the resulting deviation depends on the level of precision allowed by the specified factor.
Fields where bids apply
Field |
Bid |
ym:s:purchaseRevenue |
1 (also used in the Reporting API). |
ym:s:goalsPrice |
1000 |
ym:s:productsPrice |
1,000,000 |
ym:s:impressionsProductPrice |
|
ym:s:purchaseTax |
|
ym:s:eventsProductPrice |