How to scrape YouTube w/o api

shaymiller

Regular Member
Joined
Dec 3, 2016
Messages
456
Reaction score
45
How can I scrape YouTube using simple dom w/o api?

can someone post code on php?
 
Hello,

What do you want to scrape ?
You can use solution like Selenium, Pupeteer or Zennoposter to emulate browser & actions.
 
Hello,

What do you want to scrape ?
You can use solution like Selenium, Pupeteer or Zennoposter to emulate browser & actions.
Search results, videos only. I don’t need comments, likes etc

can this be done with php?
 
Search results, videos only. I don’t need comments, likes etc

can this be done with php?

Yes it can be done with just PHP. You have to make a POST request with the keywords as parameter to this link:

Code:
https://www.youtube.com/youtubei/v1/search?key=[KEY]&prettyPrint=false

then you have to parse the response and get the data you need. You will still need an API key (generated automatically when you visit YouTube).
 
Thanks TomTheCat, will be usuefull this API. Do you have one for Google Search result too? :D
 
Back
Top