Call API KO ?
#2844
Replies: 1 comment 1 reply
-
/ui/search.html is not the correct API Url, it should be https://nominatim.openstreetmap.org/search You should add a user agent string identifying your application |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone !
I would like to come to you because I am very confused.
I try to call the https://nominatim.openstreetmap.org/search? API from a PHP file but it doesn’t work.
Indeed:
If I put the following url in my search bar, I get the json file: https://nominatim.openstreetmap.org/search.php?q=135+pilkington+avenue%2C+birmingham&format=jsonv2
If I call it in my file I have an error 404 not found and via a curl -v I have a 302:
Location: https://nominatim.openstreetmap.org/ui/search.html?q=135+pilkington+avenue%2C+birmingham
If I try to put https://nominatim.openstreetmap.org/ui/search.html?q=135+pilkington+avenue%2C+birmingham&format=json in my file, I get a blank page and cannot retrieve the parameters.
There is my php file :
How can i do for get the json ?
Beta Was this translation helpful? Give feedback.
All reactions