All Products
Search
Document Center

Intelligent Media Services:SearchMediaByFace

Last Updated:Mar 30, 2026

Search media assets by face image (coarse search). Input a face image to retrieve information about media assets containing the person in the image.

Operation description

For questions about using or troubleshooting the Intelligent Media Asset Search feature of Alibaba Cloud Intelligent Media Services, search for the DingTalk group (30415005038) and join the Intelligent Media Services multimodal search Customer Support DingTalk group to contact us.

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:SearchMediaByFace

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNo

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 10. Maximum value: 50.

10

EntityId

string

No

The ID of the entity.

2d3bf1e35a1e42b5ab338d701efa****

PersonImageUrl

string

Yes

The URL of the face image.

https://****.oss-cn-shanghai.aliyuncs.com/input/huangxuan****.jpg

FaceSearchToken

string

Yes

The token that is used to identify the query. You can use this parameter in the SearchMediaClipByFace operation to specify the same query conditions.

zxtest-huangxuan-2023-3-7-V1

SearchLibName

string

No

The name of the search library.

test1

MediaType

string

No

The type of the media asset. Valid values:

  • image

  • video

video

Namespace

string

No

Namespace.

name-1

CustomFilters

string

No

Custom filters. A JSON string. The following backing fields are supported: intField1 (integer type), strField1 and strField2 (string type). For the same field, only one matching mode can be specified. Filters across different fields are combined with a logical AND relationship.

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

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

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

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

UtcCreate

string

No

Creation time, in milliseconds UNIX timestamp. Use gte for greater than or equal to, and lte for less than or equal to.

  • Example range: {"gte":1761205662998,"lte":1771205662998}

{"gte":1761205662998,"lte":1771205662998}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request.

7CA7D615-CFB1-5437-9A12-2D185C3EE6CB

Success

string

Indicates whether the request was successful. Valid values: true false

true

Code

string

The status code returned.

200

MediaInfoList

array<object>

The media assets that meet the conditions.

object

The information about the media assets.

MediaId

string

The ID of the media asset.

3b187b3620c8490886cfc2a9578c****

Total

integer

The total number of data records that meet the specified filter condition.

163

Examples

Success response

JSON format

{
  "RequestId": "7CA7D615-CFB1-5437-9A12-2D185C3EE6CB",
  "Success": "true",
  "Code": "200",
  "MediaInfoList": [
    {
      "MediaId": "3b187b3620c8490886cfc2a9578c****"
    }
  ],
  "Total": 163
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.