Video name by video ID - youtube-api

I am using the BigQuery Data Transfer Service to get data from YouTube Analytics to BigQuery and from there to Google Data Studio. This works fine, but the tables do not contain the video names. There are just the video IDs.
Best case was if I could get a field 'video_name' in here:
Is there a way to display the video names in Data Studio, e.g. for monitoring "Top Videos By Channel" in a chart?

Here is the youtube's data api, that can serve the purpose of yours,
I tried with this using https://content.googleapis.com/youtube/v3/videos?part=snippet&id= simply you need to provide single or mutiple video_ids like this id=xriwC_UpJER,1BB_dyvjrpf or just single id id=1BB_dyvjrpf.
Keep in mind that you need to be authorized to access this api, i-e you will need access token.

Related

Getting curated content using streaming API

I cam across one third party API which provides organized twitter data as per user request.
example
http://api.frrole.com/v1/curated-content?location=India&contenttype=link&category=sports&orderby=popularity&minrt=10&resultcount=100&apikey=4534sdg34343
It give top 100 tweets from india, which contains link in tweets and falling into sports category and having minimum rt count =10.
Can someone tell me how does this work? It gives json data as result. Does this result comes directly via twitter streaming APIs or third party's own data base?
Is there any way for streaming API to do this?
This is likely coming from their database. They are consuming the data from the Streaming API or another API and then applying their categorization to it, then giving you the ability to access it from an API.
Some of the criteria above you could get from the Streaming API such as the filter_level (to find top Tweets) but you wouldn't be able to get that whole set of requirements (especially the sports categorization).

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.

YouTube Data API V3: Fetch multiple videoCategoryId videos

I am using YouTube Data API Version 3.0 in one of my projects to fetch my channel video details from YouTube. I don't want the user to login to his/her Google account that's why I am directly using Search.list method instead of going through the OAuth 2.0 way.
Usually I fetch data using following URL.
https://www.googleapis.com/youtube/v3/search?key={API_KEY}&maxResults=5&part=snippet&type=video&channelId={CHANNEL_ID}
Now, I want to fetch data of 5 different categories at a time. What I can do is, hit the same URL 5 times with query string as
key={API_KEY}&maxResults=1&part=snippet&type=video&channelId={CHANNEL_ID}&videoCategoryId={CATEGORY_ID}
or,
Is there a way like
key={API_KEY}&maxResults=5&part=snippet&type=video&channelId={CHANNEL_ID}&videoCategoryId={CATEGORY_ID_1, CATEGORY_ID_2, CATEGORY_ID_3, CATEGORY_ID_4, CATEGORY_ID_5}
I want to fetch only 1 video data per category. That is why I have given 5 comma separated category IDs.
Also, Search.list method does not give videoCategoryId. To get it, I have to use
https://www.googleapis.com/youtube/v3/videos?part=snippet&id={VIDEO_ID}&key={API_KEY}
Is there any way to get videoCategoryId in Search.list method?
You need to have 5 queries for that. Even if you were able to give 5 category ids, it wouldn't understand to pick up one video data for each one.
Search doesn't return videoCategory right now, videos->list has it.
There is no problem going through OAuth2, you can just ask read-only permission, and should be fine. Users can pick their already stored accounts easily.

Which way is legal to store Youtbue API data

Im planning on making a website which stores user playlist data to share with other users in different way than youtube allow (My users will be able to view all records of all the playlists they created in a single list and etc) .
But I wonder if i can store data received from the Youtube API Data (playlist title, description, date, list of videos, thumbs addresses, etc) in my website database or the only way is to store in web server Session.
Of course I know that save of stream is not allowed.
Thank you very much, but I asked them if storing data generated by YouTube API Data (not JSON or XML results but data etc. title, description, id, thumbs addresses etc) in the database is consistent with the rules. The rule is the point:
Caching. Your API Client may employ session-based caching solely of YouTube API results, but You must use commercially reasonable efforts to cause Your API Client to update cached results upon any changes in video metadata. For example, if a video is removed from the YouTube service or made "private" by the video uploader, cached results shall be removed from Your cache. For the avoidance of doubt, Your API Client shall not be designed to cache YouTube audiovisual content.
What did they mean by a "session-based caching" and "YouTube API results".
if you are storing in your database, then you can give additional fields that he one advantage, and allow the user to overwirite the title and description etc, if you don't want the user database then rely on youtube data , these are preotyt XML,JSON data and very lightweight, it' good to implement to save the recenet snapshot in you database

Twitter live search stream

I am looking for a solution that would provide subscription-like responses that would contain results for particular tag from twitter.
I saw plenty of REST/ STREAM scripts for node.js but these scripts connect to twitter just once.
I would like not to be worried about rate limits.
Basically what I want to do is set up a notification (ex. console log) if there is a new search result for 20 different tags.
Is that possible?
With the streaming API you are only supposed to use a single connection, however it can contain multiple keywords (comma delimited) in the track attribute, and can be combined with other search parameters such as location and user filters.
The idea is that you use the one stream to collect all the data you need, and then process/filter that data independently to display or store as you please.

Resources