GraphHopper.com | Forum | GitHub | Maps | Blog

Geodode query format


#1

Hello, i would like to ask about Geocode API query format. Lets say that I have country (shortcut), city, postal code and street (eventually with number). How should query looks like? I tried with many combinations, but to be honest - after some time I have doubted that any format really exists. The more info I am giving, the less accurate results are.
For example -
https://graphhopper.com/api/1/geocode?locale=en&q=Poland%2C%20Poznań%2C%20Kłosowa%2016&limit=8&key=703926d2-dd29-4425-9591-d49100485729
expected result is at 8 position.

When I change country name to original name, it is more accurate, but… expected is at 2 (of 2) position:
https://graphhopper.com/api/1/geocode?locale=en&q=Polska%2C%20Poznań%2C%20Kłosowa%2016&limit=8&key=703926d2-dd29-4425-9591-d49100485729

but when i type
https://graphhopper.com/api/1/geocode?locale=en&q=Poznań%2C%20kłosowa%2016&limit=8&key=703926d2-dd29-4425-9591-d49100485729

it is correct.


#2

There is no expected format and the differences are potential a software problem (in general the locale should match also the input text but we currently support only 4 locale there: en, de, fr and it). You can try alternative provider like gisgraphy or if you do not need autocomplete you can try provider=nominatim.