YT search API to search for Arabic speaking channels locally in Israel - youtube-api

How can I retrieve all Arabic speaking channels locally in Israel.
Using the API explorer, I don't see such an option.
Which fields are mandatory for search to call the search API?
Is there any way to fulfill this task?
Update:
API Explorer
I couldn't get results

There are lots of parameters in the API v3 Docs for Search that you can play around with, some in particular you might find helpful are:
location
locationRadius
regionCode
relevanceLanguage
and you'll need to set type = "channel" to return only channels.
The only mandatory parameter is part which is what data you want returned from your results. For this search call, you only have one option for part, which is "snippet".
This is the only way to do it simply within your multiple parameters, and it will take 100 quota per search, assuming you have an API key already.
If you press 'Try This API' on the right, it'll even give you code snippets you can copy in a variety of languages, since you didn't specify one in the prompt.
Depending on the language, a call could look like the following:
GET https://youtube.googleapis.com/youtube/v3/search?part=snippet&location=Israel&regionCode=IL&relevanceLanguage=ar&type=channel&key=[YOUR_API_KEY] HTTP/1.1

Related

Does twitter stream API allow filtering by urls?

I am trying to do a filter by urls but no result is being returned.
From the following doc, it shows it is possible https://developer.twitter.com/en/docs/tweets/rules-and-filtering/overview/premium-operators
but I think it's a premium feature. Is this true? If yes then is there any other way to filter by urls without using the premium feature?
Standard Twitter streaming API provide us with 'track' parameter. This is a Standard streaming API parameter (see the doc). It matches Tweets as by phrases as by URLs. A common use case according to the doc:
a common use case where you may want to track all mentions of a particular domain name (i.e., regardless of subdomain or path), you should use “example com” as the track parameter for “example.com”
This parameter value Will match...:
example.comwww.example.com foo.example.com foo.example.com/bar I hope my startup isn’t merely another example of a dot com boom!
I tested the option by means of twitter-hbc library for Java. It works as expected!
To avoid confusion, please, take the note:
The text of the Tweet and some entity fields are considered for matches. Specifically, the text attribute of the Tweet, expanded_url and display_url for links and media, text for hashtags, and screen_name for user mentions are checked for matches.

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.

How do you build a Ruby on Rails API project WITHOUT an API key?

I have some experience building ROR projects with APIs for Google Maps, Weather Underground, etc. All of these sites had a login section with an API key. I now have a project to complete that requires an API for Github Jobs API. I have looked and looked and there is no API key provided on that page or on the regular Github API page. I have searched online at length and watched about 3 tutorials, yet I am at a loss about how to accomplish this without an API key. I would really appreciate some guidance. Thanks so much!!
Github Jobs API it's open and doesn't need API key to use, you only need to make GET requests as described here
URL: https://jobs.github.com
REQUEST: GET /positions.json
You can send a lot of parameters as query params:
description — A search term, such as "ruby" or "java". This parameter is aliased to search.
location — A city name, zip code, or other location search term.
lat — A specific latitude. If used, you must also send long and must not send location.
long — A specific longitude. If used, you must also send lat and must not send location.
full_time — If you want to limit results to full time positions set this parameter to 'true'.
Some examples of requests:
https://jobs.github.com/positions.json?description=python&location=sf&full_time=true
https://jobs.github.com/positions.json?search=ruby
https://jobs.github.com/positions.json?lat=37.3229978&long=-122.0321823
https://jobs.github.com/positions.json?location=sp&full_time=true
For use pagination just add page= at the final of query params:
https://jobs.github.com/positions.json?description=ruby&page=1
You can check all the documentation of API here

SurveyMonkey API v3 GET Responses fields

In my app I used the get_respondent_list API in API v2 to get an overview of the responses and to allow me to select those responses which were relevant to download in greater detail - fields of interest to me included date_modified, status .
I had hoped that /surveys/{ID}/responses would give a similar facility but all it returns for each response is href and id. The parameters of the call enable me to filter the list in various ways but I would need to make several calls to identify the different categories that I am interested in.
When I made a similar point about the survey list it turned out there was an incorrectly documented include parameter which I could use to get additional fields in the response. I tried that for /surveys/{id}/responses but that was rejected. Could such a facility be added?
If not I guess I will go for /surveys/{id}/responses/bulk and do all the work in the app.
The bulk endpoint is the correct choice. It is basically a call to /surveys/{ID}/responses with 'include' covering every field. The only downside is is the smaller maximum page size. Not sure sure what additional work you are referring to, since you would need to handle pagination at /surveys/{ID}/responses for more than 1000 responses, and all the fields you are looking for are available at the top level of the returned response dictionary.
This wrapper for the API (not written by me) makes it fairly easy to get all the responses from a survey paired with the relevant question details.
In order to get the data structured in a way that resembles the output from the manual export, a bit of gymnastics is needed (I can recommend Pandas' .pivot_table(). Which columns that contain the actual answers vary depending on questions type, adding further complications depending on the complexity of the survey.

Is there a URL is can use to search for an image and returns the first found image?

I want to use a URL to search for a car by its name & model and have the first image hit returned. Is there a way to achieve this? I've looked at Google & YAHOO, but they return more than I wish for.
All I need is my request to be redirected to the URL of the first found image....
One way to obtain a relevant imagine (not equal to the top hit on Google), is:
http://( Type any keyword here ).jpg.to
For example:
http://dog.jpg.to
http://biting_dog.jpg.to
http://mercedes_benz.jpg.to
I know you mentioned Yahoo didn't work, however we are utilizing a Yahoo API in a very similar context successfully. Check out the BOSS image search API. One of the reasons we originally went with BOSS was that it does not have any daily limits. The image search API also lets you filter, indicate size, and more. The results are returned in XML.
With all that being said, if we had to do it over, we would go the Bing API route, as Bing has a brighter future than Yahoo and has very similar, if not better, API. It looks like it can return results in XML, JSON, and SOAP.
EDIT:
After seeing you were JUST looking for a URL, I tried all the three major search engines and the following URL was the closest I could come to what you decribed: http://www.bing.com/images/search?q=car&view=detail&first=1
I'm afraid the only way to get exactly what you are looking for 100% client side would to be to utilize the Bing API with a jsonp result and then manipulate the DOM via Javascript. Check out this code sample for a rough start.
Bing has a pretty easy to use web search API. You can pass it a URL with various parameters and it will return an XML result. The two parameters you would be interested in would be SourceType (=Image) and ImageRequest.Count (=1).
However, you would need to parse the XML because it won't just give you back the image data.

Resources