Does the YouTube API Geolocation Search Work? - youtube

The YouTube API documentation says that I should be able to search for videos by location, within a specified radius. This does not appear to work.
There is even an official forum post showing how this can be done.
Yet calling a simple example like
http://gdata.youtube.com/feeds/api/videos?v=2&alt=json&location=51.5032025,-0.1273598!&location-radius=10km
Returns 0 results.
There should be some videos that tourists have uploaded of London!
So, is it still possible to get a list of videos tagged with location metadata?

It's not currently working (tested on April 12, 2013). According to
GData issue 4234 "a change in the YouTube search index is preventing location-based searches from returning results"
The estimated fix is going to take longer than the mid-April 2013 time frame initially expected.
I eagerly anticipate the resolution. I'd suggest clicking the star on that issue page so you'll get updates when comments are added, etc.
Update: On April 16, 2013 the issue was updated stating "The current estimate is restoring this functionality in the second half of 2013." Also, their API documentation was updated to reflect the issue.

Geolocation search is deprecated temporarily and expected to be up again in near future.
This was due to another launch, documentation is about to be refreshed. It will also be back up soon.

This is now working. See the documentation for v3
# HTTP URL:
GET https://www.googleapis.com/youtube/v3/search/?type=video
&locationRadius=100m
&location=51.5032025%2C-0.1273598
&part=snippet
&key={YOUR_API_KEY}

Related

Google API (youtube search) always sorts results by relevance instead of date

I use Google API to get a JSON result of my own YouTube channel videos.
The URL has not changed, but suddenly, Google returns the JSON only with order=relevant instead of order by date.
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCqEcEGQ0sG89j7ZhOdgFOyg&maxResults=24&order=date&type=video&videoType=any&key=<key>
The first result returned will be a 2 year old video instead of yesterday's one.
This call did work 'till last week (week 11 2016)
From this thread, it seems it is a bug and that the YouTube team is aware of it. A Google employee responded 3 days ago with:
YouTube is aware the search/sorting functions aren't working as
expected – this is temporary and part of our efforts to better
respond, review and remove graphic, violative content from YouTube.
Thanks for your patience while we work through this. Will update this
thread when these features are working normally again, feel free to
subscribe for updates.
You can subscribe to the thread for faster updates.

Youtube Data API v3: Sort by date not working

The sorting is not working as expected since a few hours.
https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId=UC_x5XG1OV2P6uZZ5FSM9Ttw&key=YOUR_API_KEY
Can be tried in the API explorer (Execute without OAuth) as well.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&channelId=UC_x5XG1OV2P6uZZ5FSM9Ttw&order=date
date: Resources are sorted in reverse chronological order based on the date they were created.
https://developers.google.com/youtube/v3/docs/search/list
What is going wrong?
In case you are looking to get the latest videos of a channel:
Get the channels upload playlist from Channels
Get the latest videos in the channels upload playlist from PlaylistItems
Alternatively, you can use the channels RSS feed:
https://www.youtube.com/feeds/videos.xml?channel_id={ChannelId}
https://www.youtube.com/feeds/videos.xml?user={User}
This does not replace the full search sorted by date function however.
Thanks YouTube for making me work on a Sunday, all I wanted was to watch the latest videos from my favorite channels. At least I don't have to wait for a fix anymore, good luck to those less lucky!
Reports in Google's forum were commented by a Google employee:
https://support.google.com/youtube/thread/2494861?msgid=2520468
YouTube is aware the search/sorting functions aren't working as expected – this is temporary and part of our efforts to better respond, review and remove graphic, violative content from YouTube. Thanks for your patience while we work through this. Will update this thread when these features are working normally again, feel free to subscribe for updates.
Bug reports for this include:
https://issuetracker.google.com/issues/128673031
https://issuetracker.google.com/issues/128673552
Both have an official comment from Google:
Thank you all for bringing this up here. These specific filters have been currently disabled on both YouTube.com and through the APIs. We should have updates on this soon. Thanks again.
Not sure how credible that is:
Just confirming that this is only temporary, and related to YouTube's efforts to better respond, review and remove graphic, violative content from YouTube. Thanks for your patience while we work through this.
https://www.reddit.com/r/youtube/comments/b1plj5/sort_by_upload_date_not_working/eiojtjh/

YouTube Data API no longer returns deleted videos in playlists?

I am trying to get list of all my liked videos on YouTube (including deleted) using playlistItems.list method.
Last month (Sep. 2018) I've tried it, response from the server contained exact amount of items, including every video with '[Deleted video]' title.
Currently (Oct. 2018), response looks like this: chrome console screenshot (note the '48': means two deleted videos is missing in the array).
I've checked out revision history, but there is no mention about recent changes related to this problem.
So my questions is:
Does playlistItems.list method no longer return deleted videos in playlists?
If yes, does anyone have a link to changelog or any ideas on how to get deleted video id now?
Or it's just me messed up something and everything works the old way?
EDIT: Found related issue on google issue tracker.
But it's dated Jun. 14, 2018 which is strange, since for me everything worked back in June.
I do remember testing this before June 18' and the total was never reflecting the actual results, I see others acknowledge this as well refer to this

youtube api .getPlaylistIndex() no longer seems to work?

I have a web app that was built up using the youtube api v3 and for some reason now .getPlaylistIndex() is always returning -1 this just recently happened and caused a major break in the functionality of the site.
There was no changes in the code base to production over the last week and was working last week, but yesterday (or possibly Monday) it broke. There had to be some change within the API that caused these issues. But I was unable to see anything related to this issue posted anywhere...
If anyone has seen this issue and have some kind of link or reference to what was changed, if it is going to be fixed or if that function was deprecated? The only thing I can do at this point is rework all of my code to get around using this function anymore.
Any insight would be greatly appreciated, thanks.
This ended up an error in implementation that was in our code, but also because of a change in how things worked through the youtube api. The original coder had set up the youtube player to load the playlist, but then they loaded the start video again
channelPlayer.loadPlaylist(currentPlayListArray, selectedVidIdx);
//channelPlayer.loadVideoById(selectedVid); <<<< This was breaking functionality
channelPlayer.playVideo();
channelPlayer.setLoop(true);
channelPlayer.unMute();
This had been working (with the commented out line). Up until last weekend the playlist was not overwritten in the player by the loading of a single video. It seems the functionality has changed where it no longer loads the video ontop of a playlist that was previously loaded. Now it overwrites the playlist of the player instead of concatenating?
Again this was an internal error, but the random change in functionality in the api caused this to actually cause the issue we ran into.

twitter api 1.1 url count alternative

I've been using the old url api(v1) to get the count of a given url, lately I needed to get also the re-tweets and started searching about that.
this is the exact url I'm using right now:
http://urls.api.twitter.com/1/urls/count.json?url=http://google.com
As I viewed with some reading the v1 api is deprecated but at least it's still working.
I found some questions on the dev page of twitter:
https://dev.twitter.com/discussions/12643
those are a little old questions and have no specific solving to the problem. I mean, the most near solution was using the search api(search/tweets) which could be good but not a exactly replacement for the urls/count method.
Please note that Twitter's search service and, by extension, the
Search API is not meant to be an exhaustive source of Tweets. Not all
Tweets will be indexed or made available via the search interface.
also it has a limit for 100 results at maximum per 'page', even it throws the link to get the next set of objects, thats good but when the search reaches 1 million of results I'll need to get page over page to now how much tweets I got and having to do to much request to the api...
I sought some question over the dev page on twitter suggested using the stream api, I've tried using (statuses/filter) but that don't work very well given a URL as track param(which they said that is the keyword to track).
So, anyone who's been using the old urls/count has found a reliable alternative with the new apiv1.1, especiffically to get the tweets and re-tweets for a given url ?
The official suggestion by Twitter staff is that either the search/tweets endpoint (having just the last 7 days data) or the Streaming API be used (handling yourself the counters, making everything just too complicated for a d*mn counter).
As an extra warning, the old endpoint (http://urls.api.twitter.com/1/urls/count.json?url=YOUR_URL) will stop working on November 20th, and according to this blog post from Twitter there are no plans to replace it with anything in the short term and they are even removing the count from their own buttons.

Resources