Youtube api Search Video + Get Video Views in 1 api Request only

Viewed 166

I currently have this logic to Search Videos

https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelType=any&maxResults=20&pageToken=${Page}&q=${Value}&type=video&videoType=any&key=MyKey

But I also wanted to get Video statistics, I know how to get it with another API request like this

https://www.googleapis.com/youtube/v3/videos?part=statistics&id=S3YnYrcD1sQ&key=Mykey

But I wanted if I could Search Videos and get the video statistics with that search response only. Any help will be appreciated

1 Answers

API Key is being shown on the end of the second link! Edit the link for your own good :)

Regarding the question I don't think it's possible as of the moment due to restrictions of the youtube api. You'll need to parse the first request and then send the second one with the video id.

Related