
YouTube Data API v3 videos.list 是官方获取单 / 多条视频完整详情的标准接口。
鉴权方式:公开数据使用 API KEY;私有视频、评论、字幕需 OAuth2.0;通过 id 参数传入视频 ID 查询,part 参数按需指定返回片段(snippet/contentDetails/statistics),统一返回标准 JSON 结构,用于海外短视频数据分析、创作者监控、竞品调研、内容素材采集等场景Google for Developers。
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/XwZ123abcDEF456\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"id": "7lCDEYXw3mM",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg",
"width": 480,
"height": 360
}
},
"channelTitle": "Google Developers",
"tags": ["Google API", "OAuth2", "Google I/O", "开发教程"],
"categoryId": "28",
"liveBroadcastContent": "none"
},
"contentDetails": {
"duration": "PT1H23M12S",
"dimension": "2d",
"definition": "hd",
"caption": "true",
"licensedContent": true
},
"statistics": {
"viewCount": "158907",
"likeCount": "5947",
"favoriteCount": "0",
"commentCount": "241"
}
}
]
}{
"error": {
"code": 403,
"message": "The request cannot be completed because you have exceeded your quota.",
"errors": [
{
"message": "The request cannot be completed because you have exceeded your quota.",
"domain": "youtube.quota",
"reason": "quotaExceeded"
}
],
"status": "PERMISSION_DENIED"
}
}{
"error": {
"code": 403,
"message": "API key not valid. Please pass a valid API key.",
"errors": [
{
"message": "API key not valid. Please pass a valid API key.",
"domain": "usageLimits",
"reason": "keyInvalid"
}
],
"status": "PERMISSION_DENIED"
}
}{
"kind": "youtube#videoListResponse",
"etag": "\"xxx\"",
"pageInfo": {
"totalResults": 0,
"resultsPerPage": 0
},
"items": []
}{
"error": {
"code": 400,
"message": "Missing required parameter: id",
"errors": [
{
"message": "Missing required parameter: id",
"domain": "global",
"reason": "missingParameter",
"location": "parameter",
"locationType": "query"
}
],
"status": "INVALID_ARGUMENT"
}
}kind:资源类型固定 youtube#videoListResponseitems:视频数据数组,单条视频封装为 youtube#video 对象pageInfo:分页统计总数与每页条数id:视频唯一 VID,查询主键title/description:视频标题、简介文案publishedAt:ISO 标准 UTC 发布时间channelId/channelTitle:创作者频道 ID 与频道名thumbnails:多分辨率封面图地址tags:视频标签数组,用于内容归类分析duration:时长 ISO 格式(PT1H23M12S=1 小时 23 分 12 秒)definition:清晰度 hd/sdcaption:是否自带字幕viewCount:播放总量(字符串类型,需转数字计算)likeCount:点赞数commentCount:评论总数part 参数按需填写,只拉取需要片段减少配额消耗;原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。