Show stream video views count in WordPress?

I am using the embed code to display Stream videos in a custom WordPress website. Is there a way that I can also display the all time view count per video on my WordPress pages/posts? If I need to somehow use the API instead to display the videos with the view count, I am open to that as well. I just need a little help in doing so. I have read the instructions for obtaining analytics, but I am not sure how to use cURL in WordPress. Are there any WordPress tutorials or suggestions anyone can give?

I know there is a plugin that does some of this, but I do not want to install a third party plugin.
It is also limited to specific time increments. I want all time view counts. Thanks!

I think you should check this tool. this will fix all the issue for WordPress Integration of Cloudflare Stream with the APIs security and analytics too

Thank you, but as I mentioned, I would like to use the existing API to make this work myself, rather than use a third party plugin that I have to pay extra for.

Hi there, the best way to go about this is to write a php script that queries Stream and returns analytics for your video. Then you can have wordpress call your php script (using ajax) which would return the analytics that can be displayed to your users.

Your php script can call the analytics APIs described here: