- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- OwnershipRestriction
- Sort
- Try it!
Searches for assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. This method mimics the functionality of the advanced search feature on the Assets page in CMS.
HTTP request
GET https://youtubepartner.googleapis.com/youtube/partner/v1/assetSearch
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
createdAfter |
The |
createdBefore |
The |
hasConflicts |
The |
includeAnyProvidedlabel |
If |
isrcs |
A comma-separated list of up to 50 ISRCs. If you specify a value for this parameter, the API server ignores any values set for the following parameters: |
labels |
The |
metadataSearchFields |
The |
onBehalfOfContentOwner |
The |
ownershipRestriction |
The |
pageToken |
The |
q |
YouTube searches within the |
sort |
The |
type |
The |
Request body
The request body must be empty.
Response body
This response shows a list of YouTube assets matching a search query. Each item in the list contains an asset's metadata.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "kind": string, "pageInfo": { object ( |
Fields | |
---|---|
kind |
The type of the API response. For this operation, the value is |
pageInfo |
The |
items[] |
A list of asset resources that match the request criteria. |
nextPageToken |
The token that can be used as the value of the |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/youtubepartner
For more information, see the OAuth 2.0 Overview.
OwnershipRestriction
Enum of ownership restriction.
Enums | |
---|---|
OWNERSHIP_RESTRICTION_UNSPECIFIED |
Default value. |
MINE |
Find assets owned by the current user that match the search query. This is the default behavior. |
NONE |
Find all assets that match the search query, regardless of owner. |
Sort
Enum of supported sorting orders in asset search list request.
Enums | |
---|---|
SORT_UNSPECIFIED |
Default value. |
CLAIMS |
Sort by the number of claims for each asset. |
TIME |
Sort by the modification time for each asset. This is the default value. |
VIEWS |
Sort by the approximate daily views for each asset. |