Problem in making request

I got a few problems when doing request, sometimes it take the house number and other times when it gives back the answer, it seems like it loose the house number.
While other times it keep it. I use the API.

Hey,

could you provide a few request examples for these issues, please?
Ideally in cURL format, which you can easily extract from our interactive API docs - see “Show example code”.

Best regards

curl --include \
     --header "Content-Type: application/json; charset=utf-8" \
     --header "Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8" \
  'https://api.openrouteservice.org/geocode/search/Structured?api_key=xxx&address=Viale%20Castagnola%2031&postalcode=6906&country=CH'
1 Like

i put xxx only to not give the apikey clear

1 Like

Hey,

thanks for the query :slight_smile:
Did I get that correctly, that you are getting different results for this one query every now and then?

Best regards

Hey,

yes but the problem actually is that i send therequest with a house number and in the answere i don’t see the house number but there other cases where the response show the house number… and i would like to know why?
Thank you for all the help!

Best regards

Hey,

first, notice that the housenumber is in the query part of the response, so it got picked up by the query.

Now, looking at the response, the returned point and the corresponding data on e.g. OpenStreetMap, it simply seems as if no housenumber data exists for that place in any of the sources the geocoder is using.

Best regards

Hey,

thank you for the answer. But then there’s no way to make it known that there are house there?? Sorry if is a stupid question… But i need to know.
Thanks in advance.

Best regards

Hey,

I’m not quite sure I understand your issue, so keep in mind that this answer might not go in the right direction at all.

It is not the purpose of a geocoder to find out whether there is a house somewhere, but rather to get an accurate geographical location from a textual description.

Thus, you are not asking “Is there a house at Viale Castagnola 31, Lugano”, but you are asking "What is the best guess at a coordinate for Viale Castagnola 31, Lugano.

Best regards.

2 Likes

Hey,

that’s what i was looking as an answer!
Thank you wery much for your help and your time!

Best regards

2 Likes