Retrieve youtube views


#1

hello is there a javascript script to retrieve only views of a youtube video the embed iframe for youtube video doesn’t display number of views it.

thanks


#2

Look into YouTube’s API.

Retrieving a video provides pretty much all the info you could need, including view count:
https://developers.google.com/youtube/v3/docs/videos#resource

Also, they have some javascript examples on using the API:
https://developers.google.com/youtube/v3/code_samples/javascript