tencent cloud

Video on Demand

SearchMedia

PDF
Focus Mode
Font Size
Last updated: 2026-04-23 09:40:43

1. API Description

Domain name for API request: vod.intl.tencentcloudapi.com.

Search media information, support multiple conditions filter criteria, and sort returned results, filter, and other features. This includes:
-Specify the file id collection FileIds, return media that matches any ID in the collection.
-Do fuzzy search based on multiple media file Names or Descriptions.
-Search for multiple filename prefixes NamePrefixes.
-Specify the category collection ClassIds (see input parameter), and media that meets any category in the collection will be returned. For example: media categories include movie, TV series, variety shows, among which movie has subcategories such as historical film, action film, romance film. If ClassIds specifies movie, TV series, then all subcategories under movie and TV series will be returned. If ClassIds specifies historical film, action film, then only media under these 2 subcategories will be returned.
-Specify the tag collection Tags (see input parameter), return media that meets any tag in the collection. For example: if a media has tags like ACG, palace drama, or parody remix, and Tags specifies ACG and parody remix, then any media that complies with any one of these two tags will be retrieved.
-Specify the file type set Categories (see input parameter), and return media that meets any type in the collection. For example: file types include Video, Audio, and Image. If Categories specifies Video and Audio, then media compliant with these types will be retrieved.
-Specify the source collection SourceTypes (see input parameter), return media that meets any source in the collection. For example: media sources include Record (live recording service) and Upload. If SourceTypes specifies Record and Upload, media that complies with these sources will be retrieved.
-Specify the file packaging format set MediaTypes (see input parameter), return media that meets any muxing format in the collection. For example: muxing formats include MP4, AVI, MP3. If MediaTypes specifies MP4 and MP3, then media that complies with these muxing formats will be retrieved.
-Specify the file status collection Status (see input parameter), return media that meets any status in the collection. For example: file status includes Normal, SystemForbidden (Platform Ban), Forbidden (Proactive Ban). If Status specifies Normal and Forbidden, media that complies with these states will be retrieved.
-Specify the file review result set ReviewResults (see input parameter), return media that meets any status in the collection. For example: file review results include pass and block. If ReviewResults specifies pass and block, media that complies with these review results will be retrieved.
-Specify the collection of live streaming codes StreamIds (see input parameter) to filter media for live recording.
-Filter media by creation time range of specified media.
-Specify TRTC application ID collection to filter media.
-Specify TRTC room ID collection to filter media.

-The above parameters can be combined in any combination for search. For example: filter media with creation time between 2018-12-01 12:00:00 and 2018-12-08 12:00:00, categorized as movie or TV series, and tagged with palace intrigue and suspense. Note that for any parameter supporting array input, the search logic between its elements is 'OR'. The logical relationship between ALL parameters is 'AND'.

-Allow passage through Filters to control the type of media information returned (default return all information). Selectable inputs include:

  1. Basic information (basicInfo): media name, category, playback address, cover image.
  2. Meta information (metaData): include size, duration, video stream information, audio stream information.
  3. Transcoding result information (transcodeInfo): includes generated media addresses, video stream parameters, audio stream parameters for different specifications.
  4. Animated graphics info (animatedGraphicsInfo): The info of animated graphics after video-to-gif conversion, such as gif.
  5. Sampled screenshot information (sampleSnapshotInfo): Screenshot information after sampling screenshot taking.
  6. Sprite image information (imageSpriteInfo): The sprite image information of the captured sprite image file from the video.
  7. Screenshot information at the specified time point (snapshotByTimeOffsetInfo): This API is used to obtain screenshot information after capturing snapshots at specified time points.
  8. Video timestamp information (keyFrameDescInfo): The dotting information for video setting.
  9. Adaptive Bitrate Streaming information (adaptiveDynamicStreamingInfo): including specification, encryption type, packaging format and other related information.

-Allow sorting the results by creation time and return in pages, using Offset and Limit (see input parameter) to control pagination.

API return result count limit:

-Both Offset and Limit parameters impact the number of pagination query results. Special attention: by default, this interface only returns up to 10 query results when both values are not specified.
-The maximum number of search results supported is 5000. Excess results are no longer supported for querying. If the search result volume is too large, recommend using more granular criteria to reduce the results.

Conditional filtering not recommend
-(Not recommended: Use Names, NamePrefixes, or Descriptions as alternatives) Specify single text Text to do fuzzy search on media file name or description.
-(Not recommended: Use SourceTypes as an alternative) Search for one media file source by specifying SourceType.
-(Not recommended: Use StreamIds as an alternative) Specify single push stream live code StreamId to search for.
-(Not recommended: Use CreateTime instead) Specify single start creation time StartTime to search.
-(Not recommended: Use CreateTime as alternative) Specify single ending creation time EndTime to search.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: SearchMedia.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
SubAppId No Integer

Video-on-demand (VOD) application ID. For customers who activate on-demand services from December 25, 2023, they must fill this field with the app ID when accessing resources in on-demand applications (whether it's the default application or a newly created application).

FileIds.N No Array of String

File id collection, match any element in the collection.

  • Array length limit: 10.
  • Single ID length limit: 40 character.
  • Names.N No Array of String

    File name collection. Fuzzy match media files by file name. The higher the matching degree, the higher the priority in sorting.

  • Single file name length limit: 100 characters.
  • Array length limit: 10.
  • NamePrefixes.N No Array of String

    File name prefix. Prefix match media files.

  • Single file name prefix length limit: 100 characters.
  • Array length limit: 10.
  • Descriptions.N No Array of String

    File description set, fuzzy match media files. The higher the matching degree, higher priority in sorting.

  • Single description length limit: 100 characters.
  • Array length limit: 10.
  • ClassIds.N No Array of Integer

    Category id collection, match the specified ID in the collection and all its subclasses.

  • Array length limit: 10.
  • Tags.N No Array of String

    Tag set, match any element in the collection.

  • Single tag length limit: 32 character.
  • Array length limit: 16.
  • Categories.N No Array of String

    File type. Match any element in the collection:

  • Video: video file
  • Audio: audio file
  • Image: image file
  • SourceTypes.N No Array of String

    Media file source collection. Source value reference SourceType.

  • Array length limit: 10.
  • StreamIds.N No Array of String

    Push stream live code collection. Match any element in the collection.

  • Array length limit: 10.
  • CreateTime No TimeRange

    Match files with creation time within this time period.

  • Include the specified start and end points in time.
  • ExpireTime No TimeRange

    Match files with expiration time within this period. Unable to retrieve expired files.

  • Include the specified start and end points in time.
  • StorageRegions.N No Array of String

    Media file storage region, such as ap-chongqing. Please refer to region list.

  • Single storage region length limit: 20 characters.
  • Array length limit: 20.
  • StorageClasses.N No Array of String

    Storage type array. Optional values:

  • STANDARD: Standard storage.
  • STANDARD_IA: Infrequent storage.
  • ARCHIVE: Archive storage.
  • DEEP_ARCHIVE: Deep archive storage.
  • MediaTypes.N No Array of String

    Media file packaging format collection, match any element in the collection.

  • Array length limit: 10.
  • Status.N No Array of String

    Media file status, match any element in the collection.

  • Normal: normal;
  • SystemForbidden: Platform Ban;
  • Forbidden: proactive ban.
  • ReviewResults.N No Array of String

    Media file review result, match any element in the collection.

  • pass: Pass review;
  • review: Suspected violation, suggest re-examination;
  • block: Confirmed violation, suggest banning;
  • notModerated: Not moderated.
  • TrtcSdkAppIds.N No Array of Integer

    TRTC application ID collection. Matches any element in the collection.

  • Array length limit: 10.
  • TrtcRoomIds.N No Array of String

    TRTC room ID collection. Matches any element in the collection.

  • Single room ID length limit: 64 characters;
  • Array length limit: 10.
  • Filters.N No Array of String

    Information to be returned for all specified media files, multiple information can be specified simultaneously, N starts incrementing from 0. If this field is not filled in, default return all information. Options include:

  • basicInfo (video basic information).
  • metaData (video metadata).
  • transcodeInfo (video transcoding result information).
  • animatedGraphicsInfo (video motion graphic result information).
  • imageSpriteInfo (video thumbnail information).
  • snapshotByTimeOffsetInfo (video screenshot by specified time point).
  • sampleSnapshotInfo (sampling screenshot information).
  • keyFrameDescInfo (Dotting Information).
  • adaptiveDynamicStreamingInfo (Adaptive Bitrate Streaming information).
  • miniProgramReviewInfo (miniProgramReviewInfo).
  • Sort No SortBy

    Sorting method.

  • Sort.Field optional CreateTime.
  • When Text, Names, or Descriptions is not empty, the Sort.Field field is invalid. Search results sorted by relevance.
  • Offset No Integer
    Starting offset amount for pagination return, default value: 0. Returns entries from Offset to Offset+Limit-1.
  • Value ranges from...to... Offset + Limit is no more than 5000. (See: API return result count limit)
  • Limit No Integer
    Number of records returned in pages. Default value: 10. Records from Offset to Offset+Limit-1 will be returned.
  • Value ranges from...to... Offset + Limit is no more than 5000. (Refer to: API return result count limit)
  • Text No String

    (Not recommended: Use Names, NamePrefixes, or Descriptions as alternatives)
    Search text, fuzzy match media file name or description information. The higher the matching degree and more matches, the higher priority in sorting. Length limit: 64 characters.

    SourceType No String

    (Not recommended: Use SourceTypes as an alternative)
    Media file source. Source value reference SourceType.

    StreamId No String

    (Not recommended: Use StreamIds as an alternative)
    Push stream live code.

    StartTime No String

    (Not recommended: Use CreateTime instead)
    Start time of creation time.

  • Greater than or equal to start time.
  • When CreateTime.After also exists, CreateTime.After will be used first.
  • Format according to ISO 8601 standard. For details, see ISO date format description.
  • EndTime No String

    (Not recommended: Use CreateTime instead)
    End time of creation time.

  • Less than end time.
  • When CreateTime.Before also exists, CreateTime.Before will be used first.
  • Format according to ISO 8601 standard. For details, see ISO date format description.
  • Vids.N No Array of String

    This field is invalid.

    Vid No String

    This field is invalid.

    StreamDomains.N No Array of String

    Live streaming push Domain. Valid when the media source is Live streaming Recording.

    StreamPaths.N No Array of String

    Live streaming push Path. Valid at that time when the source is live recording.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer

    Total records that meet search criteria.

  • Maximum value: 5000. When the number of records hit exceeds 5000, this field will return 5000 instead of the actual total count.
  • MediaInfoSet Array of MediaInfo

    Media file information list.

    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Query image files within a certain time range by category, return only basic information, and sort by creation time in descending order

    Search for image files with ClassId 123 and creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, sort in descending order by creation time, and return only basic information.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Common request parameters>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "Filters": [
            "basicInfo"
        ],
        "Categories": [
            "Image"
        ],
        "ClassIds": [
            123
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 2,
            "MediaInfoSet": [
                {
                    "FileId": "5285890811175706012",
                    "BasicInfo": {
    "Name": "Fog",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:02:36Z",
                        "UpdateTime": "2020-12-11T07:02:37Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
    "ClassName": "icon",
    "ClassPath": "icon"
                        "CoverUrl": "",
                        "Type": "png",
                        "MediaUrl": "http://example.com/Tmf3xphxGoUA.png",
                        "TagSet": [],
                        "StorageRegion": "ap-shanghai",
                        "StoragePath": "/Tmf3xphxGoUA.png",
                        "SourceInfo": {
                            "SourceType": "Upload",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Vid": "5285890811175706012",
                        "Category": "Image",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null,
                    "MetaData": null,
                    "TranscodeInfo": null,
                    "AnimatedGraphicsInfo": null,
                    "SampleSnapshotInfo": null,
                    "ImageSpriteInfo": null,
                    "SnapshotByTimeOffsetInfo": null,
                    "KeyFrameDescInfo": null,
                    "AdaptiveDynamicStreamingInfo": null,
                    "MiniProgramReviewInfo": null
                },
                {
                    "FileId": "5285890811175698692",
                    "BasicInfo": {
    "Name": "Multi-cloud"
                        "Description": "",
                        "CreateTime": "2020-12-11T07:02:35Z",
                        "UpdateTime": "2020-12-11T07:02:36Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 737598,
    "ClassName": "icon",
    "ClassPath": "icon"
                        "CoverUrl": "",
                        "Type": "png",
                        "MediaUrl": "http://xxx/uAgVpElena0A.png",
                        "TagSet": [],
                        "StorageRegion": "ap-shanghai",
                        "StoragePath": "/uAgVpElena0A.png",
                        "SourceInfo": {
                            "SourceType": "Upload",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "Vid": "5285890811175698692",
                        "Category": "Image",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null,
                    "MetaData": null,
                    "TranscodeInfo": null,
                    "AnimatedGraphicsInfo": null,
                    "SampleSnapshotInfo": null,
                    "ImageSpriteInfo": null,
                    "SnapshotByTimeOffsetInfo": null,
                    "KeyFrameDescInfo": null,
                    "AdaptiveDynamicStreamingInfo": null,
                    "MiniProgramReviewInfo": null
                }
            ]
        }
    }
    

    Example2 Search for recorded files within a certain time range based on the push stream live code and sort by creation time in descending order

    Query recording files with live stream codes StreamId_test1 and StreamId_test2 and creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, sort in descending order by createTime, and only return the first eligible file.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Common request parameters>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "StreamIds": [
            "StreamId_test2",
            "StreamId_test1"
        ],
        "Limit": 1,
        "SourceTypes": [
            "Record"
        ],
        "Offset": 0,
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
    "ClassName": "Audio and Video Recording for Playback"
    "ClassPath": "audio and video recorded"
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xxx/xx/f0.mp4",
                        "TagSet": [
                            "tag1",
                            "tag2"
                        ],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "StoragePath": "/xxx/xx/f0.mp4",
                        "Category": "Image",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://example.com/xx/xx/f20000.gif",
                                "Definition": 20000,
                                "Container": "gif",
                                "Height": 480,
                                "Width": 640,
                                "Bitrate": 1000000,
                                "Size": 600000,
                                "Md5": "bfcf7c6f154b1842a661f9e80b07a1d0",
                                "StartTimeOffset": 10,
                                "EndTimeOffset": 15
                            }
                        ]
                    },
                    "SampleSnapshotInfo": {
                        "SampleSnapshotSet": [
                            {
                                "Definition": 10,
                                "SampleType": "percent",
                                "WaterMarkDefinition": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/shotup/xx1.png",
                                    "http://example.com/xx/xx/shotup/xx2.png",
                                    "http://example.com/xx/xx/shotup/xx3.png",
                                    "http://example.com/xx/xx/shotup/xx4.png",
                                    "http://example.com/xx/xx/shotup/xx5.png",
                                    "http://example.com/xx/xx/shotup/xx6.png",
                                    "http://example.com/xx/xx/shotup/xx7.png",
                                    "http://example.com/xx/xx/shotup/xx8.png",
                                    "http://example.com/xx/xx/shotup/xx9.png",
                                    "http://example.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://example.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx1.jpg",
                                        "WaterMarkDefinition": []
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx2.jpg",
                                        "WaterMarkDefinition": []
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
    "Content": "Timestamp content"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example3 Search files within a certain time range by filename prefix and sort by creation time in descending order

    Find files with filename prefix Sport and creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, then sort them in descending order by creation time.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Common request parameters>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "NamePrefixes": [
            "Sport"
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
    "ClassName": "Audio and Video Recording for Playback"
    "ClassPath": "audio and video recorded"
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xxx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "StoragePath": "/xxx/xx/f0.mp4",
                        "Category": "Video",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://example.com/xx/xx/f20000.gif",
                                "Definition": 20000,
                                "Container": "gif",
                                "Height": 480,
                                "Width": 640,
                                "Bitrate": 1000000,
                                "Size": 600000,
                                "Md5": "bfcf7c6f154b1842a661f9e80b07a1d0",
                                "StartTimeOffset": 10,
                                "EndTimeOffset": 15
                            }
                        ]
                    },
                    "SampleSnapshotInfo": {
                        "SampleSnapshotSet": [
                            {
                                "Definition": 10,
                                "SampleType": "percent",
                                "WaterMarkDefinition": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/shotup/xx1.png",
                                    "http://example.com/xx/xx/shotup/xx2.png",
                                    "http://example.com/xx/xx/shotup/xx3.png",
                                    "http://example.com/xx/xx/shotup/xx4.png",
                                    "http://example.com/xx/xx/shotup/xx5.png",
                                    "http://example.com/xx/xx/shotup/xx6.png",
                                    "http://example.com/xx/xx/shotup/xx7.png",
                                    "http://example.com/xx/xx/shotup/xx8.png",
                                    "http://example.com/xx/xx/shotup/xx9.png",
                                    "http://example.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://example.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx1.jpg",
                                        "WaterMarkDefinition": []
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx2.jpg",
                                        "WaterMarkDefinition": []
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
    "Content": "Timestamp content"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example4 Fuzzy search files within a certain time range based on file name and sort by creation time in descending order

    Search files with the name matching the keyword Sport and creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, then sort them in descending order by createTime.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Common request parameters>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "Names": [
            "Sport"
        ],
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
    "ClassName": "Audio and Video Recording for Playback"
    "ClassPath": "audio and video recording for playback"
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xxx/xx/f0.mp4",
                        "TagSet": [],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "StoragePath": "/xxx/xx/f0.mp4",
                        "Category": "Video",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://example.com/xx/xx/f20000.gif",
                                "Definition": 20000,
                                "Container": "gif",
                                "Height": 480,
                                "Width": 640,
                                "Bitrate": 1000000,
                                "Size": 600000,
                                "Md5": "bfcf7c6f154b1842a661f9e80b07a1d0",
                                "StartTimeOffset": 10,
                                "EndTimeOffset": 15
                            }
                        ]
                    },
                    "SampleSnapshotInfo": {
                        "SampleSnapshotSet": [
                            {
                                "Definition": 10,
                                "SampleType": "percent",
                                "WaterMarkDefinition": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/shotup/xx1.png",
                                    "http://example.com/xx/xx/shotup/xx2.png",
                                    "http://example.com/xx/xx/shotup/xx3.png",
                                    "http://example.com/xx/xx/shotup/xx4.png",
                                    "http://example.com/xx/xx/shotup/xx5.png",
                                    "http://example.com/xx/xx/shotup/xx6.png",
                                    "http://example.com/xx/xx/shotup/xx7.png",
                                    "http://example.com/xx/xx/shotup/xx8.png",
                                    "http://example.com/xx/xx/shotup/xx9.png",
                                    "http://example.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://example.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx1.jpg",
                                        "WaterMarkDefinition": []
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx2.jpg",
                                        "WaterMarkDefinition": []
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
    "Content": "Timestamp content"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    Example5 Search for uploaded files within a certain time range by tag and sort by creation time in descending order

    Search for files with search tags tag1 and tag2, creation time between 2020-12-10T07:25:52Z and 2020-12-13T07:25:52Z, and file source as Upload, then sort them in descending order by creation time.

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: SearchMedia
    <Common request parameters>
    
    {
        "Sort": {
            "Field": "CreateTime",
            "Order": "Desc"
        },
        "CreateTime": {
            "After": "2020-12-10T07:25:52Z",
            "Before": "2020-12-13T07:25:52Z"
        },
        "SourceTypes": [
            "Upload"
        ],
        "Tags": [
            "tag2",
            "tag1"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
            "TotalCount": 1,
            "MediaInfoSet": [
                {
                    "FileId": "5285485487985271487",
                    "BasicInfo": {
                        "Name": "Sport file",
                        "Description": "",
                        "CreateTime": "2020-12-11T07:25:52Z",
                        "UpdateTime": "2020-12-11T07:25:52Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 123,
    "ClassName": "Audio and Video Recording for Playback"
    "ClassPath": "audio and video recording for playback"
                        "CoverUrl": "http://example.com/xxxxxxxx/shotup/f0.100_0.jpg",
                        "Type": "mp4",
                        "MediaUrl": "http://example.com/xxx/xx/f0.mp4",
                        "TagSet": [
                            "tag1",
                            "tag2"
                        ],
                        "SourceInfo": {
                            "SourceType": "Record",
                            "SourceContext": "",
                            "TrtcRecordInfo": {
                                "SdkAppId": 1,
                                "RoomId": "RoomId",
                                "TaskId": "TaskId",
                                "UserIds": [
                                    "UserId"
                                ]
                            },
                            "WebPageRecordInfo": null,
                            "LiveRecordInfo": null
                        },
                        "StorageRegion": "ap-chongqing",
                        "StoragePath": "/xxx/xx/f0.mp4",
                        "Category": "Image",
                        "Vid": "5285485487985271487",
                        "Status": "Normal",
                        "StorageClass": "STANDARD"
                    },
                    "MetaData": {
                        "Size": 10556,
                        "Container": "m4a",
                        "Duration": 3601,
                        "Bitrate": 246035,
                        "Height": 480,
                        "Width": 640,
                        "Rotate": 0,
                        "VideoDuration": 3601,
                        "AudioDuration": 3601,
                        "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                        "VideoStreamSet": [
                            {
                                "Bitrate": 246000,
                                "Height": 480,
                                "Width": 640,
                                "Codec": "h264",
                                "CodecTag": "avc1",
                                "Fps": 222,
                                "DynamicRangeInfo": {
                                    "Type": "HDR",
                                    "HDRType": "hdr10"
                                }
                            }
                        ],
                        "AudioStreamSet": [
                            {
                                "Codec": "aac",
                                "SamplingRate": 44100,
                                "Bitrate": 35
                            }
                        ]
                    },
                    "TranscodeInfo": {
                        "TranscodeSet": [
                            {
                                "Url": "http://example.com/xx/xx/f0.mp4",
                                "Definition": 0,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "m4a",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/f0.f210.m3u8",
                                "Definition": 211,
                                "Bitrate": 563477,
                                "Height": 378,
                                "Width": 672,
                                "Container": "mov",
                                "Duration": 3601,
                                "Size": 10502,
                                "Md5": "b3ae6ed07d9bf4efeeb94ed2d37ff3e3",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 246000,
                                        "Height": 480,
                                        "Width": 640,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 222,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "Codec": "aac",
                                        "SamplingRate": 44100,
                                        "Bitrate": 35
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            },
                            {
                                "Url": "http://example.com/xx/xx/master_playlist.m3u8",
                                "Definition": 10000,
                                "Duration": 145,
                                "Size": 265,
                                "Bitrate": 2840055,
                                "Height": 1080,
                                "Width": 1920,
                                "Container": "hls,applehttp",
                                "Md5": "bfcf7c6f154b18890661f9e80b0731d0",
                                "VideoStreamSet": [
                                    {
                                        "Bitrate": 2794233,
                                        "Height": 1080,
                                        "Width": 1920,
                                        "Codec": "h264",
                                        "CodecTag": "avc1",
                                        "Fps": 24,
                                        "DynamicRangeInfo": {
                                            "Type": "HDR",
                                            "HDRType": "hdr10"
                                        }
                                    }
                                ],
                                "AudioStreamSet": [
                                    {
                                        "SamplingRate": 44100,
                                        "Bitrate": 45822,
                                        "Codec": "aac"
                                    }
                                ],
                                "DigitalWatermarkType": "None",
                                "CopyRightWatermarkText": "None"
                            }
                        ]
                    },
                    "AnimatedGraphicsInfo": {
                        "AnimatedGraphicsSet": [
                            {
                                "Url": "http://example.com/xx/xx/f20000.gif",
                                "Definition": 20000,
                                "Container": "gif",
                                "Height": 480,
                                "Width": 640,
                                "Bitrate": 1000000,
                                "Size": 600000,
                                "Md5": "bfcf7c6f154b1842a661f9e80b07a1d0",
                                "StartTimeOffset": 10,
                                "EndTimeOffset": 15
                            }
                        ]
                    },
                    "SampleSnapshotInfo": {
                        "SampleSnapshotSet": [
                            {
                                "Definition": 10,
                                "SampleType": "percent",
                                "WaterMarkDefinition": [
                                    0
                                ],
                                "Interval": 10,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/shotup/xx1.png",
                                    "http://example.com/xx/xx/shotup/xx2.png",
                                    "http://example.com/xx/xx/shotup/xx3.png",
                                    "http://example.com/xx/xx/shotup/xx4.png",
                                    "http://example.com/xx/xx/shotup/xx5.png",
                                    "http://example.com/xx/xx/shotup/xx6.png",
                                    "http://example.com/xx/xx/shotup/xx7.png",
                                    "http://example.com/xx/xx/shotup/xx8.png",
                                    "http://example.com/xx/xx/shotup/xx9.png",
                                    "http://example.com/xx/xx/shotup/xx10.png"
                                ]
                            }
                        ]
                    },
                    "ImageSpriteInfo": {
                        "ImageSpriteSet": [
                            {
                                "Definition": 10,
                                "Height": 576,
                                "Width": 1024,
                                "TotalCount": 100,
                                "ImageUrlSet": [
                                    "http://example.com/xx/xx/imageSprite/xx.100_0.jpg"
                                ],
                                "WebVttUrl": "http://example.com/xxxx/xxxx/imageSprite/xx.vtt"
                            }
                        ]
                    },
                    "SnapshotByTimeOffsetInfo": {
                        "SnapshotByTimeOffsetSet": [
                            {
                                "Definition": 10,
                                "PicInfoSet": [
                                    {
                                        "TimeOffset": 0,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx1.jpg",
                                        "WaterMarkDefinition": []
                                    },
                                    {
                                        "TimeOffset": 1000,
                                        "Url": "http://example.com/xx/xx/snapshotByTime/xx2.jpg",
                                        "WaterMarkDefinition": []
                                    }
                                ]
                            }
                        ]
                    },
                    "KeyFrameDescInfo": {
                        "KeyFrameDescSet": [
                            {
                                "TimeOffset": 1,
    "Content": "Timestamp content"
                            },
                            {
                                "TimeOffset": 100,
                                "Content": "def"
                            }
                        ]
                    },
                    "MiniProgramReviewInfo": {
                        "MiniProgramReviewList": [
                            {
                                "Url": "url",
                                "Definition": 0,
                                "ReviewResult": "Pass",
                                "ReviewSummary": [
                                    {
                                        "Confidence": 0,
                                        "Type": "Porn",
                                        "Suggestion": "pass"
                                    }
                                ],
                                "MetaData": {
                                    "Rotate": 0,
                                    "Container": "mp4",
                                    "AudioDuration": 0,
                                    "Md5": "md5",
                                    "VideoStreamSet": [
                                        {
                                            "Width": 0,
                                            "Codec": "h264",
                                            "CodecTag": "avc1",
                                            "Bitrate": 0,
                                            "Fps": 0,
                                            "Height": 0,
                                            "DynamicRangeInfo": {
                                                "Type": "HDR",
                                                "HDRType": "hdr10"
                                            }
                                        }
                                    ],
                                    "Height": 0,
                                    "VideoDuration": 0,
                                    "Width": 0,
                                    "Duration": 0,
                                    "Size": 0,
                                    "Bitrate": 0,
                                    "AudioStreamSet": [
                                        {
                                            "SamplingRate": 0,
                                            "Codec": "h264",
                                            "Bitrate": 0
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "AdaptiveDynamicStreamingInfo": {
                        "AdaptiveDynamicStreamingSet": [
                            {
                                "Size": 10556,
                                "DrmType": "drm",
                                "Definition": 0,
                                "Url": "url",
                                "Package": "HLS",
                                "SubStreamSet": [],
                                "DigitalWatermarkType": "NONE",
                                "CopyRightWatermarkText": "NONE"
                            }
                        ]
                    },
                    "SubtitleInfo": {
                        "SubtitleSet": [
                            {
                                "Url": "url",
                                "Format": "vtt",
                                "Name": "name",
                                "Language": "cn",
                                "Id": "id",
                                "Source": "UserUploaded"
                            }
                        ]
                    },
                    "ReviewInfo": null
                }
            ]
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation Operation failed.
    FailedOperation.InvalidVodUser The VOD service is not activated.
    InternalError Internal error.
    InternalError.GetMediaListError Internal error: an error occurred while getting the media list.
    InvalidParameterValue.Categories Invalid file type.
    InvalidParameterValue.ClassIds Incorrect parameter value: invalid ClassIds.
    InvalidParameterValue.EndTime Incorrect parameter value: invalid EndTime.
    InvalidParameterValue.FileIds Incorrect FileIds parameter.
    InvalidParameterValue.NamePrefixes Invalid filename prefix.
    InvalidParameterValue.Names Too many elements in the Names array.
    InvalidParameterValue.Offset Incorrect parameter value: invalid Offset.
    InvalidParameterValue.Sort Incorrect parameter value: invalid Sort.
    InvalidParameterValue.SourceType Incorrect parameter value: invalid SourceType.
    InvalidParameterValue.SourceTypes Unknown media file source.
    InvalidParameterValue.StartTime Incorrect parameter value: invalid StartTime.
    InvalidParameterValue.StorageRegions Invalid StorageRegions.
    InvalidParameterValue.StreamIds Invalid stream ID.
    InvalidParameterValue.SubAppId Incorrect parameter value: application id.
    InvalidParameterValue.Tags Incorrect parameter value: invalid Tags.
    InvalidParameterValue.Text Incorrect parameter value: search text.
    InvalidParameterValue.Types Invalid Types.
    InvalidParameterValue.Vids Invalid Vids.
    LimitExceeded Quota limit is exceeded.
    UnauthorizedOperation Unauthorized operation.

    Help and Support

    Was this page helpful?

    Help us improve! Rate your documentation experience in 5 mins.

    Feedback