I'm trying to get all of my playlists through YouTube Data API including the public playlist that I have created and playlists that I liked from YouTube.
The playlists that I have liked from YouTube are in separate section which call "Saved playlists".
I'm using
https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId={ChannelID}&maxResults=50&key={YOUR_API_KEY}
But I'm getting only the playlist that I have created.
How can I get the "Saved playlists"?
I cannot add a comment, so I'm writing as an answer. (I hope I'm not doing anything against Stackoverflow Terms of Service)
If you would like to retrieve a spesific Playlist, i.e. "Saved Playlist", you should remove the Channel ID from your request and add Playlist ID ...
For example;
GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&id={PlaylistID}&maxResults=50&key={YOUR_API_KEY}
I hope it helps.
Unfortunately this endpoint only retrieves user created playlists, the ability to retrieve "Saved Playlists" it is not implemented yet.
As can be seen here:
https://code.google.com/p/gdata-issues/issues/detail?id=6836
Related
I see YouTube app updated new function to share videos with the url like this:
https://www.youtube.com/shared?ci=8A940MXKFmQ
My app is using YouTube API/videos/list to get video informations and it required the Video ID field.
How can we get youtube video id from the url above.
Thanks
This is maybe not a good way to do it, but since there seems to be no API for that, check this:
https://github.com/rg3/youtube-dl/commit/4080530624eda994d535e1a01c38ddd6d9aa3805
What they do is fetching the content and search for the meta tag with the name videoId. Again: Not a good way, maybe this approach stops working in a month or a year or maybe never.
I am using the YouTube Partner API to upload videos on the partner's behalf for monetization tracking and reporting.
The process is as follows:
User uploads video to website.
Video is pushed to channel owned by partner, asset is created, claim is created for the video uploaded to the partner channel.
Video is pushed to the user's public youtube channel
All of this is working, but I cannot figure out how to set the "Enable Content ID Matchs" option that is found in the YouTube CMS videos section. This needs to be enabled so the video that is uploaded to the user's public channel will be matched.
Anyone know if this is possible through the Partner API?
Edit: The Partner API, is actually called Content ID API, the classes are YouTubePartner.
Not sure if you're still looking for an answer to this question, but since I just ran into the same problem, I figured I'd share what I found.
Per the google developer docs:
Once you have uploaded the video and created an asset, you'll need to update the AssetMatchPolicy on the asset. The AssetMatchPolicy is where you specify what would constitute a match to your content. You can exclude certain territories, and also set required duration minimums for matches. The doc uses the following as an example of a request body for a policy that tracks videos worldwide and matches longer than 10 seconds:
{
'name': 'Track Everywhere 10s.',
'description': 'Track Everywhere matches longer than 10s.',
'rules': [{
'action': 'track',
'condition': {
'requiredTerritories': {'type': 'exclude', 'territories': []},
'requiredReferenceDuration': [{'low': 10}],
'contentMatchType': 'video'
}
}]
}
Once the AssetMatchPolicy is in place, you will need to upload a reference file. I don't know your exact use case, but for me, the reference was just the same mov file I used to create the initial youtube video. The AssetMatchPolicy uses this reference file for enforcing your policy rules.
After you've done all of that you can continue with creating the claim and pushing the video out to the public channel.
I am developing a client of Youtube for iOS devices. I want to check if logged user did Like or dislike a specified video or not. But I can't find any support API (here)
When I load the feed of videos, I just found rating information below , No thing shows that logged user liked or disliked this video.
{
"gd$rating":{
"average":4.8963733,
"max":5,
"min":1,
"numRaters":193,
"rel":"http://schemas.google.com/g/2005#overall"
},
"yt$statistics":{
"favoriteCount":"0",
"viewCount":"111626"
},
"yt$rating":{
"numDislikes":"5",
"numLikes":"188"
}
}
Did I make any mistake?
It can be done using YouTube Data API v3.
https://developers.google.com/youtube/v3/docs/videos/getRating
This is API v3, checkout this page :
https://developers.google.com/youtube/v3/docs/playlists
Currently, The official client youtube on android and iOS devices does not support this. User can't see that he/she liked or disliked a video. And, when I press "like" or "dislike" on iPad youtube app, the number of like on the youtube web does not change.
Unbelievable!
If I'm upload some items that should have a content rating, how can I set that via the API?
Here's some tidbits of the code:
Dim newVideo As Video = Nothing
newVideo = New Video()
newVideo.Title = title
That's a part of it, can we set the rating ourselves within the API or is that functionality not there yet?
Also, if a video is blocked or flagged worldwide, do YouTube provide that in the upload successfully response, if a video uploads okay, I can get the ID, but can I also check to see if there's any complaints? I will ignore the Duplicate response for now. But I am more worried about the flagged or block as you only get three strikes.
Setting content rating isn't supported via the API.
If a video is not playable for any reason, including the reasons you mention, it will have an explanation of the problem in yt:state:
https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_yt:state
I have uploaded 1 video to my YouTube channel. Everything works fine when I try to get the list of uploaded videos this way:
http://gdata.youtube.com/feeds/api/users/[*my user name*]/uploads
But when I try to sort it, I get a list of 2 deleted videos that I am assuming were uploaded during one of my earlier tests:
http://gdata.youtube.com/feeds/api/users/[*my user name*]/uploads?orderby=published
Any ideas what might be going on?
Including orderby= causes requests to go against the search index rather than the backend datastore:
https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds#User_Uploaded_Videos