TimeForANinja / node-ytsr

Do anonymous YouTube search requests.
MIT License
285 stars 66 forks source link

How can I get the URL of the very first video? #57

Closed DaLLamaKing closed 4 years ago

DaLLamaKing commented 4 years ago

How can I get the URL of the very first video? Pretty much the question is the same as the title. I just want someone to be able to use my code to find the very first song/video and be able to play it.

TimeForANinja commented 4 years ago

You can find an example output here

ytsr(<search q>).then(resp => console.log(resp.items[0].link));

SupertigerDev commented 3 years ago

isnt there a way to save bandwidth? Because we are getting so much data but we only need 1 item.

TimeForANinja commented 3 years ago

isnt there a way to save bandwidth? Because we are getting so much data but we only need 1 item.

set the pages parameter to 1