我尝试使用jQuery从YouTube API获取带有JSON对象的YouTube视频标题,问题在于,从YouTube API获取JSON对象的所有网址都没有返回更正视频细节。它总是返回一个googledevicehelp视频或其他东西。如果有人能够给我正确的网址,我会很感激我测试的最新网址
https://gdata.youtube.com/feeds/api/videos/(the-video-id)?v=2&alt=json
它还没有返回视频详情
答案 0 :(得分:0)
YouTube API(v2)为deprecated - 使用此链接检索标题(您需要API密钥):
https://www.googleapis.com/youtube/v3/videos?id=YOUR_VIDEO_ID&key=YOUR_API_KEY&part=snippet,contentDetails,statistics,status
更多信息:https://developers.google.com/youtube/v3/getting-started