搜索Youtube并返回JSON

问题描述 投票:0回答:4

是否有一个网址可以让我在 YouTube 上搜索“foo”,并返回带有视频列表的 JSON?

json youtube
4个回答
7
投票

正如他们的 API 文档明确指出的那样,只需添加

?alt=json
:

http://gdata.youtube.com/feeds/api/videos?q=foo&alt=json


4
投票

YouTube JSON API 页面可以帮助您。

API 页面上的一些研究指出 http://gdata.youtube.com/feeds/api/videos?q=foo&alt=json 就是您所需要的...


3
投票

最新更新:

https://www.googleapis.com/youtube/v3/search?part=snippet&q=SEARCHPARAMATER&maxResults=25&key=

key

通过使用此 URL,您将能够提供搜索参数并获取所需的 JSON。


0
投票

yt-dlp可以帮助您。

yt-dlp --print-json ytsearch:'foo' --get-id --get-title --get-duration --get-description

然后你可以将命令的输出重定向到一个文件,这将是最好的选择,你也可以使用lib而不是命令行。

© www.soinside.com 2019 - 2024. All rights reserved.