Search code examples
firebasereact-nativeexpogoogle-places-apigoogle-places-autocomplete

Alternatives for Places API Autocomplete for Expo React Native


I am developing an app on with react native, expo, and firebase, and I need to use an api to autocomplete locations when a user types them, but the places API is incredibly expensive. I wanted to know if there were any free or at least far cheaper alternatives to the react-native-google-places-autocomplete package? Ideally it would work with expo and firebase. Any help would be largely appreciated, thank you!


Solution

  • I would suggest you to fork the react-native-google-places-autocomplete package and replace the api calls to Google with another service. Or just write your own code for it.

    • Add cooldown before sending API requests and don't query before 4 letters are typed for example to massively reduce api calls.

    Alternative API services:

    Here geocoding autocomplete https://developer.here.com/documentation/examples/rest/geocoding_suggestions

    • Free first 30k searches per month

    LocationIQ https://locationiq.com/docs#autocomplete

    • Free 5k requests per day

    Mapbox geocoding https://docs.mapbox.com/api/search/geocoding/#forward-geocoding

    • Free 100k per month

    And probably lots of other alternatives that I have not found yet.