All Products
Search
Document Center

ApsaraVideo Media Processing:QueryMediaListByURL

Last Updated:Jan 16, 2026

Queries media files by their Object Storage Service (OSS) file URLs.

Operation description

  • You can query a maximum of 10 media files at a time.

  • Before you call this operation, you must call the AddMedia operation to add media files. You can then call this operation to query media information.

  • This operation can query information only about files that have been processed by a workflow. For newly uploaded media files, the information returned by this operation is complete only after the workflow is executed. To retrieve information about videos that have not been processed by a workflow, you must call the SubmitMediaInfoJob operation to submit a media information analysis job.

QPS limits

The queries per second (QPS) limit for this operation is 100 per user. Throttling is triggered if the limit is exceeded, which may affect your business. Plan your calls accordingly. For more information, see QPS limits.

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

mts:QueryMediaListByURL

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

FileURLs

string

Yes

The URLs of the media files that you want to query. To obtain the URL of a media file, log on to the MPS console, choose Media Management > Media List, find the media file, and then click Manage in the Actions column. On the Get Transcoding URL tab, you can obtain the URL of the media file. Separate multiple URLs with commas (,). You can query a maximum of 10 URLs at a time.

  • The URL must be compliant with RFC 3986. The URL must be encoded in UTF-8, and reserved characters must be URL-encoded. For more information, see URL encoding. The URL can be up to 3,200 bytes in length.

  • Only OSS HTTP URLs are supported. CDN and HTTPS URLs are not supported.

http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example.mp4

IncludePlayList

boolean

No

Specifies whether to include playback information in the response.

  • Valid values: true and false.

  • Default value: false.

true

IncludeSnapshotList

boolean

No

Specifies whether to include snapshot information in the response.

  • Valid values: true and false.

  • Default value: false.

true

IncludeMediaInfo

boolean

No

Specifies whether to include media information in the response.

  • Valid values: true and false.

  • Default value: false.

    Note

    To obtain detailed MediaInfo, set this parameter to true.

true

IncludeSummaryList

boolean

No

Specifies whether to include a list of video synopses in the response.

  • Valid values: true and false.

  • Default value: false.

true

Response elements

Element

Type

Description

Example

object

The returned parameters.

MediaList

object

Media

array<object>

The list of media files.

array<object>

The details of a media file.

CreationTime

string

The time when the media file was created.

2021-07-14T13:05:00Z

CateId

integer

The ID of the category.

123

Height

string

The height of the media file.

360

CensorState

string

The content review state of the video. Valid values:

  • Initiated: The video is being reviewed.

  • Pass: The video passed the review.

Initiated

Tags

object

Tag

array

The tag information.

string

The list of tags.

tag1,tag2

PlayList

object

Play

array<object>

The playlist.

array<object>

The details of a playback file.

Encryption

string

The encryption method. Valid values:

  • 0: unencrypted.

  • 1: encrypted.

1

Height

string

The height.

10

Bitrate

string

The bitrate.

25.067

File

object

The playback file.

State

string

The state of the file. Valid values:

  • Normal: The file is in a normal state.

  • Deleted: The file is deleted.

Normal

URL

string

The URL of the playback file in an OSS bucket.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4

MediaWorkflowId

string

The ID of the workflow that generated the playback file.

6cc3aa66d1cb4bb2adf14e726c0a****

Width

string

The width.

11

Size

string

The size.

100

Fps

string

The frame rate.

25.0

Duration

string

The duration.

7.965000

ActivityName

string

The name of the media workflow activity.

test name

Format

string

The encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov

MediaWorkflowName

string

The name of the workflow that generated the playback file.

example-mediaworkflow-****

Bitrate

string

The bitrate.

593.192

MediaId

string

The media ID.

52d7e98b05e648199612290bb819****

File

object

The details of the input file.

State

string

The state of the file. Valid values:

  • Normal: The file is in a normal state.

  • Deleted: The file is deleted.

Normal

URL

string

The URL of the input file in an OSS bucket.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4

SummaryList

object

Summary

array<object>

The list of video synopses.

array<object>

The video synopsis data.

Type

string

The type of the synopsis. Valid values:

  • Video: video.

  • Gif: animated image.

Gif

MediaWorkflowId

string

The ID of the workflow that generated the synopsis.

93ab850b4f6f44eab54b6e91d24d****

ActivityName

string

The name of the media workflow activity.

example-activity-****

MediaWorkflowName

string

The name of the workflow that generated the synopsis.

example-mediaworkflow-****

File

object

The source file.

State

string

The state of the file. Valid values:

  • Normal: The file is in a normal state.

  • Deleted: The file is deleted.

Normal

URL

string

The URL of the input file in an OSS bucket.

http://example-bucket-****.o

PublishState

string

The publishing state of the media file. Valid values:

  • Initiated: The media file is in the initial state.

  • UnPublish: The media file is not published. The permission on the OSS playback file is set to Private.

  • Published: The media file is published. The permission on the OSS playback file is set to Default.

  • Deleted: The media file is deleted.

Published

MediaInfo

object

The media information.

Streams

object

The stream information.

VideoStreamList

object

VideoStream

array<object>

The list of video streams.

array<object>

The video stream data.

Sar

string

The sample aspect ratio (SAR).

1:1

Height

string

The height of the video.

360

CodecTagString

string

The tag of the encoding format.

avc1

NetworkCost

object

The network bandwidth consumption.

PreloadTime

string

The preload time.

0.01

AvgBitrate

string

The average bitrate.

2659.326

CostBandwidth

string

The maximum bandwidth consumed.

100

Width

string

The width of the video. The value must be a non-negative number.

640

Index

string

The sequence number of the video stream. This indicates the position of the video stream in the media stream.

5

Timebase

string

The time base.

1/15360

AvgFPS

string

The average frame rate.

15.0

PixFmt

string

The pixel format.

yuv420p

Lang

string

The language. For more information, see FFmpeg language definitions.

und

CodecLongName

string

The full name of the encoding format.

H.264/AVC/MPEG-4 AVC/MPEG-4 part 10

NumFrames

string

The total number of frames.

12

Rotate

string

The rotation angle of the video.

90

Bitrate

string

The bitrate.

512.701

HasBFrames

string

Indicates whether B-frames exist. 1 means yes, and 2 means no.

2

Profile

string

The codec profile.

High

StartTime

string

The start time.

0.046029

Dar

string

The display aspect ratio (DAR).

16:9

CodecName

string

The short name of the encoding format. Valid values: H264, mov, aac, avc, and mpeg.

H264

Duration

string

The duration.

79.200000

Fps

string

The frame rate.

15.0

CodecTag

string

The tag of the encoding format.

0x31637661

CodecTimeBase

string

The codec time base.

1/30

Level

string

The encoding level.

31

AudioStreamList

object

AudioStream

array<object>

The list of audio streams.

object

The audio stream data.

Timebase

string

The time base.

1/44100

Index

string

The sequence number of the audio stream. This indicates the position of the audio stream in the media stream.

1

SampleFmt

string

The sampling format.

fltp

ChannelLayout

string

The layout of the sound channels.

stereo

Lang

string

The language. For more information, see FFmpeg language definitions.

und

Samplerate

string

The sample rate.

44100

CodecLongName

string

The full name of the encoding format.

AAC (Advanced Audio Coding)

Channels

string

The number of sound channels.

2

NumFrames

string

The total number of frames.

100

Bitrate

string

The bitrate.

76.356

CodecTagString

string

The tag of the encoding format.

mp4a

StartTime

string

The start time.

0.000000

CodecName

string

The short name of the encoding format. Valid values: H264, mov, aac, avc, and mpeg.

aac

Duration

string

The duration.

79.203265

CodecTag

string

The tag of the encoding format.

0x6134706d

CodecTimeBase

string

The codec time base.

1/44100

SubtitleStreamList

object

SubtitleStream

array<object>

The list of caption streams.

object

The caption stream data.

Index

string

The sequence number of the caption stream. This indicates the position of the caption stream in the media stream.

1

Lang

string

The language. For more information, see FFmpeg language definitions.

und

Format

object

The format information.

StartTime

string

The start time.

0.000000

NumPrograms

string

The total number of program streams.

0

Size

string

The size.

5872904

NumStreams

string

The total number of media streams.

2

FormatLongName

string

The full name of the encoding format.

QuickTime/MOV

Duration

string

The duration.

79.204000

Bitrate

string

The bitrate.

593.192

FormatName

string

The short name of the container format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov

Description

string

The description.

This is description ****

Size

string

The file size.

5872904

Width

string

The width.

640

CoverURL

string

The URL of the thumbnail in an OSS bucket.

http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png

SnapshotList

object

Snapshot

array<object>

The list of snapshots.

array<object>

The details of a snapshot file.

Type

string

The type of the snapshot. Valid values:

  • Single: a single snapshot.

  • Sequence: a sequence of snapshots.

Single

MediaWorkflowId

string

The ID of the workflow that generated the snapshot file.

6cc3aa66d1cb4bb2adf14e726c0a****

ActivityName

string

The name of the workflow activity that generated the snapshot file.

example-activity1-****

Count

string

The number of snapshots. This parameter is valid only when Type is set to Sequence.

3

MediaWorkflowName

string

The name of the workflow that generated the snapshot file.

example-workflow-****

File

object

The snapshot file.

State

string

The state of the file. Valid values:

  • Normal: The file is in a normal state.

  • Deleted: The file is deleted.

Normal

URL

string

The URL of the snapshot file in an OSS bucket.

http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png

RunIdList

object

RunId

array

The list of media workflows.

string

The list of media workflow IDs.

9343bd0e7bb54ae19228529908e5****

Duration

string

The duration.

79.204000

Fps

string

The frame rate.

15.0

Title

string

The title.

kled.mp4

Format

string

The encoding format. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov

NonExistFileURLs

object

FileURL

array

The information about the media files that do not exist.

string

The URLs of the media files that do not exist. This parameter is not returned if no data is available.

null

RequestId

string

The request ID.

1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42

Examples

Success response

JSON format

{
  "MediaList": {
    "Media": [
      {
        "CreationTime": "2021-07-14T13:05:00Z",
        "CateId": 123,
        "Height": "360",
        "CensorState": "Initiated",
        "Tags": {
          "Tag": [
            "tag1,tag2"
          ]
        },
        "PlayList": {
          "Play": [
            {
              "Encryption": "1",
              "Height": "10",
              "Bitrate": "25.067",
              "File": {
                "State": "Normal",
                "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4l-test/in/1.mp4"
              },
              "MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
              "Width": "11",
              "Size": "100",
              "Fps": "25.0",
              "Duration": "7.965000",
              "ActivityName": "test name",
              "Format": "mov",
              "MediaWorkflowName": "example-mediaworkflow-****"
            }
          ]
        },
        "Bitrate": "593.192",
        "MediaId": "52d7e98b05e648199612290bb819****",
        "File": {
          "State": "Normal",
          "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
        },
        "SummaryList": {
          "Summary": [
            {
              "Type": "Gif",
              "MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d****",
              "ActivityName": "example-activity-****",
              "MediaWorkflowName": "example-mediaworkflow-****",
              "File": {
                "State": "Normal",
                "URL": "http://example-bucket-****.o"
              }
            }
          ]
        },
        "PublishState": "Published",
        "MediaInfo": {
          "Streams": {
            "VideoStreamList": {
              "VideoStream": [
                {
                  "Sar": "1:1",
                  "Height": "360",
                  "CodecTagString": "avc1",
                  "NetworkCost": {
                    "PreloadTime": "0.01",
                    "AvgBitrate": "2659.326",
                    "CostBandwidth": "100"
                  },
                  "Width": "640",
                  "Index": "5",
                  "Timebase": "1/15360",
                  "AvgFPS": "15.0",
                  "PixFmt": "yuv420p",
                  "Lang": "und",
                  "CodecLongName": "H.264/AVC/MPEG-4 AVC/MPEG-4 part 10",
                  "NumFrames": "12",
                  "Rotate": "90",
                  "Bitrate": "512.701",
                  "HasBFrames": "2",
                  "Profile": "High",
                  "StartTime": "0.046029",
                  "Dar": "16:9",
                  "CodecName": "H264",
                  "Duration": "79.200000",
                  "Fps": "15.0",
                  "CodecTag": "0x31637661",
                  "CodecTimeBase": "1/30",
                  "Level": "31"
                }
              ]
            },
            "AudioStreamList": {
              "AudioStream": [
                {
                  "Timebase": "1/44100",
                  "Index": "1",
                  "SampleFmt": "fltp",
                  "ChannelLayout": "stereo",
                  "Lang": "und",
                  "Samplerate": "44100",
                  "CodecLongName": "AAC (Advanced Audio Coding)",
                  "Channels": "2",
                  "NumFrames": "100",
                  "Bitrate": "76.356",
                  "CodecTagString": "mp4a",
                  "StartTime": "0.000000",
                  "CodecName": "aac",
                  "Duration": "79.203265",
                  "CodecTag": "0x6134706d",
                  "CodecTimeBase": "1/44100"
                }
              ]
            },
            "SubtitleStreamList": {
              "SubtitleStream": [
                {
                  "Index": "1",
                  "Lang": "und"
                }
              ]
            }
          },
          "Format": {
            "StartTime": "0.000000",
            "NumPrograms": "0",
            "Size": "5872904",
            "NumStreams": "2",
            "FormatLongName": "QuickTime/MOV",
            "Duration": "79.204000",
            "Bitrate": "593.192",
            "FormatName": "mov"
          }
        },
        "Description": "This is description ****",
        "Size": "5872904",
        "Width": "640",
        "CoverURL": "http://example-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example-****.png",
        "SnapshotList": {
          "Snapshot": [
            {
              "Type": "Single",
              "MediaWorkflowId": "6cc3aa66d1cb4bb2adf14e726c0a****",
              "ActivityName": "example-activity1-****",
              "Count": "3",
              "MediaWorkflowName": "example-workflow-****",
              "File": {
                "State": "Normal",
                "URL": "http://example1-bucket1-****.oss-cn-hangzhou.aliyuncs.com//example111-****.png"
              }
            }
          ]
        },
        "RunIdList": {
          "RunId": [
            "9343bd0e7bb54ae19228529908e5****"
          ]
        },
        "Duration": "79.204000",
        "Fps": "15.0",
        "Title": "kled.mp4",
        "Format": "mov"
      }
    ]
  },
  "NonExistFileURLs": {
    "FileURL": [
      "null"
    ]
  },
  "RequestId": "1C8A0AEB-4321-485B-B4CB-DA4E9E6C9B42"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.