Google search based on country - search-engine

I am using Google Chrome and Google search engine as default. My current location is India. When i search anything, it gives me result from India. That's great.
Now, I want to have searched result from another country e.g. UAE. Where should i make the change to get the result from UAE or any other country.

There's a good artile here:
http://www.entrepreneurs-journey.com/322/how-to-search-google-as-a-local-in-any-country/
You can change the query parameter 'gl' value to your desired country to get the result by that country. for example ...
This will show you the results from japan
https://www.google.com/search?q=kangaroo&gws_rd=ssl&gl=jp
and This will show you the results from us
https://www.google.com/search?q=kangaroo&gws_rd=ssl&gl=us
Hope it clears.

Related

Does the here.com autosuggest API allow for restricting results to only cities?

I'm playing around with the Here.com autosuggest feature, and I'm trying to find a way to limit the results of a query to only cities. I only want it to return potential city, state/prov, country matches, and not addresses or specific places.
The use case here is to allow the user to start typing in their current city and have autosuggest fill out the rest. So in this case, I also can't send the query with a bounding parameter like at or in, since I want the search to allow for matches world wide.
Is this possible with the current implementation of autosuggest? Or is there another way to accomplish this?
Thanks!
The API itself doesn't allow you to limit based on city but you can select responses where localityType=city in your application.

How can I get Only Health related Data from Google API?

I want to get only results that are related to health and for that I used below api.
https://maps.googleapis.com/maps/api/place/search/json?location=23.0225,72.5714&radius=500&types=hospital&sensor=false&key="API_KEY"
Above API gives me the results related to Health but I don't want to pass location lat long Parameter.
Actually I want to search it with "input" Param like below.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Ahmedabad&types=hospital&radius=500&key="API_KEY"
But above give me error like below
{
"predictions" : [],
"status" : "INVALID_REQUEST"
}
How can I get this type of results?
Thanks in Advance.
The places autocomplete request from your question has several issues.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Ahmedabad&types=hospital&radius=500&key=API_KEY
If you remove the location parameter, you should remove the radius parameter as well. It doesn't make sense without location.
hospital is not allowed value in types filter of autocomplete. If you check the documentation, you will see that the only possible values are:
geocode
address
establishment
(regions)
(cities)
Place autocomplete might return only 5 suggestions. I think you are looking for something different.
Also, be aware that radar search mentioned in the comments is now deprecated and will stop working in June 2018.
https://maps-apis.googleblog.com/2017/06/announcing-deprecation-of-place-add.html
I would suggest having a look at Places API text search. Your query with Places API text search might be
https://maps.googleapis.com/maps/api/place/textsearch/json?query=Ahmedabad&type=hospital&key=YOUR_API_KEY
The text search can return up to 60 results divided into pages of 20 results. For your particular example, I got the following output
Hope this helps!

Google Auto suggestion City mismatch when using in different regions

I integrated the GoogleMaps SDK to pick Location of place by AutoSuggestion, I am using GMSAutocompleteViewController to get city suggestions, with this location for city selected I want to search for hotels in our database.
But city is getting different name in different countries. For my App need to be internationally I need to get the same results everywhere across the world. ( using the GMSAutocompleteViewController)
Some cities in India are showing differently in other parts of the world.
Eg.Mangaluru to Mangalore(old)
I tried to put the App Language and Region and to English and UK respectively and also tried to apply some filter like below.
GMSAutocompleteViewController *acController = [[GMSAutocompleteViewController alloc] init];
acController.autocompleteFilter.country #"GB"
After applying filter only that country results coming.
Any suggestions to get same type results everywhere.?
I want to get the same city results getting for the same search everywhere.
You can remove the filter for the country to get results everywhere.
Based on the documentation Place Autocomplete:
**language** — The language code, indicating in which language the results should be returned, if possible. Searches are also biased to the selected language; results in the selected language may be given a higher ranking. See the list of supported languages and their codes. Note that we often update supported languages so this list may not be exhaustive. If language is not supplied, the Place Autocomplete service will attempt to use the native language of the domain from which the request is sent.
For the same city result, unfortunately, currently you can use components to filter by country.
Hope this helps!

YQL documentation for the google.news search and the "geo" key

Someone know some documentation of Yql Google News Search? I am trying understand the "geo" key values for the search.
This link show a example for the search.
Thanks and sorry for my bad english.
Cleber.
For details of the usage of the different keys on the YQL google.news table, see the source API's documentation.
In this case that can be found in the Google News Search API - JSON Developer's Guide, and the geo key is described as:
This optional argument tells the News Search system to scope search results to a particular location. With this argument present, the query argument (q) becomes optional. You must supply either a city, state, province, country, or zip code as in geo=Santa%20Barbara or geo=British%20Columbia or geo=Peru or geo=93108.
It goes on to say:
When using the geo property, please note the following:
Make sure the location you supply exists within the scope of your chosen news edition. For example, if you specify geo=Quebec for the Canadian edition of Google news, you probably won't get good results.
You can't combine geo with the topic property.
Some editions of News Search don't support the geo parameter. To test if geo works with a specific edition,
Go to that edition's landing page (for example, news.google.ca)
Click Add a Section.
In the Add a Local Section box on the right side of the page, enter a search query relevant to your desired location (for example, Quebec). You should now see a Local Results pane on the edition homepage.
If the Local Results pane is populated with results, you can use the geo parameter for that region.

fetch tweets through location

Can I fetch all the tweets from users of a particular location filtered by a particular keyword?
For example, I want to look up all the tweets made during a day in a particular location with a keyword "XYZ". Can this be done?
Yep, you can use the form on http://search.twitter.com/advanced to construct an advanced query.
Also check out http://dev.twitter.com/doc/get/search for more API info.
So, for example, finding tweets containing "very nice" from users located within 100 miles from Los Angeles would be written as:
near:"Los Angeles" within:100mi "very nice"
Your search URL would then look like:
http://search.twitter.com/search?q=near%3A%22Los+Angeles%22+within%3A100mi+%22very+nice%22
You can also get these results in JSON or ATOM format but you'll need to include the geocode parameter that the search page generates. Easiest way to find this is to copy the param from the "Feed for this query" link on the top-right of the page.
So, results in JSON format:
http://search.twitter.com/search.json?geocode=34.052187%2C-118.243425%2C25.0km&q=near%3A%22Los+Angeles%22+within%3A100mi+%22very+nice%22
Results in ATOM format:
http://search.twitter.com/search.atom?geocode=34.052187%2C-118.243425%2C25.0km&q=near%3A%22Los+Angeles%22+within%3A100mi+%22very+nice%22
Specifying a date range is also possible; use the advanced search form to help you construct what you need.

Resources