Use the API for getting Yandex.Metrica data programmatically. This automates creating counters, setting up goals, getting statistics and other actions available in the Metrica web interface.
Get an OAuth
input data format
— JSON or XML.
resources reference guide
, which lists all the Metrica objects and describes how to work with them.