Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube error HTTP 429 - Too Many Requests

I have some php code that fetches a youtube link and then gets its thumbnail. For that I am using this:

$str = file_get_contents(youtubelink);

But I am getting this error sometimes:

Warning: file_get_contents(https://www.youtube.com/watch?v=urA28s-OGW0):     failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests in /home/mps/public_html/ajax/file.php on line 34

What is causing this error? How can I get rid of it? What's the limit I can access?

like image 561
user3455531 Avatar asked Mar 25 '26 01:03

user3455531


1 Answers

They are probably blocking you. They have an API to use, https://developers.google.com/youtube/v3/.

like image 171
chris85 Avatar answered Mar 26 '26 15:03

chris85



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!