Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Включить страницу
SGTDOC:О «Подсказках»: адрес по коду КЛАДР или ФИАС
SGTDOC:О «Подсказках»: адрес по коду КЛАДР или ФИАС

Запрос

Без форматирования
curl -X 

Метод доступен только через API (jQuery-плагин не поддерживается).

Метод ищет по коду ФИАС/КЛАДР до улицы (при поиске по коду дома вернется пустой ответ).

Обратите внимание – поиск адреса по коду ФИАС осуществляется только в случае, когда Подсказки используют справочник ФИАС. Если справочник – КЛАДР, то поиск возможен только по коду КЛАДР.

Запрос

Для пользователей бесплатных подсказок DaData.ru:

Без форматирования
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "5f96fd6b-b3de-451f-b280-8fedf859e683" }' \
  httpshttp://dadata.ruВАШ_СЕРВЕР:ПОРТ/suggestions/api/v24_1/rs/findById/address

Для пользователей платных подсказок DaData.ru:

Без форматирования
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "5f96fd6b-b3de-451f-b280-8fedf859e683" }' \
  http://suggestions.dadata.ru/suggestions/api/4_1/rs/findById/address

Для пользователей standalone-подсказок:

Без форматирования
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "query": "5f96fd6b-b3de-451f-b280-8fedf859e683" }' \
  http://ВАШ_СЕРВЕР:ПОРТ/suggestions/api/4_1/rs/findById/address

...

Включить страницу
_Заголовки (API)
_Заголовки (API)

Параметры

ПараметрОбязательный?Описание
queryдаКод КЛАДР или ФИАС, по которому нужно получить подсказку

language

нетЯзык отображения адреса в результатах поиска (en/ru) 20.3+

Ответ

Возвращает объект адреса, который соответствует искомому коду:

Раскрыть
titleПоказать

Включить страницу
Объект адреса
Объект адреса

Примеры

Запрос

Блок кода
languagejavascript
{
  "query": "5f96fd6b-b3de-451f-b280-8fedf859e683" 
}

либо

Блок кода
languagejavascript
{
  "query": "77000000000292300" 
}
Раскрыть
titleОтвет
Блок кода
languagejs
 {
    "suggestions": [
        {
            "value": "г Москва, ул Трехгорный Вал",
            "unrestricted_value": "123022, г Москва, Пресненский р-н, ул Трехгорный Вал",
            "data": {
                "postal_code": "123022",
                "country": "Россия",
                "country_iso_code": "RU",
                "federal_district": "Центральный",
                "region_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "region_kladr_id": "7700000000000",
                "region_iso_code": "RU-MOW",
                "region_with_type": "г Москва",
                "region_type": "г",
                "region_type_full": "город",
                "region": "Москва",
                "area_fias_id": null,
                "area_kladr_id": null,
                "area_with_type": null,
                "area_type": null,
                "area_type_full": null,
                "area": null,
                "city_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "city_kladr_id": "7700000000000",
                "city_with_type": "г Москва",
                "city_type": "г",
                "city_type_full": "город",
                "city": "Москва",
                "city_area": "Центральный",
                "city_district_fias_id": null,
                "city_district_kladr_id": null,
                "city_district_with_type": "Пресненский р-н",
                "city_district_type": "р-н",
                "city_district_type_full": "район",
                "city_district": "Пресненский",
                "settlement_fias_id": null,
                "settlement_kladr_id": null,
                "settlement_with_type": null,
                "settlement_type": null,
                "settlement_type_full": null,
                "settlement": null,
                "street_fias_id": "5f96fd6b-b3de-451f-b280-8fedf859e683",
                "street_kladr_id": "77000000000292300",
                "street_with_type": "ул Трехгорный Вал",
                "street_type": "ул",
                "street_type_full": "улица",
                "street": "Трехгорный Вал",
                "stead_fias_id": null,
                "stead_cadnum": null,
                "stead_type": null,
                "stead_type_full": null,
                "stead": null,
                "house_fias_id": null,
                "house_kladr_id": null,
                "house_cadnum": null,
                "house_type": null,
                "house_type_full": null,
                "house": null,
                "block_type": null,
                "block_type_full": null,
                "block": null,
                "entrance": null,
                "floor": null,
                "flat_fias_id": null,
                "flat_cadnum": null,
                "flat_type": null,
                "flat_type_full": null,
                "flat": null,
                "flat_area": null,
                "square_meter_price": null,
                "flat_price": null,
                "postal_box": null,
                "fias_id": "5f96fd6b-b3de-451f-b280-8fedf859e683",
                "fias_code": null,
                "fias_level": "7",
                "fias_actuality_state": "0",
                "kladr_id": "77000000000292300",
                "geoname_id": "524901",
                "capital_marker": "0",
                "okato": "45286575000",
                "oktmo": "45380000",
                "tax_office": "7703",
                "tax_office_legal": "7703",
                "timezone": "UTC+3",
                "geo_lat": "55.760317",
                "geo_lon": "37.560961",
                "beltway_hit": "IN_MKAD",
                "beltway_distance": null,
                "metro": null,
                "divisions": null,
                "qc_geo": "2",
                "qc_complete": null,
                "qc_house": null,
                "history_values": null,
                "unparsed_parts": null,
                "source": null,
                "qc": null
            }
        }
    ]
}

Запрос:

Блок кода
languagehtml/xml
<req>
  <query>5f96fd6b-b3de-451f-b280-8fedf859e683</query>
</req>
Раскрыть
titleОтвет
Блок кода
languagehtml/xml
<SuggestResponse>
    <suggestions>
        <value>г Москва, ул Трехгорный Вал</value>
        <unrestricted_value>123022, г Москва, Пресненский р-н, ул Трехгорный Вал</unrestricted_value>
        <data>
            <postal_code>123022</postal_code>
            <country>Россия</country>
            <country_iso_code>RU</country_iso_code>
            <federal_district>Центральный</federal_district>
            <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
            <region_kladr_id>7700000000000</region_kladr_id>
            <region_iso_code>RU-MOW</region_iso_code>
            <region_with_type>г Москва</region_with_type>
            <region_type>г</region_type>
            <region_type_full>город</region_type_full>
            <region>Москва</region>
            <area_fias_id/>
            <area_kladr_id/>
            <area_with_type/>
            <area_type/>
            <area_type_full/>
            <area/>
            <city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
            <city_kladr_id>7700000000000</city_kladr_id>
            <city_with_type>г Москва</city_with_type>
            <city_type>г</city_type>
            <city_type_full>город</city_type_full>
            <city>Москва</city>
            <city_area>Центральный</city_area>
            <city_district_fias_id/>
            <city_district_kladr_id/>
            <city_district_with_type>Пресненский р-н</city_district_with_type>
            <city_district_type>р-н</city_district_type>
            <city_district_type_full>район</city_district_type_full>
            <city_district>Пресненский</city_district>
            <settlement_fias_id/>
            <settlement_kladr_id/>
            <settlement_with_type/>
            <settlement_type/>
            <settlement_type_full/>
            <settlement/>
            <street_fias_id>5f96fd6b-b3de-451f-b280-8fedf859e683</street_fias_id>
            <street_kladr_id>77000000000292300</street_kladr_id>
            <street_with_type>ул Трехгорный Вал</street_with_type>
            <street_type>ул</street_type>
            <street_type_full>улица</street_type_full>
            <street>Трехгорный Вал</street>
            <stead_fias_id/>
            <stead_cadnum/>
            <stead_type/>
            <stead_type_full/>
            <stead/>
            <house_fias_id/>
            <house_kladr_id/>
            <house_cadnum/>
            <house_type/>
            <house_type_full/>
            <house/>
            <block_type/>
            <block_type_full/>
            <block/>
            <entrance/>
            <floor/>
            <flat_fias_id/>
            <flat_cadnum/>
            <flat_type/>
            <flat_type_full/>
            <flat/>
            <flat_area/>
            <square_meter_price/>
            <flat_price/>
            <postal_box/>
            <fias_id>5f96fd6b-b3de-451f-b280-8fedf859e683</fias_id>
            <fias_code/>
            <fias_level>7</fias_level>
            <fias_actuality_state>0</fias_actuality_state>
            <kladr_id>77000000000292300</kladr_id>
            <geoname_id>524901</geoname_id>
            <capital_marker>0</capital_marker>
            <okato>45286575000</okato>
            <oktmo>45380000</oktmo>
            <tax_office>7703</tax_office>
            <tax_office_legal>7703</tax_office_legal>
            <timezone>UTC+3</timezone>
            <geo_lat>55.760317</geo_lat>
            <geo_lon>37.560961</geo_lon>
            <beltway_hit>IN_MKAD</beltway_hit>
            <beltway_distance/>
            <metro/>
            <divisions/>
            <qc_geo>2</qc_geo>
            <qc_complete/>
            <qc_house/>
            <history_values/>
            <unparsed_parts/>
            <source/>
            <qc/>
        </data>
    </suggestions>
</SuggestResponse>

Запрос

Блок кода
languagejavascript
{
	"query":"6026dd78-0d6c-4c13-b3f4-4ea131eb17eb", 
	"language":"en"
}
Раскрыть
titleОтвет
Блок кода
languagejs
 {
    "suggestions": [
        {
            "value": "Russia, Moscow city, prospekt Leninsky, dom 23",
            "unrestricted_value": "119071, Russia, Moscow city, rayon Donskoy, prospekt Leninsky, dom 23",
            "data": {
                "postal_code": "119071",
                "country": "Russia",
                "country_iso_code": "RU",
                "federal_district": null,
                "region_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "region_kladr_id": "7700000000000",
                "region_iso_code": "RU-MOW",
                "region_with_type": "Moscow city",
                "region_type": "city",
                "region_type_full": "city",
    

...

Параметры

ПараметрОбязательный?Описание
queryдаЗапрос, для которого нужно получить подсказки

Ответ

Возвращается объект адреса, который соответствует искомому коду КЛАДР/ФИАС:

...

titleПоказать

...

Примеры

Запрос

Блок кода
languagejavascript
{
  "query": "5f96fd6b-b3de-451f-b280-8fedf859e683" 
}

Ответ:

Раскрыть
titleПоказать
Блок кода
languagejs
 {
    "suggestions": [
        {
            "value": "г Москва, ул Трехгорный Вал",
            "unrestricted_valueregion": "г Москва, ул Трехгорный Вал",
Moscow",
                "dataarea_fias_id": {null,
                "qcarea_kladr_completeid": null,
                "qcarea_with_housetype": null,
                "qcarea_geotype": "2"null,
                "postalarea_type_codefull": "123022"null,
                "postal_boxarea": null,
                "countrycity_fias_id": "Россия0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "regioncity_withkladr_typeid": "г Москва7700000000000",
                "regioncity_with_type": "гMoscow city",
                "regioncity_type_full": "городcity",
                "regioncity_type_full": "Москваcity",
                "area_with_typecity": null"Moscow",
                "city_area_type": null,
                "areacity_district_typefias_fullid": null,
                "areacity_district_kladr_id": null,
                "city_district_with_type": "гrayon МоскваDonskoy",
                "city_district_type": "гrayon",
                "city_district_type_full": "городrayon",
                "city_district": "МоскваDonskoy",
                "citysettlement_fias_districtid": null,
                "settlement_withkladr_typeid": null,
                "settlement_with_type": null,
                "settlement_type_full": null,
                "settlement_type_full": null,
                "street_with_type": "ул Трехгорный Вал"     "settlement": null,
                "street_typefias_id": "ул5f2a1243-a57b-418e-baee-ff76f4993b45",
                "street_typekladr_fullid": "улица77000000000168900",
                "street_with_type": "Трехгорныйprospekt ВалLeninsky",
                "housestreet_type": null"prospekt",
                "housestreet_type_full": null"prospekt",
                "housestreet": null"Leninsky",
                "blockstead_fias_typeid": null,
                "blockstead_cadnum": null,
                "flatstead_areatype": null,
                "flatstead_type_full": null,
                "flatstead": null,
                "house_fias_id": "5f96fd6b6026dd78-b3de0d6c-451f4c13-b280b3f4-8fedf859e6834ea131eb17eb",
                "house_kladr_id": "770000000002923007700000000016890023",
                "taxhouse_officecadnum": "770377:05:0001009:1035",
                "tax_office_legal": null,
                "okatohouse_type": "45286575000dom",
                "oktmohouse_type_full": "45380000dom",
                "geo_lathouse": "55.760403323",
                "geoblock_lontype": "37.5610847"null,
                "unparsedblock_type_partsfull": null,
                "qcblock": null,
            }
    "entrance": null,
   }
     ]
}

Запрос:

Блок кода
languagehtml/xml
<req>
  <query>5f96fd6b-b3de-451f-b280-8fedf859e683</query>
</req>

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>        "floor": null,
    <suggestions>
            <value>г Москва, ул Трехгорный Вал</value>
"flat_fias_id": null,
                <unrestricted_value>г Москва, ул Трехгорный Вал</unrestricted_value>
"flat_cadnum": null,
                 <data>"flat_type": null,
            <qc_complete/>
    "flat_type_full": null,
       <qc_house/>
         "flat": null,
    <qc_geo>2</qc_geo>
            <postal_code>123022</postal_code>"flat_area": null,
            <postal_box/>
    "square_meter_price": null,
       <country>Россия</country>
            <region_with_type>г Москва</region_with_type>"flat_price": null,
            <region_type>г</region_type>
    "postal_box": null,
       <region_type_full>город</region_type_full>
            <region>Москва</region>"fias_id": "6026dd78-0d6c-4c13-b3f4-4ea131eb17eb",
            <area_with_type/>    "fias_code": null,
            <area_type/>    "fias_level": "8",
            <area_type_full/>    "fias_actuality_state": "0",
            <area/>
    "kladr_id": "7700000000016890023",
       <city_with_type>г Москва</city_with_type>
        "geoname_id": "524901",
    <city_type>г</city_type>
            <city_type_full>город</city_type_full>"capital_marker": "0",
            <city>Москва</city>
    "okato": "45296561000",
       <city_district/>
            <settlement_with_type/>"oktmo": "45915000",
            <settlement_type/>
    "tax_office": "7725",
       <settlement_type_full/>
            <settlement/>"tax_office_legal": "7725",
            <street_with_type>ул Трехгорный Вал</street_with_type>
  "timezone": null,
         <street_type>ул</street_type>
       "geo_lat": "55.71734",
    <street_type_full>улица</street_type_full>
            <street>Трехгорный Вал</street>"geo_lon": "37.59639",
            <house_type/>
    "beltway_hit": null,
       <house_type_full/>
            <house/>"beltway_distance": null,
            <block_type/>
      "metro": null,
     <block/>
            <flat_area/>
  "divisions": null,
          <flat_type/>
      "qc_geo": "0",
     <flat/>
            <fias_id>5f96fd6b-b3de-451f-b280-8fedf859e683</fias_id>"qc_complete": null,
            <kladr_id>77000000000292300</kladr_id>
        "qc_house": null,
    <tax_office>7703</tax_office>
            <tax_office_legal/>"history_values": null,
            <okato>45286575000</okato>
    "unparsed_parts": null,
       <oktmo>45380000</oktmo>
         "source":   <geo_lat>55.7604033</geo_lat>
null,
             <geo_lon>37.5610847</geo_lon>
   "qc": null
        <unparsed_parts/>
    }
        <qc/>}
    ]
}

Запрос иностранных адресов (20.7+)

Geonames-код:

Блок кода
languagejavascript
{
  "query": 
</data>
"1857910" 
}

либо OSM-код:

Блок кода
languagejavascript
{
  "query": 
</suggestions> </SuggestResponse>
"way:208547592" 
}