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

Good morning. I am a beginner of p.s.m. Firts I tried the following from the browser, and it worked and it still works:

Then I tried with php, with the following instructions, both from my pc that from a server, but it always return an Error 403. I read that this happens when there is an abuse, but it happened me from the very first submissmion. Thank you.

$data = array( 'street' => "via tolmezzo 15", 'postcode' => "20132", 'city' => "Milano", 'county' => "MI",
'country_code' => "IT", 'format' => "json" ); $options = array ( 'http' => array ( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'GET', 'content' => http_build_query($data) ) ); $url=""; $context = stream_context_create ($options); $result = file_get_contents ($url, false, $context);

asked 08 Jan '22, 20:19

enzovisk's gravatar image

accept rate: 0%

You are not following the Nominatim Usage policy, see here:

You'll have to be esp. careful about including a unique user agent for your application ;)

permanent link

answered 08 Jan '22, 21:00

Spiekerooger's gravatar image

accept rate: 16%

edited 09 Jan '22, 10:12

Thank you for your kind answer. I have read and I followed all these guidelines. It send me such response "error 43" since the first attempt, but all is right.

Afterwards,I tried from different servers and different connections. I also tried with curl. But It always gives me that answer.

Best regards. Vincent

(09 Jan '22, 09:57) enzovisk

No, you did not follow the instructions as laid out by the usage policy. I've added another hint in my answer above.

(09 Jan '22, 10:13) Spiekerooger

you should use an UserAgent var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (compatible; AcmeInc/1.0)")

permanent link

answered 18 Jan, 09:17

Nawar327's gravatar image

accept rate: 0%

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 08 Jan '22, 20:19

question was seen: 4,701 times

last updated: 18 Jan, 09:17

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