Creation of logs request


Access tokens will not be accepted in URL parameters starting February 13, 2019. To continue working with the Yandex.Metrica API, set up authorization by passing the token in the HTTP header.

The outdated authorization method will be temporarily disabled on January 23, January 30, and February 6 for maintenance. Authorization using URL parameters will be unavailable on these dates.

Creates logs request.

  1. Request syntax
  2. Response format

Request syntax

counterId — counter id.{counterId}/logrequests
 ? [date1=<string>]
 & [date2=<string>]
 & [fields=<string>]
 & [source=<log_request_source>]
Query parameters
date1First day.
date2Last day (can't be the current day).
fieldsList of fields separated by commas.
sourceLogs source.

Allowed values:

  • hits — pageviews.
  • visits — sessions.

Request example


Response format

    "log_request" :  < log_request > 
Parameters Description
log_request Logs request.