Google geocoding API (City => long, lat) - geolocation

Does Google offer a RESTful API where I can pass it a city name (or zip) and it returns the longitude & latitude.
I know how to do this with using the Google Maps API, but I really don't want to have my users download the huge 200k Google Maps API solely so that I can geocode a location.
Does anyone know of a URL based (REST) city/zip to longitude & latitude API?
Since geocoding this information then kicks off multiple other processes, doing this first step is of critical importance to have it perform quickly b/c its a bottleneck right now using the Google Maps API b/c of the huge download and JavaScript loadup.

Yahoo PlaceFinder is a new service offered by Yahoo! that provides services for converting addresses (including city names) into latitude / longitude pairs. The service is also capable of doing the opposite (converting coordinates into an address).
Unlike Google's Geocoding API the TOS for Yahoo PlaceFinder do not forbid using the data outside of their maps API.

You could use geonames.org web sevices (or download the server)
http://www.geonames.org/export/reverse-geocoding.html

Also keep in mind that you will likely run over your quotas for the day if you have heavy traffic using the direct HTTP call method. Google limits usage based on IP address, so using the client side code will greatly increase the number of geocode lookups you can do per day since they'll be associated with user's computers rather than your server(s).

$.get("http://ipinfo.io", function(response) {
console.log(response.city, response.country);
}, "jsonp");
Here's a more detailed JSFiddle example that also prints out the full response information, so you can see all of the available details: http://jsfiddle.net/zK5FN/2/

Related

Yahoo Weather API Key Usage?

I am planning to develop an iOS weather application that is non-commercial which retrieves JSON feed from Yahoo's Weather API.
Documentation: https://developer.yahoo.com/weather/
However, I don't understand the purpose of needing an API-Key? I am successful in retrieving weather data by calling this URL with parameters and it gives back a JSON data. (Note: The URL below is from the JS example but same concept as if it were Objective-C)
https://query.yahooapis.com/v1/public/yql?q=select wind from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il')&format=json&callback=callbackFunction
The documentation says non-commercial use is restricted to 2000 queries per day, but how is this tracked if no unique keys were ever used? What is the correct "legal" way in using this API?
I found this old question being asked, however the answer wasn't sufficient: Does Yahoo Weather API needs an Consumer API Key?
Any input would be appreciated!
Side Note
- Any other FREE weather api tool that do not limit queries and are for non-commercial publication use recommend will also be accepted as an answer
Upon further research, Yahoo offers both a public and OAuth APIs for developers. The public API that is related by querying the URL given above limits users to 2,000 queries per hour per IP Address.
https://developer.yahoo.com/yql/guide/usage_info_limits.html

Working with Geolocation and Google Maps API [HELP]

I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic:
I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests.
How can I know what users are closest to me without running it through the maps API?
Thanks a lot!
Rafael, Google limits the number of requests you can do because it's against their TOS to do batch geocoding without paying for a (rather pricey) business license. You'll need to find a service that allows you to geocode addresses en masse.
I would recommend one like LiveAddress API which will not only geocode the addresses but also confirm the validity and fill out missing or incorrect information. Each request to the API may include up to 100 addresses. There's a non-API version if you just want to verify an existing list of addresses in a spreadsheet or CSV file.
I do work at SmartyStreets and would be happy to help you with any other questions about your addresses.

What's the quota for Document List API requests?

We're currently integrating Google Drive/Docs access in our mobile Apps and use the Google Document List API for this purpose. Are there any restrictions on the number of requests allowed for single API key?
I can't find any information in the Google API Console as the Document List API is not listed there. I can only activate the Google Drive API (which does not yet support functionalities we need).
The Documents List API does not use API keys in the same way as the newer APIs such as Drive. We (Google) do not give exact quota details for this API, but in general the value is extremely high. You may encounter 503 responses which indicate that you should perform exponential backoff. If, despite this, you are hitting an absolute ceiling, you should contact us and we will investigate, and look to increase your quota.

google geocoding limit

there is a limit of 2400 geocoding request for google service. even if each request is cached and not duplicated its possible to exceed this limit if the request is being made from a rails app.
short of purchasing the premium package(which i dont know the cost of), what else can one do?
thanks
I believe that if you geocode on the client side that you won't have any issues with geocoding limits. Calls to google.maps.Geocoder() and the google.loader.ClientLocation() both count against the IP of the client machine rather than your server IP. If you need to some on the server side I would second Geoff's suggestion to use Geokit's multigeocoder.
I do all of my geocoding from the application servers using geokit. That allows me a backup of yahoo maps using their multigeocoder. That way - if one fails, the other succeeds. Geokit also provides an identical interface to the two services, so you only need to code to the one abstraction layer. The google limit is per server per day, so if you have multiple app servers you can spread out the load to increase your limit. Yahoo's limits are 5000/server/day.
Hope this helps, good luck!
This is what I did:
1. Try to use the Navigator's Location functionality.
2. If that fails, use Google Gears (I dont think it consumes google limit)
3. If that fails use Google Maps API
4. If that fails (limit exceeded), geolocate based on user IP and maxmind database (free)
The source here may be of some help: gvkalra.appspot.com/reachme
You can use google fusion tables to geocode your data. Limits are pretty high there.

Get google and yandex search results

I want to parse google and yandex search results for my little website analyzer utility.
so i should send hundreds requests per minute. What is good practice for this issue?
Is google search api a good way?
The Google Search API may not be used for bots. Google will block your utility if you request too much searches.
http://code.google.com/apis/ajaxsearch/terms.html
You agree that when using the Service, You will not, and will not permit users or other third parties to:
Use any robot, spider, site search/retrieval application, or other device to retrieve or index any portion of Google Search Results or to collect information about users for any unauthorized purpose;

Resources