GraphHopper.com | Forum | GitHub | Maps | Blog

Geocode API for autocomplete


#1

Hi all!

I am looking into using the graphhopper geocode API for autocomplete suggestions on my site. At this moment the geocode API does return the country but not the countrycode while I really need the countrycode as well :slight_smile: Is this something that could be build-in easily by graphhopper since the API already returns the country name?

Further, If multiple calls (similar or the same call) are made while a user is typing how does this impact the credits for pricing? What is the recommended practice to build this in?

Thank you so much in advance!

Best regards, Bastiaan


#2

This is currently not planned for the default geocoding provider. But you can try if e.g. the external provider “gisgraphy” returns all information you need for autocomplete.

Further, If multiple calls (similar or the same call) are made while a user is typing how does this impact the credits for pricing?

You need to implement a certain delay and caching strategy on the client side to reduce credit usage.