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

I'm making requests to reverse nominatin service to get address. In the response in JSON format I get an object like that:

{"place_id":"1250030","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"5112376117","lat":"51.712222","lon":"39.1557368","display_name":"Ангстрем, 44, бульвар Победы, Северный, Коминтерновский район, Воронеж, городской округ Воронеж, Воронежская область, Центральный федеральный округ, 394077, Россия","address":{"furniture":"Ангстрем","house_number":"44","road":"бульвар Победы","suburb":"Северный","city_district":"Коминтерновский район","city":"Воронеж","county":"городской округ Воронеж","state":"Воронежская область","postcode":"394077","country":"Россия","country_code":"ru"},"extratags":{},"boundingbox":["51.712122","51.712322","39.1556368","39.1558368"]}

Where can I find the complete list of every possible fields of "address" object? In this example there are: furniture, house_number, road, suburb, city_district, city, county, state, postcode, country and country_code.

asked 17 Jan '18, 14:30

gsv91's gravatar image

gsv91
31335
accept rate: 0%

edited 17 Jan '18, 14:32


You can use this as guide for the most common fields https://github.com/OpenCageData/address-formatting/blob/master/conf/components.yaml There are hundreds of others, in this case 'furniture'. But also 'restaurant' or 'bank'. Those you can usually treat as the name of a place (or ignore).

permanent link

answered 17 Jan '18, 15:15

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Wouldn't it be better to look in the Nominatim code instead ? Isn't OpenCage another geocoder, which might show different fields ?

(17 Jan '18, 15:21) escada
3

The address-formatting library works for multiple geocoders, including Nominatim. Usually the question for all fields comes up when a user wants to create formatted address strings. But you're right, I was making assumptions.

The relevant Nominatim code is https://github.com/openstreetmap/Nominatim/blob/6c1977b448e8b195bf96b6144674ffe0527e79de/lib/lib.php#L63

(17 Jan '18, 15:30) mtmail

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
×202
×36

question asked: 17 Jan '18, 14:30

question was seen: 5,893 times

last updated: 17 Jan '18, 15:30

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