/channels/views/list

List channel views statistics per channel or per day.

Parameters

start_date (optional) : unsigned integer

UTC date starting from which channels views statistics should be returned. Date must be in Unix timestamp format. Default is the first day of the current month.

end_date (optional) : unsigned integer

UTC date until (and including) which channels views statistics should be returned. Date must be in Unix timestamp format. Default is today’s date.

list_by (optional) : string

Specifies channels views statistics listing type:

channel

Channels views statistics listed by a channel.

day

Channels views statistics listed by a day.

Default is channel.

order_by (optional) : string

Specifies parameters by which returned result should be ordered. Parameter sort order can be specified by appending :asc for an ascending sort order or :desc for a descending one to the parameter name. Default sort order is ascending and can be omitted. Multiple parameters should be separated by comma.

Result can be ordered by the following parameters: key, title and views. Default is views:asc.

Applicable only when list_by parameter set to channel.

result_limit (optional): unsigned integer

Specifies maximum number of channels to return. Default is 50. Maximum result limit is 1000. Applicable only when list_by parameter set to channel.

result_offset (optional): unsigned integer

Specifies how many channels should be skipped at the beginning of the result set. Default is 0.

aggregate (optional) : string

Specifies if returned channels daily views statistics should be aggregate.

True

Aggregate channels daily views for the specified date range.

False

Do not aggregate channels daily views.

Default is False.

group_days (optional) : string

Specifies if returned channels daily views statistics should be grouped by year and month.

True

Group daily channels views statistics by year and month.

False

Do not group daily channels views.

Default is False. Applicable only when list_by parameter set to day.

include_empty_days (optional) : string

Specifies if channels views statistics should include days for which there is no statistics available:

True

Daily views statistics will include empty days. Channels views for the empty days will be set to 0.

False

Daily views statistics will not include empty days.

Default is False. Applicable only when list_by parameter set to day.

Example response (list_by == channel)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <limit>50</limit>
  <offset>0</offset>
  <total>7</total>
  <channels total="7">
    <channel key="bIt7nRZu">
      <title>A Channel</title>
      <views>1234</views>
    </channel>
    ...
  </channels>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

/response/limit : unsigned integer

Maximum number of channels that should be return. As specified in the result_limit request parameter.

/response/offset : unsigned integer

Number of channels that should be skipped at the beginning of the result set. As specified in the result_offset request parameter.

/response/total : unsigned integer

Total number of channels.

//channels/@total : unsigned integer

Total number of returned channels.

//channel/@key : string

Channel key.

//channel/title : string

Title of the channel.

//channel/views : unsigned integer

Channel views for the specified date range.

Example response (list_by == day AND group_days == False)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <days total="27">
    <day date="2009-10-01" timestamp="1254355200">
      <views>1234</views>
    </day>
    ...
  </days>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

//days/@total : unsigned integer

Total number of returned days.

//day/@date : string

UTC date of the day in YYYY-MM-DD format.

//day/@timestamp : unsigned integer

UTC date of the day in Unix timestamp format.

//day/views : unsigned integer

Channels views this day.

Example response (list_by == day AND group_days == True)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <years total="1">
    <year number="2009">
      <months total="1">
        <month number="10">
          <days total="27">
            <day number="1" timestamp="1254355200">
              <views>123</views>
            </day>
            ...
          </days>
        </month>
      </months>
    </year>
  </years>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

//years/@total : unsigned integer

Total number of returned years.

//year/@number : unsigned integer

Number of the year.

//month/@total : unsigned integer

Total number of returned month for the year.

//month/@number : unsigned integer

Number of the month in a year (1..12).

//days/@total : unsigned integer

Total number of returned days.

//day/@number : unsigned integer

Number of the day in a month (1..31).

//day/@date : string

UTC date of the day in YYYY-MM-DD format.

//day/@timestamp : unsigned integer

UTC date of the day in Unix timestamp format.

//day/views : unsigned integer

Channels views this day.

Example response (aggregate == True)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <views>9876</views>
</response>

Response parameters

/response/status : string

Call execution status. Set to ok if call executed successfully.

/response/views : unsigned integer

Aggregated daily channels views for the specified date range.