Search for single youtube video with keywords

你离开我真会死。 提交于 2019-12-24 07:38:33

问题


I am creating a web app that requests a search to the youtube data api using keyword to then return the video id of the most popular video, i have successfully done this by sending a get request to 'https://www.googleapis.com/youtube/v3/search' although i then soon realised that each search request uses up 100 quotas when i have a limit of 10,000 so my question is, is is there an alternative method to get the same result im looking for? and if not how can i increase my quotas limit and how much will it cost?

$.get("https://www.googleapis.com/youtube/v3/search", {
        part: 'snippet',
        q: (title + " by " + artist),
        type: 'video',
        maxResults: 1,
        key: '******************'
    },
    function(data) {
        console.log(data.items[0].id.videoId)
    })

回答1:


The search request has a cost of 100 points, so, if you're planning using the search, you'll need more quota, and for that, you have to contact YouTube for ask them more quota (though, that is a paid service - which I couldn't find clear information about it).

I'm just guessing here, but, if the quota is a problem, try using other tool, like Google Custom Search API or other tool that lets you search for videos on YouTube.



来源:https://stackoverflow.com/questions/56443166/search-for-single-youtube-video-with-keywords

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!