Likes and Dislike count for weekly data from YouTube Data API - youtube-api

Is it possible to get the below data from YouTube Data API?
Artist Channel Subscriber counts, by day
Thumbs Up, Thumbs Down for YouTube Videos or by ISRC, by day
Shares for YouTube Videos or by ISRC, by day

Unfortunately, you can't filter dates in Youtube Data API
In Youtube Data API :Channels
A channel resource contains information about a YouTube channel.
To get Subscriber count, use:
statistics.subscriberCount
The number of subscribers that the channel has.
You can use Youtube Analytics and Reporting APIs, to create a concrete stats regarding subscriber count,likes or dislikes and shares read carefully the dimension and metrics for a good search query parameters.
Metrics
This document defines the metrics that you can retrieve using the YouTube Analytics API. This API supports real-time queries to generate custom YouTube Analytics reports.
Metrics are individual measurements of user activity, ad performance, or earnings. User activity metrics include things like video view counts and ratings (likes and dislikes).
The list below identifies some of the API's core metrics.
dislikes
likes
shares
subscribersGained
subscribersLost
Dimensions
This document defines the dimensions that the YouTube Analytics API supports. This API supports real-time, targeted queries to generate custom YouTube Analytics reports.
Dimensions are common criteria that are used to aggregate data, such as the date on which user activity occurred or the country where users were located.
Each query report identifies the dimensions that it supports. For example, when retrieving user activity by time, you choose the time period for which data will be reported: day, 7DayTotals, 30DayTotals, month. In any report, each row of data has a unique combination of dimension values.
NOTE:
Core dimension and Core Metrics is subject to the Deprecation Policy.
Unfortunately you have to use staticstics of Youtube Data API to get Subscriber counts, likesCount and dislikeCount. Hope it helps!

Related

How do I get channel IDs for all YouTube channels in Japan?

I want to get channel IDs for all YouTube channels in Japan.
I tried to set the following parameters and call /search of YouTube Data API v3.
part: id
maxResults: 50
regionCode: jp
type: channel
pageInfo.totalResults in the API response is about 200,000 but actually I can only get 583 channel IDs.
583 is too little even if pageInfo.totalResults is an approximate value.
I would like to know how to get all the channel IDs in Japan, either by using the API or not.
I hope you will be able to provide the related information.
I tried to do almost the same for France. As said #stvar there isn't any appropriate endpoint to do so. However with patience and work we can make a kind of work around. My method only retrieves Japanese YouTube channels having indirectly publicly interacted with your starting set (see below).
Get a good starting set (in order to maximize the discover of the Japanese YouTube channels graph). I recommend you for instance to retrieve the top 100 Japanese YouTube channels sorted by view count by using SocialBlade.
For each channel discovered by the comments retrieved at step 3 (automatically) choose whether or not it is a Japanese YouTube channel. You can retrieve this piece of information if it is available for the channel in the "About" tab. To do it in an automatic way check whether or not snippet["country"] == "JP" in https://youtube.googleapis.com/youtube/v3/channels?part=snippet&id=CHANNEL_ID&key=YOUR_API_KEY If country isn't defined you can try to guess (automatically) whether or not it is a Japanese YouTube channel by making more complex checks see isFrench function. These checks are based on "About" tab and uploaded videos.
If the channel is interesting you (is Japanese) retrieve all comments (and so the YouTube channel about channel's videos and in the community tab using CommentThreads: list with part containing snippet and allThreadsRelatedToChannelId filter. If this method doesn't return any data because a video has disabled comments then retrieve the videos list and comments associated using (a) then CommentThreads: list with filter videoId. The approach (a) consists in getting the uploads auto-created playlist id of the YouTube channel by using Channels: list with contentDetails in part and then use PlaylistItems: list to retrieve all public videos uploaded on this YouTube channel. And if the YouTube channel contains more than 20 000 videos which is the upper limit for playlist size, use this script instead of (a). The script consists in faking requests done when browsing videos on a YouTube channel.
Then continue to dive into the Japanese YouTube channel graph by discovering Japanese YouTube channels through the comments found in your starting set and so on.
You can have a look for more details and some helping tools on my GitHub repository dedicated to the same approach for France (I was trying to list all comments let on French YouTube videos).
Of course you might need multithreading and group your YouTube Data API v3 request to reach maxResults upper limit in order to maximize your quota efficiency. Good luck.

Doesn't Twitter PowerTrack support past date tweets before the track's createdDate?

I'm trying to analyze tweets by Insights for Twitter. I use PowerTrack. I would like to search past tweets before the track's createdDate. I use query option(posted) in order to search past tweets.
When I set the date before the track's createdDate (query 1), I got no tweet. When I set the date after the track's createdDate (query 2), I got many tweets.
Doesn't Twitter PowerTrack support past date tweets before the track's createdDate ?
track's createDate: 2015-11-05T04:27:34.747Z
query1(after createDate): posted:2015-11-05T04:28:00Z,2015-11-05T04:33:00Z
-> I got many tweets.
query2(before createData): posted:2015-11-05T04:08:00Z,2015-11-05T04:13:00Z
-> I got no tweet.
The PowerTrack API supports realtime tweets only. It indexes new tweets after you activate the track and stops when you deactivate it or the endDate property of the track is reached (this is an optional property). After track is started you can query tweets from it.
Powertrack does not index past tweets. There is another API called Historical Powertrack that can index past tweets, but it is not supported by the Insights for Tweets Bluemix service.
The two queries you created are working as expected based on the track you have.
From the GNIP web site (http://support.gnip.com/faq):
What are the technical differences between realtime PowerTrack and
Historical PowerTrack?
Realtime PowerTrack provides customers with the
ability to filter Twitter’s full realtime firehose and data is
delivered to the customer’s application through a constant stream as
Tweets are posted. See the realtime PowerTrack Questions section below
for more details. Historical PowerTrack is a RESTful API that provides
access to the entire historical archive of public Twitter data – back
to the first Tweet in March 2006 – using the same rule-based-filtering
system as realtime PowerTrack. See the Historical PowerTrack Questions
section below for more details.
PowerTrack Supports only real time streaming. That is if you create a track and setup rules it will start getting filtered data from that moment.
If you want to access the historic data Gnip has given one more tool Historical Powertrack that can give you all the tweets since the beginning.
The restriction with Historical PowerTrack is the end time should be 30 min less than the current time.

Obtain analytical data for a specific video within a date range

So after scouring the youtube API, and thinking that this may not be possible, I'll give a last try here.
In a nutshell, I am trying to obtain analytical data from youtube's analytics's API for specific videos for a date range (by day if possible). I've found ways to get the channel data that the video reside in, but I have been unable to find how to ontain the specific video data itself. Assuming it exists in v3 that is.
Anyone had any luck with this kind of task at all? Has this feature been developed for v3 as of yet?
Channel Reports is the API to retrieve video metrics. It can filter by video, by country, by lead (for some fields) and accepts timespan and data aggregation granularity. In brief, Available Reports lists all the valid query parameter combinations.
Individual comments can be retrieved with v2 Data API - together with their dates.

Extracting all YouTube channel subscribers using API v3

Using the youtube data api version 3 I download subscribers using a query similar to this:
v3.channels().\
list(part=parts,mySubscribers=True,
maxResults=50, pageToken=nextPageToken).execute()
I never manage to download more than 70,000 results in total. This result is despite there being many more results available as reported on the channels' page.
For example one channel has over 2 million subscribers so I am retrieving only a small subset of the total.
Is this a limit enforced by Google? Is it possible to extract more?

YouTube Monthly views checker API and PHP?

My question is if there's a way to get the monthly original views. From a YouTube channel with Google Authentication system and YouTube APIs. Because i'm writing a little script that say's like when a curtain person get over a amount of, monthly views they will get sended further in to the site and get a document send through. Else they go back to the homepage, Is it possible to do this so yes how because i can't seem to find a way
You can use the YouTube Analytics API to run a report against a given video to request the number of "uniques" aggregated by month, for an arbitrary date range. The report definition would look something like
ids=channel==UC...
dimensions=month
metrics=uniques
filters=video==VIDEO_ID
start-date=2013-01-01
end-date=2013-01-01
You'd have to run that report once against every video in the channel, though, and add up the totals.
Note that the end-date is NOT the last day of the month you're looking for, it's the first day of that month again (i.e. it's a "month identifier", not a range of days).
You should note that you need to have an OAuth 2 token for the owner of the channel with the appropriate YouTube Analytics (and Data API, to get the list of videos) scopes in order to run that report; you can't just run an arbitrary Analytics report for an arbitrary video without being authorized.

Resources