I'm trying to get a search list for a specific keyword from the YouTube API. Total result is 1000000 but i got 307 data for videos after that thiss error is showing.
<HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/search?q=Hindi Dubbed Full Movie&part=snippet&type=video&maxResults=50&key=AIzaSyB-iMYosbF1idxehT66OTeOvxNWC2SlhXA&alt=json returned "The request cannot be completed because you have exceeded your quota.". Details: "[{'message': 'The request cannot be completed because you have exceeded your quota.', 'domain': 'youtube.quota', 'reason': 'quotaExceeded'}]">
CodePudding user response:
You have exceeded your maximum request limit via the YouTube API. You get videos from a YouTube page and the total number of results before the quota exceeded was 307 videos.
CodePudding user response:
In addition to @Akeel Medina answer:
YouTube Data API v3 Search: list endpoint is limited to 500 results:
Note: Search results are constrained to a maximum of 500 videos if your request specifies a value for the channelId parameter and sets the type parameter value to video, but it does not also set one of the forContentOwner, forDeveloper, or forMine filters.
Source: Search: list#channelId
Note that this 500 limit seems to happen not only for the documentation described case.
As described below this limit can't be bypassed by reverse-engineering YouTube UI Search feature:
YouTube UI search by query term (
Test
here) when filtering for only retrieving videos stopped after549
results (filteredago
as a whole word and filtering withview
gives a similar result)...When not filtering for only retrieving videos stopped after
654
results (filteredago
as a whole word). Filtering with:
view
gives 702 matchesVIEW FULL PLAYLIST
gives 2 matches, so can guess there are this number of playlistssubscriber
gives 44 matches, so can guess there are this number of channels
Source: https://github.com/Benjamin-Loison/YouTube-operational-API/issues/4