The rate limit of Location module

I am implementing a MapView in my app. Every time the user drag the map, it will get the corresponding address detail using Expo.Location module.

In the doc, geocodeAsync() and reverseGeocodeAsync() note that

Note: Geocoding is resource consuming and has to be used reasonably. Creating too many requests at a time can result in an error so they have to be managed properly.

I am wondering what the rate limit of these function is? Also, as I remember I can use these functions without setting Google API Key. Does this mean I am using the Google API quota of expo.io?

I can afford to use my own API Key, but I’m not so clear about how geocodeAsync() and reverseGeocodeAsync() work. Can anyone provide more details on this?

Hi @carsonwah - From reading Apple and Google’s documentation and searching around, it looks like the rate limiting is determined by the device or IP address.

Here are some tips from Apple (Expo uses CLGeocoder):

Applications must be conscious of how they use geocoding. Geocoding requests are rate-limited for each app, so making too many requests in a short period of time may cause some of the requests to fail. (When the maximum rate is exceeded, the geocoder returns an error object with the network error to the associated completion handler.) Here are some rules of thumb for using this class effectively:

  • Send at most one geocoding request for any one user action.

  • If the user performs multiple actions that involve geocoding the same location, reuse the results from the initial geocoding request instead of starting individual requests for each action.

  • When you want to update the user’s current location automatically (such as when the user is moving), issue new geocoding requests only when the user has moved a significant distance and after a reasonable amount of time has passed. For example, in a typical situation, you should not send more than one geocoding request per minute.

  • Do not start a geocoding request at a time when the user will not see the results immediately. For example, do not start a request if your application is inactive or in the background.

Reading about Google’s geocoding on Android, it looks like rate limiting is per user session. The JS geocoding API is limited to about 2500 requests per day. I’m not sure what the limit for their Java/Android API is.

1 Like

Thanks for the explanation!

I didn’t know there is native support for geocoding on ios. Now I can design my app better. Thank you.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.