Google Geo coding service for getting only geocodes - google-maps

We have a pharmacy search application. We are trying to get the the input address from
user and find pharmacies around that address in a user specified raduis.
We are planning to geo code the address entered by user from a third party service.
After getting the geocodes we will search for pharmacies in our DB around that address and
display the results. With each result there will be a link which will open a new tab/window of maps.google.com displaying the location.
If we use the google geocoding API service to get geocodes will they charge for it ? I am not showing the map on my UI. Is that ok or violating the google terms ? Is the 2500 requests/day applicable for this scenario as well ? I am seeing that MapQuest is a service which will return only geocodes.
Thanks,
Avinash.

Double check with Google's Terms of Service, but generally they begin denying your API requests after you reach your limit. If you are a repeat offender, they may permanently prevent your IP from using their API. The limit is on the calls that you make to the Geocoding API and is unrelated to whether you display a map using their maps api. The following includes strategies for how to work within these limits: https://developers.google.com/maps/articles/geocodestrat

MapQuest just released their Open Geocoding Web Service, which is built using data provided by the OpenStreetMap community, and (currently) does not have a limit on the number of geocoding requests that can be made.

Related

Understanding Requests from Google Places API for Web w Place Autocomplete

We are considering using Google Places API for a new web application project and I believe we are vastly underestimating the number of requests we would use.
We would be using place search, Maps JavaScript API map load to grab Place IDs from Google as well as Place Autocomplete to help users find the defined location. So my questions are:
Would the Autocomplete be considered a request on every keystroke?
Would if also be a request when we select the suggestion (Places API)
and update to Map?
I have seen that with the premium Plan autocompletes use 0.1 Maps API Credit, while JavaScript API map load is 1 and Places API is 2 credits. Trying to understand how to count before the 150k limit and after
As mentioned in the comment of your question, Google is making some drastic changes to their collective maps API usage rates. Starting June 11th, the new pricing will go into effect.
Would the Autocomplete be considered a request on every keystroke?
As of now, places autocomplete is counted on every keystroke. Starting June 11th, you have the option to switch to session-based billing. They have different pricing rates which can be see in the pricing sheet link. Depending on your application, you'll want to use the option that minimizes API calls. I think if your use case is one time selecting of location by your users then you're better off with billing by keystroke.
Would if also be a request when we select the suggestion (Places API)
and update to Map?
Selecting a suggestion from Places API would not incur an API request (requesting the suggestions does), but updating a google map using the Map API would use an API request.
The 150k daily limit is going away in favor of the new billing rates, so I would suggest you look into that now. There are some free unlimited services still offered, like the Google Maps Embed API. Loading a map using the Embed API is not counted towards any billing (as of now).

What if I have no results to display on a map after calling Google Distance Matrix API

I would like to develop a service, using Google Distance Matrix API, where a user can enter their current location and a map will be displayed showing how many other users from their group have addresses in the same general area. For privacy reasons, I do not want to show any other details (location, name, address etc.) of those other users just the number of people.
In order to ascertain this information I was intending to make a call to the API and displaying under the map of their area a message like "There are 5 other people within a 3 minute drive of your address".
Can anybody tell me whether this meets the API limitation:
The Google Maps Distance Matrix API may only be used in conjunction with displaying results on a Google map. It is prohibited to use Google Maps Distance Matrix API data without displaying a Google map
If my requirements of the API are not acceptable, could anybody suggest another publicly available API that I could use in its place?
Thanks!
Yournavigation Api gives you distance from given points.
Try this request example.
You can find their usage policy here.
They said that there are no limitations on usage, except those regarding overload:
The routing API is open and freely available for everyone under the condition that you don't overload the server. Overloading the server in this context means: more then 1 request per second for sustained periods of time. Bursting multiple requests for short time-periods is not a problem though

Is GTFS-realtime data in Google Maps Directions API

I would like to know:
Is GTFS-realtime data available from the Google Maps Directions API?
If not, are there plans to include GTFS-realtime data in the Google Maps Directions API?
I am a member of a team developing a web application that integrates Google Maps Directions API. The website provides a "Trip Planner" form in which the user enters From, To, Date, and time data to display trip options into the website. Our website visitors are specifically interested in Bus transit options.
The integration is working wonderfully. However, the data returned by the Google API does not contain GTFS-realtime data. We know that the realtime is known to Google through GTFS feeds provided by the transit provider, and we see the realtime data when doing an identical search via https://www.google.com/maps.
I looked at the "Transit Specific Information" that is returned in the Google Maps API DirectionsResult Object (https://developers.google.com/maps/documentation/javascript/directions#TransitInformation). There is no reference to real-time information in this documentation. Even if real-time information is supplied (and I suspect that it is not), there would be no way to distinguish between scheduled and predicted times.

Reached Limit using Google Geocoding Web Service

We have a page that accepts a city, state combination or a zip code. Upon submit, it passes that information to the Geocode Webservice for Google Maps and returns a list of store location results based on the information passed. We sporadically have issues with bots hitting that page multiple times and then Google shuts down our usage of the geocode webservice for the day. Is there a way to ask Google to restore this more quickly? How should we handle this?
Use the client-side geocoder, the limits there will be based on the client not the server.
Geocoding Strategies
As specified on in the documentation, "Use of the Google Geocoding API is subject to a query limit of 2,500 requests per day (User of Google Maps API for Business may perform up to 100,000 requests per day.)"
There's a nice article on Geocoding Strategies which discusses caching and other options to optimize geocoding. The "Quota Considerations" section should be useful.
Remember to use client-side geocoding if at all possible, so that the quota limit will be counted per client, instead of per service/server. If you're still hitting the limits, you might need to go for the Business version and pay for a larger limit.

How does Google Geocoding API usage limits apply to [Sales]force.com?

The following are the usage limits as specified by Google on their Developer Guide pages:
Google Maps JavaScript API v3 => For-profit web sites are permitted to generate up to 25,000 map loads per day
Google Geocoding API => subject to a query limit of 2,500 geolocation requests per day
Google Maps API for Business => may perform up to 100,000 requests per day
Am trying to evaluate using any one of the above for use with Visualforce on Salesforce.com (SFDC) platform [*]
I understand for a public website the requests are per IP. Now for SFDC, there could be many different Organizations on a particular server (say, NA1). So, two different companies using SFDC and Google Maps API could have an URL at https://na1.salesforce.com/something_here and their requests should be counted separately.
Will it be so? What will happen in case of each API?
[*]SFDC is a SaaS cloud for the purpose of our discussion. All users login through the same page but they could be logged into different "orgs"/"organizations" but their URLs might look similar
It's important to differentiate between the server-side and client-side limits here. The server-side geocoding api would have have the 2500 limit enforced across the shared Salesforce instance based on how many machines the requests come from (I assume NA1 isn't 1 huge server). Multiple organization using the free geocoding API would all share the same server-side geocoding limit. I've actually run into the same limits using Google's own App Engine platform, where a bunch of applications share the same outbound IP address.
For any sort of guaranteed performance you'll need to send the queries from your own server or go the Maps for Business route which lets you authenticate your queries to get those higher limits.
Client-side geocoding via the JavaScript API doesn't have these server-limits, so if users do any sort of action to trigger a geocode or two using the JS API is the best route.
You can already create your own "bucket" to track your 25K map loads per day by signing up for an API Key.
This question on SO addresses the geocoding API specifically being run from a visualforce page directly, Salesforce: Google maps query status 620 G_GEO_TOO_MANY_QUERIES and it does seem to mean that without a key the limits are shared. I would suspect that unless you plan on giving the app away that you are working on, you will pretty much be forced to pick up an upgraded API key. One thing you may want to look at to work around this is hosting the maps portion in another location, and iframing it into Salesforce.