Why not ask your question on the new 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: https://nominatim.openstreetmap.org/search?street=via+tolmezzo+15&postcode=20132&city=milano&county=MI&country_code=IT&format=json

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="https://nominatim.openstreetmap.org/search"; $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: https://operations.osmfoundation.org/policies/nominatim/

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: 15%

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
Your answer
toggle preview

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](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:


question asked: 08 Jan '22, 20:19

question was seen: 1,663 times

last updated: 10 Jan '22, 07:10

powered by OSQA