Google Directions API limit
Asked Answered
S

1

13

i am trying to draw the route between two markers on my google map which i implement in my android app. I have read, the way to do this is invoking the Directions API service. The Usage Limits says you could only make 2500 request per day, i am confuse about that, this limit will apply for my whole app traffic (all the users would be able to made 2500 total request) or apply for individual mobile devices (a single app instance running on a single device would be able to make 2500 request per day). I have found many questions about this topic but none official answer. I appreciate any help Thanks.

Schriever answered 26/12, 2013 at 14:47 Comment(2)
Possible duplicate of Google MAPs API for android limit 2500 requests/day is per client device or per application key?Incrocci
@Carlos, in order to get the updates on the client side and to update the polyline there, do you have to call Google Directions API every few seconds? Or do you attach a listener on the client side and Google Directions API will POST a response every few seconds? Please advise.Kimberykimble
T
8

I believe this is the answer you are looking for (from google developer section):

https://developers.google.com/maps/articles/geocodestrat

Quota Considerations

Server-side geocoding through the Geocoding Web Service has a quota of 2,500 requests per IP per day, so all requests in one day count against the quota. In addition, the Web Service is rate-limited, so that requests that come in too quickly result in blocking. Client-side geocoding through the browser is rate limited per map session, so the geocoding is distributed across all your users and scales with your userbase. Geocoding quotas and rate limits drive the strategies outlined in this article.

.....

When to Use Client-Side Geocoding

The basic answer is "almost always." As geocoding limits are per user session, there is no risk that your application will reach a global limit as your userbase grows. Client-side geocoding will not face a quota limit unless you perform a batch of geocoding requests within a user session. Therefore, running client-side geocoding, you generally don't have to worry about your quota.

Two basic architectures for client-side geocoding exist. •Run the geocoding and display entirely in the browser. For instance, the user enters an address on your page. Your application geocodes it. Then your page uses the geocode to create a marker on the map. Or your app does some simple analysis using the geocode. No data is sent to your server. This reduces load on your server, but doesn't give you any sense of what your users are doing.

•Run the geocode in the browser and then send it to the server. For instance, the user enters an address. Your application geocodes it in the browser. The app then sends the data to your server. The server responds with some data, such as nearby points of interest. This allows you to customize a response based on your own data, and also to cache the geocode if you want. This cache allows you to optimize even more. You can even query the server with the address, see if you have a recently cached geocode for it, and if you do, use that. If you don't, then return no result to the browser, and let it geocode the result and send it back to the server to for caching.

UPDATE 03/23/2015: per request by a poster

Here is the excerpt from the Google documentation on quota limits for the direction API:

Usage Limits

The Directions API has the following limits in place: Users of the free API:•2,500 directions requests per 24 hour period.
•Up to 8 waypoints allowed in each request. Waypoints are not available for transit directions.
•2 requests per second. Google Maps API for Work customers:•100,000 directions requests per 24 hour period.
•23 waypoints allowed in each request. Waypoints are not available for transit directions.
•10 requests per second.

Tijuanatike answered 26/12, 2013 at 15:25 Comment(7)
Thanks for your answer, but i am concerned about this API developers.google.com/maps/documentation/directions, as i have readed, the way to obtain the route between two geopoints is by invoking the mentioned Directions API, i intend to show the route between the actual user position (obtained thanks to the mobile GPS) and some marker in the Google Map selected by the user, so this service must be invoked an unknown number of times. I assume a single user, from his personal mobile device, wont reach the 2500 quota, but certainly the set of all app user will do.Schriever
@xiidarkevil did you solve the issue. I am trying to use Directions API and I have the same question. Please let me know.Saum
The 2500 quota limit is per device, as long as the API requests is made by the client (e.g., client side) and not by the server. If it is done by the server, then you would have the problem of it the quota being the combined requests by all users. The google documentation on quotas makes note of this as well.Tijuanatike
@Andrew-OpenGeoCode I was under the impression that 2500 request per device is just for geocoding API, which is also mentioned in the link/your answer. For direction api, I don't see client side quota. Please correct me if I am wrong.Decompress
@Andrew-OpenGeoCode Correct, this means there is no client side quota here.Decompress
How is it possible to access the 23 waypoints per request limit? I am using a server key for the Google Directions API with billing enabled, but when I make aPadding
is there any update regarding this API limit ?Germanous

© 2022 - 2024 — McMap. All rights reserved.