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

Trying to get this to work in the test environment and keep getting connection failure. Is there a test API for Geocoding with http?

<cfhttp method="get" url="https://nominatim.openstreetmap.org/search?city=oxford,&amp;country=New Zealand&amp;format=geojson" getasbinary="never"> <cfoutput> <cfdump var="#cfhttp.filecontent#"> </cfoutput>

asked 20 Jun '19, 02:51

LoganOSM's gravatar image

LoganOSM
11112
accept rate: 0%

How do I create User-Agent identifying the application so API call will work?

(05 Jul '19, 15:13) LoganOSM

How will depend on how you're making the https call. Is that via a web framework for a particular environment or language, or something else?

Edit: Richard has spotted that you're using Cold Fusion - best to follow his suggestion.

(05 Jul '19, 16:19) SomeoneElse ♦

User-agent still not working. Can I provide an IP address to you to be granted permission? Or do you have one sample call that uses address to obtain lat/lng in geocode that does not require useragent or valid HTTP referer?

(08 Jul '19, 15:25) LoganOSM

Read the Nominatim usage policy:

https://operations.osmfoundation.org/policies/nominatim/

You need to "Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do)". If you do not, then it's very likely your requests will be blocked.

(Learning how to set a user-agent in ColdFusion is outwith the scope of this help site and you'd probably need to ask on a ColdFusion support site.)

permanent link

answered 20 Jun '19, 12:04

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

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:

×290
×9
×1
×1

question asked: 20 Jun '19, 02:51

question was seen: 1,941 times

last updated: 09 Jul '19, 09:52

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