as in one answer here:
Youtube Data API v3 PlaylistItems update not working for Watch Later playlists
There was a change that I can't use playlistitems.list from YT API v3 to retrive Watch Later and Watch History playlists from my channel:
https://developers.google.com/youtube/v3/revision_history#september-15-2016
TLDR:
"Requests to retrieve playlist details (playlists.list) for a channel's watch history or watch later playlist will return an empty list after September 12, 2016. Requests to retrieve playlist items (playlistItems.list) in either of those playlists will also return an empty list after that time. This is true for the new values, HL and WL, as well as for any watch history or watch later playlist IDs that your API Client may have already stored."
Is there any other way to programmatically get my Watch Later playlist other than manual scraping?
(By manual scraping I mean traversing http to login, getting into my playlist and manually parsing DOM to get links and snippets of videos in the list.)
Thanks
(Copied from here: https://stackoverflow.com/a/47117301/147507)
If I was in your position, I'd just work my requirement around it, avoiding this. You can go back to v2 or do some other stuff like scraping the website, but if the YouTube API is explicitly preventing these to be available to third parties, it might seem you could get into legal trouble.
Note that the v2 API provided separate feeds for a channel's favorite
videos, watch history, and watch later playlist. The v3 API uses
playlists and playlist items to represent all of these concepts.
From: https://developers.google.com/youtube/v3/guides/implementation/playlists
You also use the channels.list method to get the playlist IDs for a
channel's watch history playlist, watch later playlist, uploaded
videos and liked videos. Liked videos are videos that the channel
owner rated positively
Related
Google YouTube API allows maximum 10,000 units of quota per day. I am trying to avoid 'Quota Exceeded' error as I am making too many calls against the "Search: list" API which costs 100 units of quota per API call.
I read this and several other blogs; and went with my own below analysis.
I am planning to pull data every day once and store it in the database. Can any expert please confirm if below will cover up all the videos under the channel, or I will miss some?
(1) Playlists: list --> Get all the playlists from the channel.
(2) PlaylistItems: list --> Iterate over each playlist one by one, and get all videos in it.
To answer your comment #Test:
I want to ask whether if i loop all playlists, will it give ma all the videos under channel id or not.
If by all playlists you mean all playlists intentionally created by the given YouTube channel then it depends whether or not he selected all his videos.
I would recommend you to use this approach to retrieve all YouTube videos of a given YouTube channel which seems to be your case. The approach 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. Using this method you will retrieve all public YouTube videos as long as the studied YouTube channel has less than 20 000 YouTube public videos. In this last case use this script which softwarly fake an automatic browse in the Videos tab of the given YouTube channel.
When trying to get the track details for a playlist using the /playlists endpoint, for certain playlists there are no tracks returned in the data.
Sample of returned data
"license":"all-rights-reserved",
"tracks":[],
"playlist_type":null,
"id":199987807,
So far all the playlists behaving this way contain a single track, but NOT all playlists with one track return no tracks.
Examples of no tracks returned:
http://api.soundcloud.com/playlists/199987807?client_id=YOUR_CLIENT_ID
http://api.soundcloud.com/playlists/199987052?client_id=YOUR_CLIENT_ID
SoundCloud API keys have different access levels. SoundCloud can restrict API access for certain artists and playlists based on the API key used to make the request.
As you can see, a standard developer API key cannot see the tracks from those playlists.
There is a way around this, although it breaks SoundCloud's terms of service.
Using a different API key, such as the key youtube-dl uses to get the MP3 link for specific tracks (which is presumably a Soundcloud master key), gives you access to this information.
Again, using someone else's API key violates SoundCloud's terms of service, and there is no guarantee this key will continue working. This is just a workaround to the current restriction you're seeing.
Related discussion in two other questions: Get HTTP MP3 stream from every song and SoundCloud API returning 0 tracks despite user having tracks.
The SoundCloud API allows you to search. Coordinates (lat/lng) seem to be stored as tags in the tag_list property for tracks. It seems I can filter on matching tags.
Can I use the SoundCloud API to find matching tracks with a geospatial bounding box or a centre with a radius?
Or can I only match coordinates exactly?
If the former, how?
The SoundCloud blog posts talking about mapping audio links to maps that don't open. For example:
http://maps.soundcloudlabs.com/?lat=32.47269502206151&lon=13.359375&maxOffset=50&zoom=3
Furthermore, I'm unable to add geotags to my files on SoundCloud. Adding them as tags and saving the file fails silently: Upon reopening the file for editing, the geotags do not show up.
Third, SoundCloud API calls for tracks do not seem to include geotags.
Fourth, searching for a geotag using the SoundCloud API consistently returns no results.
Therefore, it is safe to assume that SoundCloud no longer supports geocoding on their audio files.
I want to know which playlists contain a certain video. The opposite is easy: find which video's are in a playlist, but I don't want that.
I can already have YT do this via the following route, but that's stupid and slow:
get channelId from video data (videos?id=...)
get playlists from channelId (playlists?channelId=...)
loop through all playlists and find all their videos (playlistItems?playlistId=...)
Like I said: stupid and slow. These steps are possible, because I only want playlists authored by the video's author. (Otherwise I'd have to download all of YT.)
What I'm looking for, sort of, is a request: playlists?videoId=..., but of course that doesn't exist.
Is there a better way than my 3 steps?
PS. I've created the script to use my 3 steps, but it's A LOT of requests. That and the playlists don't seem to have usable playlist ID's... I need the ID that the browser uses to show the playlist GUI style.
As of now, the Youtube API does not support a call like this, and in my opinion never will. This is probably an intentional decision by Youtube to hide the playlists, even the YT Analytics API doesn't show how many lists use your video.
It seems the way you do it is the only workaround - in case you only need the playlists for one specific user.
How can I efficiently retrieve a list of channels that a Vimeo video is listed in from the Advanced Vimeo API?
The Advanced Vimeo API provides the methods channels.addVideo and channels.removeVideo for managing the channels a video belongs to. Also, the channels.getVideos method is provided for retrieving the list of videos belonging to a channel.
However, there is no videos.getChannels method. This means that in order to find all the channels a video is included in one would need to call channels.getVideos (possibly more than once if the channel has more than 50 videos) for each channel of interest. This seems terribly inefficient.
From what I have seen so far it has not been implemented into v1, but will be added into v2. I am still looking to see if there is an alternative
edit*
take a look at this page because they have this method vimeo.channels.getAll
VIMEO
I know this will get you a list of channels, from there I dont know if you can compare that to the video to make a list of channels that the video is in. I'm still looking.