YouTube Videos List
1积分/次
ae_youtube_videos_list
获取特定 YouTube 视频的详细信息和统计数据,或浏览热门视频排行榜。
1积分/次
价格说明
1积分/次
| 条件 | 费用 |
|---|---|
| 每次调用 | 1积分/次 |
工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
hl | string | 否 | Stands for "host language". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX). | — |
id | string | 否 | Comma-separated YouTube video IDs. Use supplied valid IDs, search.list(type=video) items[].id.videoId, or playlistItems.list(part=contentDetails) items[].contentDetails.videoId (also available as items[].snippet.resourceId.videoId with part=snippet). playlistItems items[].id identifies the playlist item, not the video; do not pass it as a video ID. | — |
part | string | 是 | The *part* parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set *part=snippet*, the API response will contain all of those properties. | — |
chart | enum (chartUnspecified | mostPopular) | 否 | Return the videos that are in the specified chart. | — |
locale | string | 否 | Locale setting for localized content formatting (e.g., 'en_US'). | — |
maxWidth | integer | 否 | Maximum width in pixels used to calculate the embedded player dimensions. Official documentation lists 72 through 8192; direct API tests honored positive values including 1, 71, 8193 and 16384. Zero and -1 returned the default player dimensions in the tested video. Actual runtime bounds have not been established. | — |
myRating | enum (none | like | dislike) | 否 | Return videos liked/disliked by the authenticated user. Does not support RateType.RATED_TYPE_NONE. | — |
maxHeight | integer | 否 | Maximum height in pixels used to calculate the embedded player dimensions. Official documentation lists 72 through 8192; direct API tests honored positive values including 1, 71, 8193 and 16384. Zero and -1 returned the default player dimensions in the tested video. Actual runtime bounds have not been established. | — |
pageToken | string | 否 | Optional opaque pagination token. Omit on the first request. To fetch the next page, copy nextPageToken exactly from the previous response into pageToken and call this same endpoint again, keeping the playlist/channel/video identifiers, filters, part and other query settings unchanged. Use prevPageToken to go back when provided. Do not invent tokens or use a token from another query. Stop when nextPageToken is absent; no nextPageToken means no further page is advertised, even if a page contains fewer items than maxResults. | — |
maxResults | integer | 否 | Maximum number of items requested per page, not a limit on the total query results. Use nextPageToken as pageToken to retrieve subsequent pages when available. Direct API tests accepted values above 50 but capped the effective page size at 50; requesting more does not increase page size. Zero is accepted and can return an empty page. maxResults applies to chart or myRating queries; omit it when querying by id. | — |
regionCode | string | 否 | Use a chart that is specific to the specified region | — |
videoCategoryId | string | 否 | Use chart that is specific to the specified video category | — |
onBehalfOfContentOwner | string | 否 | *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. | — |
调用示例
复制请求代码,查看对应的返回示例。
POST
/agent-api/v1/tool/executeX-Api-Key请求代码request.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_videos_list' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"id": "n1_fgNm63zA,SNgYM-6WtTA,F7f2BnQGdJQ",
"maxResults": 50,
"part": "snippet,statistics"
}
}'返回示例response.json
{
"etag": "siUZ8V99phHSFYTYVGVrSMbZyQM",
"items": [
{
"etag": "hW58Dq3C254wS4_JGoiV5wzXwsM",
"id": "n1_fgNm63zA",
"kind": "youtube#video",
"snippet": {
"categoryId": "22",
"channelId": "UCoUXMPiRtDcPIkzlIiDPJKQ",
"channelTitle": "Dibrah",
"defaultAudioLanguage": "es",
"defaultLanguage": "es",
"title": "CRISTIANO RONALDO (El Documental Completo)🟡 SU FINAL"
},
"statistics": {
"commentCount": "15",
"favoriteCount": "0",
"likeCount": "252",
"viewCount": "10150"
}
}
],
"kind": "youtube#videoListResponse",
"pageInfo": {
"resultsPerPage": 3,
"totalResults": 3
}
}返回示例仅展示部分内容,不代表完整响应;复制内容为合法 JSON。
使用该工具的指南
看看真实工作流里怎么用这个工具

