YouTube API "q" Parameter Broken? - youtube

According to the YouTube API documentation, the "q" parameter searches through the metadata for the videos. This includes the title, description, and keywords.
However, just recently (since yesterday to my knowledge) the "q" parameter is only searching the titles.
Here is the feed for NBA:
http://gdata.youtube.com/feeds/api/users/nba/uploads
There is a video with the title "Top 5 Plays of the Night: April 16th" with the description "Check out the best plays from Tuesday`s action in the NBA".
If I search for "Tuesday" the video doesn't come up: http://gdata.youtube.com/feeds/api/users/nba/uploads?q=Tuesday
If I search for "Top" it does: http://gdata.youtube.com/feeds/api/users/nba/uploads?q=top
I believe Google monitors this forum. What has gone wrong? I really need to search all fields for my application. I've been using it for the past year or two and for it to suddenly just break is crippling! Please provide guidance.

That does indeed appear to be broken. I know that YouTube doesn't publicly expose tags (keywords) anymore and now refers to them as tags so I am guessing this Documentation is old. I would recommend that you switch to using this query from the V3 Data API to get your desired results.

Related

Using YouTube API, is it possible to filter search by upload date?

I'm working on a personal project to retrieve YouTube videos on a particular subject very quickly after they are posted. Using the "Sort By" filter works well, however, I've noticed that some videos that fit the search query do not appear in the HTML. So, I was wondering if it is possible to also sort by Upload date, similar to the YouTube feature which allows for filtering videos based on if they were posted in the last hour, today, this week, etc. I believe that if I could include a filter for videos posted in the last hour, that would improve the accuracy of my project.
Any help is very much appreciated.
Check out the "order" parameter in this API (can set it to "date").

YouTube API is not giving accurate video results

Getting video in the results even though it didn't match query parameter(q)
The parameter i passed didn't exists in body,title,tags, But the video is relavant. Is API looks any other metadata of video.
For Example: i have given parameter as "mobile", this video https://www.youtube.com/watch?v=j8UNo3vRIB0 is coming as result, here video title and description not contain mobile as parameter
Latest data not coming consistently in youtube api
Some times latest data not coming in youtube data api.
For Example: i have given rule as "amazon". This video https://www.youtube.com/watch?v=6zygd1iW-f4 is showing in youtube website's latest videos but not coming in youtube api result.
Example query: https://www.googleapis.com/youtube/v3/search?part=snippet&order=date&q=amazon&maxResults=50&type=video&key=xyz
W.r.t. point (1), Youtube is working OK, since the content of that video is related to the keyword mobile (please convince yourself by watching the first couple of minutes of that video).
For what concerns your point (2), I cannot in any way make the Youtube site to produce the video 6zygd1iW-f4 near the top of its search result set for the query term amazon.
All in all, I deem your claims above unsustainable.
Please note that one cannot expect crisp results from Youtube when queried with such general terms as yours is. One should not expect Youtube's searching feature to work similarly to say a full-text search in single computer-stored database. There will always be a degree of fuzziness associated to querying Youtube for broad terms.
You are actually stumbling on a very tricky scenario. Your goal is to get the same results via the API that you also see on YouTube’s website, right?
First, make sure that you configured the search endpoint as identical to your YouTube user account as possible:
order: relevance
relevanceLanguage: Same as the language that you set in the menu of YouTube’s website (Use a ISO 639-1 2-letter Code)
regionCode: Same as the country that you set in the menu of YouTube’s website (Use a ISO 3166-1 2-letter Code)
With these settings you will see that the results will be quite similar. But still not identical. Not because the API is not working or is still not properly configured but rather because YouTube’s search results change all the time. Just do the same exact search on YouTube’s website just 10 seconds apart. You’ll see that you get different search results.

Search for phrases inside youtube's closed captions

I've searched all over the internet, but could not find out what happened to the caption search feature. Some time ago to the search query '"Some rare quote", cc' youtube would include links "Start playing at search term (1:03)" which indicates that the search result was obtained from the closed caption content. Here is the blog post about it: http://googlevideo.blogspot.ru/2008/06/closed-captioning-search-options.html
What happened to that feature? Am i the only one who thinks this was super useful? Is there any way of doing that through youtube's API?
Checking the document - Implementation and Migration: Search requests, you can search videoCaption:
The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. If you specify a value for this parameter, you must also set the type parameter's value to video.
Acceptable values are:
any – Do not filter results based on caption availability.
closedCaption – Only include videos that have captions.
none – Only include videos that do not have captions.
Yes, there is a search functionality of that but it is not available in Youtube API. As you can see in this blog - Captions for all: more options for your viewing and reading pleasure, this show the search capability using Youtube UI. You may want to file a feature request for that.
Hope this helps.

Youtube Search Results as Playlist, Need Advise

Hi guys, this is my first time to post on this awesome community so
please bear with me.
I am working with a Wordpress Plugin that can display a Youtube Search Results into Video Playlist.
My settings are:
Keywords
Author
Content- channel/keyword
My first Approach was this:
with this api as reference,
search for the keyword > display the relevant results according to the author as playlist
*I'm in doubt if I this is possible, coding 30%
*I'm not sure where could I use my settings for Content
but then when my coding is in progress I recently bumped an article that says Youtube Search is differrent on Searching a Youtube Playlist
Now I can't continue my coding because I'm not sure If I'm doing it
right. Can you give me some advise with this situation or show me some
similar project/examples?
You don't have to write any YouTube Data API code for this; it's a built-in feature of the YouTube Player.
This blog post has an example of loading a list player that takes its content from the recent uploads of a channel. You can do something similar by setting listType=search&list=SEARCH_TERM, where SEARCH_TERM is whatever string you want to search for (be sure to URL escape it). You can read more in the documentation.

Youtube API search

I have been trying out the youtube API with Java. When I do a search using the API I don't get the same results as when I just type the keyword in the browser, any logical explanation why this is?
Compare: http://www.youtube.com/results?search_query=blah+&aq=f
http://pastebin.com/FVRd3URT (list of video Titles)
I also noticed that some videos (or at least their title) are duplicated.
YouTube API version 3 gets the same search results. Version 3 is still experimental, according to the documentation. https://developers.google.com/youtube/v3/docs/search/list
No, it's just how it is. Trying to match up the two is a futile exercise.
Amazon search has the same problem.
This demo might help.
https://github.com/bitsabhi/YouTubeDemo
A java project to return title, album, you tube link when the user searches for any songs. Uses You tube search API.
I have the same problem.
It is as if the API queries don't support full text search - results through the API are the same as if you enter "my search query" in quotes.
Although, try setting a slightly larger time frame: 'today' might be different from 'last_week', and you may get more relevant results.

Resources