Hi,

Our application is using the URL: http://nominatim.openstreetmap.org/search.php to search for locations on the OSM. It was working as expected until last week. Now, the response from the URL is "301 moved permanently". Can someone please tell if anything has changed in OSM map server?

asked 21 Aug, 07:54

Shwetha4194's gravatar image

Shwetha4194
113
accept rate: 0%


301 indicates a permanent redirect that your app should be following instead of throwing an error.

It redirects to https://nominatim.openstreetmap.org/ui/search.html which is simply the new url for the same thing.

permanent link

answered 21 Aug, 08:22

SimonPoole's gravatar image

SimonPoole ♦
41.0k13300649
accept rate: 19%

edited 21 Aug, 08:24

I thought so too, thank you for the confirmation.

(21 Aug, 08:24) Shwetha4194

A browser will ask the server for a HTML (content-type) response. Your application is probably requesting either JSON or XML.

When look at the HTTP reponse headers for a JSON request:

curl -I -H "Content-Type: application/json" "http://nominatim.openstreetmap.org/search.php?q=london&format=jsonv2"

HTTP/1.1 301 Moved Permanently

Location: https://nominatim.openstreetmap.org/search.php?q=london&format=jsonv2

So in your application you should either follow the redirect (many software libraries have options to do that automatically) or replace http: with https:

permanent link

answered 21 Aug, 12:12

mtmail's gravatar image

mtmail
4.1k1261
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×614
×177

question asked: 21 Aug, 07:54

question was seen: 123 times

last updated: 21 Aug, 12:12

powered by OSQA