All Products
Search
Document Center

Intelligent Media Services:Media asset search

Last Updated:Mar 12, 2025

The media asset search feature allows you to query media assets based on search fields and search types. This topic describes the search fields and search types.

Usage notes

When you call the SearchMedia operation to query media assets, configure the Match parameter as described in this topic. For example, you can set Match to title = 'China' and mediaId == 'id' and utcCreate = ('1693367158561','1693367158562'). The following table describes the syntax.

Match

Description

"title", "mediaId", and "utcCreate"

The search fields.

"=" and "=="

The search types.

"()" and "and"

The relation characters.

Important

When you call the operation, you need to perform URL encoding on the Match parameter and make sure that equal signs, double quotation marks, single quotation marks, and parentheses are half-width characters.

Search fields

The media asset search feature allows you to query videos, audio, images, and auxiliary media assets. The following table describes the search fields and their supported search types. In the table, ✔️ indicates that the search type is supported by the search field and ❌ indicates that the search type is not supported by the search field.

Search field

Data type

Description

Exact match

Fuzzy match

Multi-value query

Range query

title

String

The title of the media asset.

✔️

description

String

The description of the media asset.

✔️

tagList

String

The tags of the media asset.

✔️

mediaId

String

The ID of the media asset.

✔️

cateId

Long

The category ID.

✔️

status

Integer

The status. For more information, see the following Values of the status field table.

✔️

✔️

utcCreate

Long

The time when the media asset was created. Unit: milliseconds.

✔️

utcModified

Long

The time when the media asset was last updated. Unit: milliseconds.

✔️

fileInfo.storageLocation

String

The region in which the media asset is stored.

✔️

✔️

ocrInfo.tracks.content

String

The subtitles.

✔️

aiLabelInfo.category

String

The AI category.

✔️

aiLabelInfo.label_id

String

The label.

✔️

mediaType

String

The type of the media asset. Default value: video. Valid values:

  • video

  • image

  • audio

Note

You cannot search images, videos, and audios at the same time.

✔️

✔️

Value of status

Description

0

Initializing.

1

Preparing.

2

Preparation failed.

3

Normal.

10

Uploading.

12

Uploaded.

13

Transcoding.

14

Transcoding failed.

15

In review.

16

Review failed.

17

Deleted.

18

Upload failed.

Search types

The media asset search feature supports the following search types: exact match, fuzzy match, multi-value query, and range query.

Search type

Description

Syntax

Example

Exact match

Queries the media assets for which the value of a specific field is exactly matched.

field == 'value'

mediaId == '39167e4066a071ee8013e7e7c56b****'

Fuzzy match

Queries the media assets for which the value of a specific field is fuzzily matched. The value can be up to 60 characters in length.

field = 'value'

title ='I love you, China'

Multi-value query

Queries the media assets for which the value of a specific field matches one of the specified values. You can specify up to three values.

field in ('value1','value2','value3')

status in ('3','12','18')

Range query

Queries the media assets for which the value of a specific field falls in a specified open or closed interval.

field = (value1,value2)

utcCreate = ('1693367158561','1693367158562')

Relation characters

Relation character

Description

Syntax

and

Connects two filter conditions to query the media assets that match both the filter conditions.

Note

You can add up to five conditions.

field1 = 'value' and field2 = 'value'

or

Connects two filter conditions to query the media assets that match either of the filter conditions.

Note

You can add up to five conditions.

field1 = 'value1' or field2 = 'value2'

( )

A pair of parentheses, which is used for a range query.

field = ('value1','value2')

' '

A pair of single quotation marks, which is used to enclose a specified value.

field = 'value'

,

A comma, which is used for a multi-value query. You can separate multiple specified values with commas (,).

field in ('value1','value2')

( ) [ ]

An open or closed interval, which is used for a range query. () indicates that the endpoints are not included, while [] indicates that the endpoints are included.

field = ['value1','value2']

in

Used for a multi-value query. The media assets for which the value of a specific field matches one of the specified values are returned. You can specify up to three values.

field in ('value1','value2')