How to find views per day with Youtube API - youtube-api

I'm able to get view count with Youtube API v3, but does anyone know how get the number of views per day? Any suggestions on how to scrape this data would be great.
Apparently it's possible:
How does one pull statistics (either daily or over time) from the YouTube API
but the person who commented how to do it now has a broken link.
Thanks in advance!

You'll have to pull in the total views every day and calculate the difference yourself.

Related

How to delete spam comments on my youtube videos and block spammy channels from commenting on my videos?

Using YouTube API V3 I have successfully identified the spam comments on my channel. The problem is using the delete API costs 50 credits which is alot given daily 10K credits only.
YouTube studio provides no way of deleting comments by ID and if I go to Settings -> Community -> Hidden users and add the spammy users to the list according to YouTube it will take a lot of days for the past comments to get removed. What to do, please help?
The 10k quota is for development use only YouTube expects you to request a quota extension if you need more quota then that. Fill out the form and request more.
YouTube API Services - Audit and Quota Extension Form
Should take a couple of weeks to get approved.
I would try out https://github.com/ThioJoe/YT-Spammer-Purge. It is a tool that lets you filter and search for spammer comments on your channel and other's channel(s) in many different ways AND delete/report them all at once.
The tool has a full wiki to help you with using it.
Here is the creators video showing it off:
https://www.youtube.com/watch?v=-vOakOgYLUI
Here is an LTT video showing how it works:
https://www.youtube.com/watch?v=zo_uoFI1WXM

Google API (youtube search) always sorts results by relevance instead of date

I use Google API to get a JSON result of my own YouTube channel videos.
The URL has not changed, but suddenly, Google returns the JSON only with order=relevant instead of order by date.
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCqEcEGQ0sG89j7ZhOdgFOyg&maxResults=24&order=date&type=video&videoType=any&key=<key>
The first result returned will be a 2 year old video instead of yesterday's one.
This call did work 'till last week (week 11 2016)
From this thread, it seems it is a bug and that the YouTube team is aware of it. A Google employee responded 3 days ago with:
YouTube is aware the search/sorting functions aren't working as
expected – this is temporary and part of our efforts to better
respond, review and remove graphic, violative content from YouTube.
Thanks for your patience while we work through this. Will update this
thread when these features are working normally again, feel free to
subscribe for updates.
You can subscribe to the thread for faster updates.

Youtube feed limit results

I am trying to create a Youtube feed reader using https://www.youtube.com/feeds/videos.xml?channel_id={CHANNEL:ID}, everything works but I want to read only one or two entries.
Is this possible to limit these feeds to return only a concrete number of entries? I don't want to use the V3 api as it will restrict the number of calls per day.
Cheers
The old-fashion way of limiting/paginating results of feeds have been depracated long ago and tourned off since 2015 along with YouTube Data API v2.
https://www.youtube.com/feeds/videos.xml?channel_id=XXXXX is still on but fixed (and limited) to 15 results.
So, one of the two:
- migrate to YouTube Data API (v3)
or
- parsing yourself the feed server side (PHP or whatever) to get only the first one/two results.
sadly, no other way.

Youtube Analytics: Filter videos only uploaded in given time period

I am totally stuck in finding a solution to this.
I am trying to easily filter the data for Yooutube videos uploaded in given time period to check only their Views and other metrics. Currently if I check the views in the Youtube Analytics, there are all the videos uploaded only the views in given period are considered.
Can somebody help?
thanks
You could create a group of the videos you are looking for. On the top right of YTA, click on Groups -> Create video group.

How do I retrieve cumulative views using the YouTube APIs?

I can't find anything on the web or the API docs for how to retrieve the very simple graph that shows up when you check the stats of a YouTube video right on the video page; that is, when you click the "Video Statistics" button to the right of the View Count on a video.
I just want a graph that starts at 0 views when the video was first uploaded to the number of views now; it should increase cumulatively with time. Anyone know how to get this?
Note -- I don't want data broken down per day (I'm aware of the new Analytics API).
The newly public YouTube Analytics API should allow you to get that sort of data (views broken down by day over a period of time).
https://developers.google.com/youtube/analytics/

Resources