All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodMediaPlayData

Last Updated:Sep 19, 2025

Retrieves playback data for an audio or video file on a specified date using its media ID. The data includes the number of unique visitors, average playback count per user, total playback count, average playback duration per user, and total playback duration.

Operation description

  • The endpoint for this operation is available only in the China (Shanghai) region.

  • This operation collects playback data only from ApsaraVideo Player SDK. Traffic statistics for audio-only files are not supported.

  • You can query data from the last 30 days only.

Important Before you call this operation, ensure that your ApsaraVideo Player SDK meets the following requirements:
  • ApsaraVideo Player SDK for Android or iOS
  • ApsaraVideo Player SDK for Web
    • The SDK version is 2.16.0 or later.

    • A license for the Playback Quality Monitoring value-added service has been requested and configured. To request the license, fill out the ApsaraVideo Player SDK for Web Value-added Service Request form. For information about how to configure the license, see the license property in Web client API reference.

    • The instrumentation log reporting feature of the player SDK is enabled. This feature is enabled by default.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vod:DescribeVodMediaPlayData

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PlayDate

string

No

The playback date in the yyyyMMdd format.

Note
  • You can query data by day only.

  • You can query data from the last 30 days only.

20240322

TerminalType

string

No

The type of terminal that uses the player SDK. Use this parameter to query playback data for a specific terminal type. Valid values:

  • Native: ApsaraVideo Player SDK for Android or ApsaraVideo Player SDK for iOS.

  • Web: ApsaraVideo Player SDK for Web.

Native

Os

string

No

The operating system of the client. Use this parameter to query playback data for a specific operating system. Valid values:

  • Android

  • iOS

  • Windows

  • macOS

  • Linux

Android

Region

string

No

The service region. Use this parameter to query playback data for a specific service region. Valid values:

  • cn-beijing: China (Beijing)

  • cn-shanghai: China (Shanghai)

  • cn-shenzhen: China (Shenzhen)

  • ap-northeast-1: Japan (Tokyo)

  • ap-southeast-1: Singapore

  • ap-southeast-5: Indonesia (Jakarta)

  • eu-central-1: Germany (Frankfurt)

cn-beijing

MediaId

string

No

The ID of the media asset. This is the same as the audio or video ID (VideoId). Use this parameter to query the playback data of a specific media asset. You can specify only one media ID. You can obtain the media ID in one of the following ways:

  • For audio or video files uploaded in the console, log on to the ApsaraVideo VOD console and choose Media Assets > Audio/Video to view the audio or video ID.

  • When you upload an audio or video file by calling the CreateUploadVideo operation, the audio or video ID is the value of the VideoId parameter in the response.

  • After an audio or video file is uploaded, you can call the SearchMedia operation to query the audio or video ID. The ID is the value of the VideoId parameter in the response.

9ae2af636ca6c10412f44891fc****

PageNo

integer

Yes

The number of the page to return.

1

PageSize

integer

Yes

The number of entries to return on each page. The maximum value is 100.

20

OrderType

string

No

The sort order. This parameter must be used with the OrderName parameter. Use this parameter to sort the returned data by a specific metric. Valid values:

  • ASC: ascending order. The data is sorted from smallest to largest.

  • DESC: descending order. The data is sorted from largest to smallest.

ASC

OrderName

string

No

The metric for sorting. This parameter must be used with the OrderType parameter. Use this parameter to sort the returned data by a specific metric. Valid values:

  • PlaySuccessVv: total playback count.

  • PlayPerVv: average playback count per user.

  • PlayDuration: total playback duration.

  • PlayDurationPerUv: average playback duration per user.

PlaySuccessVv

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

25818875-5F78-4AF6-D7393642CA58****

TotalCount

integer

The total number of returned entries.

1

PageNo

integer

The page number of the returned data.

1

PageSize

integer

The number of entries returned on each page.

20

QoeInfoList

array<object>

The list of returned data.

object

The details of the returned data.

VideoTitle

string

The name of the audio or video file.

阿里云VOD视频标题

VideoDuration

number

The duration of the audio or video file, in seconds.

246

MediaId

string

The media ID, which is the audio or video ID (VideoId).

9ae2af636ca6c10412f44891fc****

DAU

number

The number of unique visitors for the audio or video file.

5

PlaySuccessVv

number

The total number of playbacks for the audio or video file.

20

PlayDurationPerUv

number

The average playback duration per user for the audio or video file, in seconds.

120

PlayDuration

number

The total playback duration for the audio or video file, in seconds.

2400

PlayPerVv

number

The average number of playbacks per user for the audio or video file.

4

Examples

Success response

JSON format

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****",
  "TotalCount": 1,
  "PageNo": 1,
  "PageSize": 20,
  "QoeInfoList": [
    {
      "VideoTitle": "阿里云VOD视频标题",
      "VideoDuration": 246,
      "MediaId": "9ae2af636ca6c10412f44891fc****",
      "DAU": 5,
      "PlaySuccessVv": 20,
      "PlayDurationPerUv": 120,
      "PlayDuration": 2400,
      "PlayPerVv": 4
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Meter.ParamError Param Error:%s,Please Check Again. One or more parameters are invalid.
500 Meter.ServerInternalError The Request Processing Has Failed Due To Some Unknown Error. An internal error occurred.
500 Meter.DataSourceQueryError Data Source Error:%s,Please Try Again. An internal data source error occurred.
403 Meter.AuthError Authentication Failed,Please Try Again. You do not have permissions to perform this operation.
502 Meter.ReadyTsError Get ReadyTs Failed,Please Try Again. The data is not prepared.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.