All Products
Search
Document Center

Intelligent Media Services:SearchMedia

Last Updated:Apr 03, 2026

Returns media assets that match the specified conditions.

Operation description

If you have any questions about the multi-modal search feature, join our DingTalk group (ID: 30415005038) for assistance.

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

ice:SearchMedia

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

Match

string

No

The filter condition for the search.

title = 'China' and utcCreate = ['1693367158561','1693367158562']

SortBy

string

No

The sort field and sort order. Separate multiple sort criteria with a comma (,).

utcCreate:Desc

PageNo

integer

No

The page number to return. The default value is 1.

1

PageSize

integer

No

The number of results per page. The default value is 10, and the maximum value is 50.

20

EntityId

string

No

The entity ID.

2d3bf1e35a1e42b5ab338d701efa****

ScrollToken

string

No

The scroll token for deep pagination. It is a 32-character string. This parameter is not required for the first search request. If a search is successful, the response includes a ScrollToken to mark the current position. Use this token in subsequent requests to retrieve the next page of results. This parameter is required to iterate through all matching results. For optimal performance, use this parameter when the PageNo value exceeds 200. You can scroll only forward, up to a maximum of 1,000 media assets.

F8C4F642184DBDA5D93907A70AAE****

SearchLibName

string

No

The name of the search library.

test-1

CustomFilters

string

No

The custom filter, specified as a JSON string. Supports the integer field intField1 and the string fields strField1 and strField2. Use only one match type per field. Conditions on different fields are combined with a logical AND.

  • Exact match: {"intField1":12,"strField1":"abc"}

  • Multi-value match: {"intField1":[12,13],"strField1":["abc","cd"]}

  • Range match: {"intField1":{"gte":12,"lte":13}}

{"intField1":{"gte":12,"lte":13},"strField2":["cd","de"],"strField1":"abc"}

Response elements

Element

Type

Description

Example

object

Schema of Response.

RequestId

string

The request ID.

6F61C357-ACC0-57FB-876E-D5879533****

Success

string

Indicates whether the request was successful.

True

Code

string

The status code.

200

MediaInfoList

array<object>

A collection of media assets that match the criteria.

array<object>

A media asset.

MediaId

string

The media asset ID.

3b187b3620c8490886cfc2a9578c****

MediaBasicInfo

object

Basic information about the media asset.

MediaId

string

The media asset ID.

132bd600fc3c71ec99476732a78f****

InputURL

string

The source URL of the media asset.

oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf8498165024814****

MediaType

string

The type of the media asset.

video

BusinessType

string

The business type of the media asset.

opening

Source

string

The source of the media asset.

oss

Title

string

The title of the media asset.

Smart Landscape to Portrait

Description

string

The description of the media asset.

Transcoded this video

Category

string

The category of the media asset.

image

MediaTags

string

The tags assigned to the media asset. Multiple tags are separated by commas.

tags,tags2

CoverURL

string

The URL of the cover image.

https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f2****_large_cover_url.jpg

UserData

string

The custom user data.

userData

Snapshots

string

Snapshot information in JSON format.

[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}]

Status

string

The status of the media asset.

Normal

TranscodeStatus

string

The transcoding status of the media asset.

Init

CreateTime

string

The time when the media asset was created.

2020-12-01T19:48Z

ModifiedTime

string

The time when the media asset was last modified.

2020-12-01T19:48Z

DeletedTime

string

The time when the media asset was deleted.

2020-12-01T19:48Z

SpriteImages

string

Sprite Image information in JSON format.

[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}]

CateId

integer

The category ID.

44

Biz

string

The business to which the media asset belongs.

IMS

UploadSource

string

The upload source.

general

CateName

string

The category name.

Sub Category 1

ReferenceId

string

A unique, custom ID for the user. It must be 6 to 64 characters long and can contain letters, digits, hyphens (-), and underscores (_).

123-123

Namespace

string

The namespace.

name-1

VisionDescription

string

A computer-vision-generated description of the media content.

Football goal

StreamStatus

string

The stream status.

Active

FileInfoList

array<object>

A list of file information.

array<object>

A file information object.

FileBasicInfo

object

Basic information about the file, such as its duration and size.

FileName

string

The name of the file.

164265080291300080527050.wav

FileStatus

string

The status of the file.

Normal

FileType

string

The type of the file.

source_file

FileSize

string

The file size in bytes.

324784

FileUrl

string

The Object Storage Service (OSS) URL of the file.

https://outin-d3f4681ddfd911ec99a600163e1403e7.oss-cn-shanghai.aliyuncs.com/sv/23d5cdd1-18180984899/23d5cdd1-1818098****.mp4

Region

string

The region where the file is stored.

cn-beijing

FormatName

string

The container format of the file.

mov,mp4,m4a,3gp,3g2,mj2

Duration

string

The duration of the file.

60.00000

Bitrate

string

The bitrate of the file.

1912.13

Width

string

The width of the video in pixels.

1920

Height

string

The height of the video in pixels.

480

CreateTime

string

The time when the file was created.

2022-05-30T02:02:17Z

ModifiedTime

string

The time when the file was last modified.

2021-12-10T12:19Z

ImagesInput

string

Information about the image set.

{}

AiData

object

The detailed AI data.

AiLabelInfo

array<object>

A list of AI label information.

array<object>

An AI label object.

FaceId

string

The ID of the recognized face.

5FE19530C7A422197535FE74F5DB****

LabelType

string

The type of the label.

Object

Source

string

The source of the AI data.

vision

Category

string

The category of the label.

Transportation

LabelName

string

The name of the entity.

Car

LabelId

string

The ID of the entity.

10310250338

Occurrences

array<object>

A list of clips where the entity appears.

array<object>

A clip object.

Score

number

The confidence score for the recognition result.

0.75287705

Image

string

The optimal image of the recognized face, encoded in Base64.

99C64F6287

TableBatchSeqId

string

The sequence ID of the vector table.

85010D1

clipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

FinegrainName

string

The fine-grained name of the entity.

Car

FinegrainId

string

The fine-grained ID of the entity.

10310250338

Content

string

The text content.

Pipi

Tracks

array<object>

A sequence of tracks that represent the entity within the clip.

object

A track data point.

Size

number

The size of the bounding box.

50.2

Position

string

The coordinates of the bounding box.

468.0;67.0;615.0;267.0

Timestamp

number

The timestamp of the track data point.

1.4

AsrInfo

array<object>

A list of Automatic Speech Recognition (ASR) results.

object

An ASR result object.

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

ClipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

Content

string

The transcribed text content.

I amPipi

Timestamp

number

The timestamp of the clip.

1.4

OcrInfo

array<object>

A list of Optical Character Recognition (OCR) results.

object

An OCR result object.

From

number

The start time of the clip.

1.4

To

number

The end time of the clip.

2.5

ClipId

string

The clip ID.

5FE19530C7A422197535FE74F5DB****

Content

string

The recognized text content.

I amPipi

Timestamp

number

The timestamp of the clip.

1.4

AiRoughData

object

A summary of the AI processing data.

SaveType

string

The save type of the AI data.

TEXT

Status

string

The save status of the AI data.

SaveSuccess

AiJobId

string

The ID of the AI job.

cd35b0b0025f71edbfcb472190a9****

Result

string

The URL of the raw AI result file.

http://xxxx.json

AiCategory

string

The AI category applied to the media asset.

VideoAICategory

IndexStatusList

array<object>

A list of indexing statuses for different index types.

object

An index status object.

IndexType

string

The type of the index. Valid values:

  • mm: Large Language Model (LLM).

  • face: Face.

  • aiLabel: Smart tagging.

mm

IndexStatus

string

The status of the index. Valid values:

  • Running: The index is being created.

  • Fail: The index creation failed.

  • Success: The index was created.

Success

CustomFields

string

Custom fields for filtering, provided as a JSON string.

{\"intField1\":12,\"strField1\":\"abc\"}

ScrollToken

string

The token used to retrieve the next page of results.

F8C4F642184DBDA5D93907A70AAE****

Total

integer

The total number of media assets matching the search criteria.

163

Examples

Success response

JSON format

{
  "RequestId": "6F61C357-ACC0-57FB-876E-D5879533****",
  "Success": "True",
  "Code": "200",
  "MediaInfoList": [
    {
      "MediaId": "3b187b3620c8490886cfc2a9578c****",
      "MediaBasicInfo": {
        "MediaId": "132bd600fc3c71ec99476732a78f****",
        "InputURL": "oss://clipres/longvideo/material/voice/prod/20220418/07d7c799f6054dc3bbef250854cf8498165024814****",
        "MediaType": "video",
        "BusinessType": "opening",
        "Source": "oss",
        "Title": "AI horizontal to vertical conversion",
        "Description": "For thisVideoTranscoding processed",
        "Category": "image",
        "MediaTags": "tags,tags2\n",
        "CoverURL": "https://dtlive-bj.oss-cn-beijing.aliyuncs.com/cover/e694372e-4f5b-4821-ae09-efd064f2****_large_cover_url.jpg",
        "UserData": "userData",
        "Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-01T19:48Z",
        "ModifiedTime": "2020-12-01T19:48Z\n",
        "DeletedTime": "2020-12-01T19:48Z\n",
        "SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
        "CateId": 44,
        "Biz": "IMS",
        "UploadSource": "general",
        "CateName": "SubCategory 1",
        "ReferenceId": "123-123",
        "Namespace": "name-1",
        "VisionDescription": "Football goal",
        "StreamStatus": "Active"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "164265080291300080527050.wav",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "324784",
            "FileUrl": "https://outin-d3f4681ddfd911ec99a600163e1403e7.oss-cn-shanghai.aliyuncs.com/sv/23d5cdd1-18180984899/23d5cdd1-1818098****.mp4",
            "Region": "cn-beijing",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "60.00000\n",
            "Bitrate": "1912.13\n",
            "Width": "1920",
            "Height": "480",
            "CreateTime": "2022-05-30T02:02:17Z",
            "ModifiedTime": "2021-12-10T12:19Z",
            "ImagesInput": "{}"
          }
        }
      ],
      "AiData": {
        "AiLabelInfo": [
          {
            "FaceId": "5FE19530C7A422197535FE74F5DB****",
            "LabelType": "Object",
            "Source": "vision",
            "Category": "Transportation",
            "LabelName": "Car",
            "LabelId": "10310250338",
            "Occurrences": [
              {
                "Score": 0.75287705,
                "Image": "99C64F6287",
                "TableBatchSeqId": "85010D1",
                "clipId": "5FE19530C7A422197535FE74F5DB****",
                "From": 1.4,
                "To": 2.5,
                "FinegrainName": "Car",
                "FinegrainId": "10310250338",
                "Content": "Pipi",
                "Tracks": [
                  {
                    "Size": 50.2,
                    "Position": "468.0;67.0;615.0;267.0",
                    "Timestamp": 1.4
                  }
                ]
              }
            ]
          }
        ],
        "AsrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****",
            "Content": "I amPipi",
            "Timestamp": 1.4
          }
        ],
        "OcrInfo": [
          {
            "From": 1.4,
            "To": 2.5,
            "ClipId": "5FE19530C7A422197535FE74F5DB****",
            "Content": "I amPipi",
            "Timestamp": 1.4
          }
        ]
      },
      "AiRoughData": {
        "SaveType": "TEXT",
        "Status": "SaveSuccess",
        "AiJobId": "cd35b0b0025f71edbfcb472190a9****",
        "Result": "http://xxxx.json",
        "AiCategory": "VideoAICategory"
      },
      "IndexStatusList": [
        {
          "IndexType": "mm",
          "IndexStatus": "Success"
        }
      ],
      "CustomFields": "{\\\"intField1\\\":12,\\\"strField1\\\":\\\"abc\\\"}"
    }
  ],
  "ScrollToken": "F8C4F642184DBDA5D93907A70AAE****",
  "Total": 163
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.