/videos/views/show

Shows views statistics for a video.

Parameters

video_key : string

Key of the video which views statistics to show.

start_date (optional) : unsigned integer

UTC date starting from which videos 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 videos views statistics should be returned. Date must be in Unix timestamp format. Default is today’s date.

aggregate (optional) : string

Specifies if returned video views statistics should be aggregate.

True

Aggregate video views for the specified date range.

False

Do not aggregate video views.

Default is False.

group_days (optional) : string

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

True

Group daily video views statistics by year and month.

False

Do not group daily video views.

Default is False. Skipped, if aggregate parameter set to True.

include_empty_days (optional) : string

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

True

Daily views statistics will include empty days. Video 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 (group_days == False)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="yYul4DRz">
    <days total="27">
      <day date="2009-10-01" timestamp="1254355200">
        <downloads>49</downloads>
        <pageviews>294</pageviews>
        <streams>196</streams>
        <viewed>86415</viewed>
        <views>245</views>
      </day>
      ...
    </days>
    <status>active</status>
    <title>My cool video</title>
  </video>
</response>

Response parameters

/response/status : string

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

//video/@key : string

Video key.

//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/streams : unsigned integer

Number of times the video was streamed this day.

//day/downloads : unsigned integer

Number of times the video was downloaded this day.

//day/views : unsigned integer

Number of times the video was streamed and downloaded (//day/streams + //day/downloads) this day.

//day/pageviews : unsigned integer

Number of times the video was embedded on a page this day.

//day/viewed : unsigned integer

Number of seconds the video was viewed this day.

//video/status : string

Video status:

active

Video is active.

deleted

Video has been deleted.

//video/title : string

Title of the video.

Example response (group_days == True)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="yYul4DRz">
    <years total="1">
      <year number="2009">
        <months total="1">
          <month number="10">
            <days total="19">
              <day number="1" timestamp="1254355200">
                <downloads>49</downloads>
                <pageviews>294</pageviews>
                <streams>196</streams>
                <viewed>86415</viewed>
                <views>245</views>
              </day>
              ...
            </days>
          </month>
        </months>
      </year>
    </years>
    <status>active</status>
    <title>My cool video</title>
  </video>
</response>

Response parameters

/response/status : string

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

//video/@key : string

Video key.

//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/streams : unsigned integer

Number of times the video was streamed this day.

//day/downloads : unsigned integer

Number of times the video was downloaded this day.

//day/views : unsigned integer

Number of times the video was streamed and downloaded (//day/streams + //day/downloads) this day.

//day/pageviews : unsigned integer

Number of times the video was embedded on a page this day.

//day/viewed : unsigned integer

Number of seconds the video was viewed this day.

//video/status : string

Video status:

active

Video is active.

deleted

Video has been deleted.

//video/title : string

Title of the video.

Example response (aggregate == True)

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>ok</status>
  <video key="yYul4DRz">
    <downloads>1078</downloads>
    <pageviews>6468</pageviews>
    <status>active</status>
    <streams>4312</streams>
    <title>My cool video</title>
    <viewed>1901130</viewed>
    <views>5390</views>
  </video>
</response>

Response parameters

/response/status : string

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

//video/@key : string

Video key.

//video/streams : unsigned integer

Number of times the video was streamed in the specified date range.

//video/downloads : unsigned integer

Number of times the video was downloaded in the specified date range.

//video/views : unsigned integer

Number of times the video was streamed and downloaded (//video/streams + //video/downloads) in the specified date range.

//video/pageviews : unsigned integer

Number of times the video was embedded on a page in the specified date range.

//video/viewed : unsigned integer

Number of seconds the video was viewed in the specified date range.

//video/status : string

Video status:

active

Video is active.

deleted

Video has been deleted.

//video/title : string

Title of the video.