NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 '20, 07:54

Shwetha4194's gravatar image

Shwetha4194
11113
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 '20, 08:22

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 21 Aug '20, 08:24

I thought so too, thank you for the confirmation.

(21 Aug '20, 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 '20, 12:12

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

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:

×689
×193

question asked: 21 Aug '20, 07:54

question was seen: 3,123 times

last updated: 21 Aug '20, 12:12

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum