I am using following rss feed to get videos from youtube. works fine.
http://gdata.youtube.com/feeds/api/users/zeetv/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile;
now i like to apply certain filter... for example: listing videos which has "Episode" in title.
http://gdata.youtube.com/feeds/api/users/zeetv/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&q=Episode;
But it doesnot filter out the videos,which matches "episode", instead it list all.
i had checked this link https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters
and applied query string.
anyhelp is much appreciated. Thanks
It seems like you can't query a users videos, like that.
You have to build your query like this: http://gdata.youtube.com/feeds/api/users/zeetv/uploads?q=Episode&fields=entry(title)
you can read more about the fields syntax here: https://developers.google.com/youtube/2.0/developers_guide_protocol_partial#Fields_Formatting_Rules
The link provided in the question now has the answer. You should perform a search for the term you want and filter by author:
https://gdata.youtube.com/feeds/api/videos?q=episode&author=zeetv
Related
I currently use something like https://www.googleapis.com/youtube/v3/search?part=id&order=date&channelId=CHANNELID&maxResults=1&type=video&key=KEY and I want to be able to retrieve only the latest video and to totally exclude shorts.
How can I achieve this? 🤔
The Youtube search method
Will allow you to search for things like keyword, location, events, your own videos and related videos.
There is no way to filter or limit videos returned. Your only hope would be to sort them out locally when you get the results.
You may want to add a feature request here there is this one but it's really old Search API: More flexible/logical videoDuration requests
(sorry its my 1st time answering at stackoverflow, so might not be descriptive)
if you you use youtube serch method
then you'll realise that shorts description are assigned as empty string "" where as the videos have some description . so with an if condition like below can slove your problem (js)
if(!(video.snippet.description == ""))
I want to search for keyword related youtube videos, I'm using youtube getdata API.
Reading documentation I came up with this:
http://gdata.youtube.com/feeds/api/videos/-/". urlencode($kwd) ."?orderby=viewCount&max-results=". $max ."&alt=json
But this is not a real search, it gives urls taged with keyword... Youtubes internal search works quite differently I imagine, because comparing results don't match at all.
Any ideas?
The URL you offer does a search for any videos in a category where the category includes your keyword. What you want to do instead is to send a query string:
"https://gdata.youtube.com/feeds/api/videos?q=". urlencode($kwd) ."&orderby=viewCount&max-results=". $max ."&alt=json"
This way the feed will match right on the videos rather than the categories.
In the newer v3 of the API, your call would look like:
"https://www.googleapis.com/youtube/v3/search?part=snippet&q=".urlencode($kwd)."&maxResults=".$max."&order=viewCount&key={YOUR_API_KEY}"
Use Data API v3, search->list method.
GET https://www.googleapis.com/youtube/v3/search?part=snippet&q=term&key={YOUR_API_KEY}
In my opinion, I would use the "q" parameter, for example to search for "dog"
var request = gapi.client.youtube.search.list({
part: 'snippet',
q: "dog"
});
But I'm just a noob the others guys answers are probably better.
I want to do something like this:
https://itunes.apple.com/lookup?collectionid=211192863&entity=song
But it doesn't return the songs
I'm pretty sure they have such parameter since it is a pretty basic one
any tips are appreciated
Edit:
it seems I can pass ID also, but I don't know if I can trust it once I usd id input for artist search as well
You are very close - the proper API request should be:
https://itunes.apple.com/lookup?id=211192863&entity=song
Note, the first result returned is the Collection meta data, each of the following 12 results are the track meta data.
Your url is wrong, for search API url you should see below:
https://itunes.apple.com/search?id=211192863&entity=song&media=music
enjoy!!!
i'm trying to use 'Twitter Search Widget' here searching an #hashtag in a 'Twitter List', but i can't fix the exact query. Someone did it before me?
Thanks in advance, sorry for my poor english.
Francesco
There doesn't seem to be a way to directly search twitter lists using the widget. If you look at the "operators" link on this page:
https://twitter.com/#!/search-home
You can use "from:userid OR from:userid2 #hashtag" to search for #hashtag tweets from specific users, and hashtags work fine - so you could manually build a search for a list if you wanted.
You can see what operators search can take by looking at the advanced search page here:
https://twitter.com/#!/search-advanced
If i understand correctly, you're trying to search for tweets containing a specific #hashtag, authored uniquely by certain list members?
If this is the case, say for example your looking for the hashtag #COVID19 relayed only by #Twitter's list of official Twitter accounts, you could do it with the following Twitter search query:
#COVID19 list:84839422
Try it...
The structure is quite simple...
[#hashtag] list:[list_id]
You can find list IDs by looking at the URL line in the browser when opening lits on Twitter. For example, here is the URL of #Twitter's official accounts liss:
https://twitter.com/i/lists/84839422
The list ID are the digits after the last /.
How would I go about displaying tweets that contain a certain hashtag using the Twitter API? Thanks
I'd also like to know if there is a way to get all tweets from a certain hashtag in a separate file, also the ones that don't show up in your feed anymore. I suppose that's what the earlier question was about, too.
This answer was written in 2010. The API it uses has since been retired. It is kept for historical interest only.
Search for it.
Make sure include_entities is set to true to get hashtag results. See Tweet Entities
Returns 5 mixed results with Twitter.com user IDs plus entities for the term "blue angels":
GET http://search.twitter.com/search.json?q=blue%20angels&rpp=5&include_entities=true&with_twitter_user_id=true&result_type=mixed
UPDATE for v1.1:
Rather than giving q="search_string" give it q="hashtag" in URL encoded form to return results with HASHTAG ONLY. So your query would become:
GET https://api.twitter.com/1.1/search/tweets.json?q=%23freebandnames
%23 is URL encoded form of #. Try the link out in your browser and it should work.
You can optimize the query by adding since_id and max_id parameters detailed here. Hope this helps !
Note: Search API is now a OAUTH authenticated call, so please include your access_tokens to the above call
Updated
Twitter Search doc link:
https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html
The answer here worked better for me as it isolates the search on the hashtag, not just returning results that contain the search string. In the answer above you would still need to parse the JSON response to see if the entities.hashtags array is not empty.