I need to fetch the video link to show trailer of a movie which I am searching using freebase API. SO is it possible to fetch the link using freebase result mid/id
You can do a freebase topic related video search on youtube via search->list call.
Set the part = "snippet" type = "video" and topicId = "YOUR_TOPIC_ID"
Related
I have a problem with the Youtube API, I want to get all my liked videos.
Using this : https://developers.google.com/youtube/v3/docs/channels/list
I find all my playlist but not the liked one..
Do you know if it's protected ?
So there is no way i can get my liked videos ?
There's no search filter for Youtube API that says 'get only my liked videos'. But there's a "part" property called 'statistics' that returns how many likes your videos has.
https://www.googleapis.com/youtube/v3/channels?part=statistics&key={YOUR_API_KEY}
If you want to get a list of all your "Liked" YouTube videos, regardless of where they are then you need to use:
"Videos : list"
You are using:
"Channels : list"
The URL for "Videos : list" is:
https://www.googleapis.com/youtube/v3/videos
See documentation at:
https://developers.google.com/youtube/v3/docs/videos/list#request
There is a sample of Request Parameters for:
list (my liked videos)
An option parameter of:
myRating=like
must be included in the URL search string if you are using the REST API.
I want get the file ID found in the youtube playlist.
Example:
FROM
I want to download a list of files in the form of movie id:
watch? v = uelHwf8o7_U
watch? v = wfWIs2gFTAM .. ..
Unfortunately, I cannot do this with youtube api v2. Is there anyway that I can do this? Please help! Thanks!
What you're looking for is PlaylistItems.list. Just provide the playlistID and it will list all the videos in that playlist including their corresponding File properties (ID, title, etc.).
How can I input search parameters using the YouTube API so that I only get video ID's from topic channels? For instance, if I go to youtube.com and manually search "Hello Adele - Topic" I correctly get the song, 'Hello' from the 'Adele - Topic' channel as my first search result, https://www.youtube.com/watch?v=_WS9w10ygpU.
However, if I perform the same query using the YouTube Data API, with the parameters:
part='snippet'
q='Hello Adele - Topic'
I won't get back the ID for the correct video. Is there any way to get this programmatically?
As stated in this thread, auto generated channels have no videos. They have only playlists with videos from other channels. So you have to look for playlists. You may check the sample request in this link.
Here's the URL sample of auto-generated Topic-based Id which grabs its playlist id:
GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId=HC9m3exs6zk1U&fields=items%2Fid&key={YOUR_API_KEY}
//Outputs sample playlist Id: LP9m3exs6zk1U
Now here's the URL sample using that playlist Id to get the videos from the auto-generated Topic-based channel Id:
GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=5&playlistId=LP9m3exs6zk1U&key={YOUR_API_KEY}
//Outputs video data you want.
Hope this helps.
I need to retrieve videos that contain some topic in title or description ,
I use the following request
https://www.googleapis.com/youtube/v3/search?part=snippet&q=???&channelId=???&key=???
it return result that not related to the query that I mentioned
Where is the problem?
How api retrieve the result ??
like this : http://gdata.youtube.com/feeds/api/videos?alt=rss&q=irem%20ya%C4%9Fc%C4%B1&author=ewakolik
I can search author and keyword together,
but I could not find it in v3 version
https://www.googleapis.com/youtube/v3/search?part=snippet&q=irem+ya%C4%9Fc%C4%B1&key={YOUR_API_KEY}
Author was the YouTube user who uploaded this video. This translates to channelID which the video is uploaded in v3.
So in your search you can define channelId.
GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId= UC1oFl9_Y7LM5tjCcpTpqA1g&q=irem+yagci&key={YOUR_API_KEY}
To get channelId of any legacy username you can use:
GET https://www.googleapis.com/youtube/v3/channels?part=id&forUsername=ewakolik&key={YOUR_API_KEY}