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

Ключ

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

Включить страницу
_API_TESTER
_API_TESTER

Оглавление
maxLevel2
minLevel2

Возможности

Включить страницу
SGTDOC:О «Подсказках»: подсказки по адресам
SGTDOC:О «Подсказках»: подсказки по адресам

Запрос

Запрос

...

Без форматирования
curl -X POST \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "москва серпуховская" }' \
  https  http://dadata.ruВАШ_СЕРВЕР:ПОРТ/suggestions/api/v24_1/rs/suggest/address

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

Без форматирования
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "москва серпуховская" }' \
  http://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address

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

Без форматирования
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "query": "москва серпуховская" }' \
  http://ВАШ_СЕРВЕР:ПОРТ/suggestions/api/4_1/rs/suggest/address

...

Параметры

...

count

...

locations

...

API-пробник (21.8+)

HTML
<p class="api">
    <input id="api-url" type="text" placeholder="http://сервер:8080/">
    <button id="api-go" type="button" onclick="openApiTester('address/suggest')">→</button>
  </p>

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

Параметры

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

count

intнет
Включить страницу
_count_server
_count_server

language

string(2)нетЯзык отображения адреса в результатах поиска 20.3+
по умолчанию — русский
divisionstring(20)нет

Административное либо муниципальное деление 22.4+
по умолчанию — административное

locations

object[100]нетОграничение области поиска

locations_geo

object[1]нетГеографическое ограничение 20.4+
locations_boostobject[1]нетПриоритет города при ранжировании

from_bound
to_bound

objectнетГранулярные подсказки по адресу

Ответ

Возвращается список объектов адреса:

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

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

Примеры

Запрос

Блок кода
languagejavascript
{
    "query": "москва серпуховская" 
  }

Ответ:

Раскрыть
titleПоказать
Блок кода
languagejs
{
      "suggestions": [
      {
        "value": "г Москва, ул Серпуховская Б.",
        "unrestricted_value": "г Москва, ул Серпуховская Б.",
        "data": {
          "postal_code": "115093",
          "country": "Россия",
          "region_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
          "region_kladr_id": "7700000000000",
          "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": null,
          "city_district_fias_id": null,
          "city_district_kladr_id": null,
          "city_district_with_type": null,
          "city_district_type": null,
          "city_district_type_full": null,
          "city_district": null,
          "settlement_fias_id": null,
          "settlement_kladr_id": null,
          "settlement_with_type": null,
          "settlement_type": null,
          "settlement_type_full": null,
          "settlement": null,
          "street_fias_id": "601875e2-717a-4c30-a3c4-1fb49e67d93f",
          "street_kladr_id": "77000000000262500",
          "street_with_type": "ул Серпуховская Б.",
          "street_type": "ул",
          "street_type_full": "улица",
          "street": "Серпуховская Б.",
          "house_fias_id": null,
          "house_kladr_id": null,
          "house_type": null,
          "house_type_full": null,
          "house": null,
          "block_type": null,
          "block_type_full": null,
          "block": 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": "601875e2-717a-4c30-a3c4-1fb49e67d93f",
          "fias_level": "7",
          "kladr_id": "77000000000262500",
          "capital_marker": "0",
          "okato": null,
          "oktmo": null,
          "tax_office": null,
          "tax_office_legal": null,
          "timezone": null,
          "geo_lat": null,
          "geo_lon": null,
          "beltway_hit": null,
          "beltway_distance": null,
          "qc_geo": null,
          "qc_complete": null,
          "qc_house": null,
          "unparsed_parts": null,
          "qc": null
        }
      },
      {
        "value": "г Москва, Серпуховская пл",
        "unrestricted_value": "г Москва, Серпуховская пл",
        "data": {
          "postal_code": "115184",
          "country": "Россия",
          "region_fias_id": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
          "region_kladr_id": "7700000000000",
          "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": null,
          "city_district_fias_id": null,
          "city_district_kladr_id": null,
          "city_district_with_type": null,
          "city_district_type": null,
          "city_district_type_full": null,
          "city_district": null,
          "settlement_fias_id": null,

Ответ

Возвращается список объектов адреса:

...

titleПоказать

...

Примеры

Запрос

Блок кода
languagejavascript
{
  "query": "москва серпуховская" 
}

Ответ:

Раскрыть
titleПоказать
Блок кода
languagejs
 {
    "suggestions": [
        {
  "settlement_kladr_id": null,
          "valuesettlement_with_type": "г Москва, Серпуховская пл"null,
            "unrestrictedsettlement_valuetype": "г Москва, Серпуховская пл",
 null,
           "data": {
     settlement_type_full": null,
           "qc_completesettlement": null,
                "qcstreet_fias_houseid": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
                "qcstreet_kladr_geoid": null"77000000000702000",
                "postalstreet_with_codetype": "115184Серпуховская пл",
          "street_type": "пл",
          "postalstreet_type_boxfull": null"площадь",
                "countrystreet": "РоссияСерпуховская",
                "regionhouse_withfias_typeid": "г Москва"null,
                "regionhouse_kladr_typeid": "г"null,
                "region"house_type_full": "город"null,
                "regionhouse_type_full": "Москва"null,
                "area_with_typehouse": null,
                "areablock_type": null,
                "area"block_type_full": null,
          "block": null,
          "areaflat_type": null,
                "city_with_type"flat_type_full": "г Москва"null,
          "flat": null,
          "cityflat_typearea": "г"null,
                "citysquare_typemeter_fullprice": "город"null,
                "city"flat_price": "Москва"null,
                "settlementpostal_with_typebox": null,
                "settlement_type"fias_id": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
                "settlementfias_type_fulllevel": null"7",
                "settlement"kladr_id": null"77000000000702000",
                "street_with_type"capital_marker": "Серпуховская пл0",
                "street_type"okato": "пл45286560000",
                "street_type_full"oktmo": "площадь45376000",
    
            "streettax_office": "Серпуховская7705",
                "housetax_office_typelegal": null,
          "timezone": null,
          "housegeo_type_fulllat": null,
                "housegeo_lon": null,
                "blockbeltway_typehit": null,
                "block"beltway_distance": null,
                "flat_area"qc_geo": null,
                "flatqc_typecomplete": null,
                "flatqc_house": null,
                "fiasunparsed_idparts": null,
                "kladr_id"qc": "77000000000702000",null
        }
        "tax_office": "7705",}
    ]
   }


Запрос:

Блок кода
languagehtml/xml
<req>
    <query>москва серпуховская</query>
  </req>

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>    "tax_office_legal": null,
      <suggestions>
          "okato": "45286560000",
   <value>г Москва, ул Серпуховская Б.</value>
          <unrestricted_value>г Москва, ул "oktmo": null,Серпуховская Б.</unrestricted_value>
          <data>
      "geo_lat": null,
       <postal_code>115093</postal_code>
         "geo_lon": null,
       <country>Россия</country>
              "unparsed_parts": null,<region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
              <region_kladr_id>7700000000000</region_kladr_id>
  "qc": null
            }<region_with_type>г Москва</region_with_type>
        },
			{
      <region_type>г</region_type>
      "value":  Москва, ул Серпуховская Б.",
   <region_type_full>город</region_type_full>
         "unrestricted_value":  Москва, ул Серпуховская Б.",
 <region>Москва</region>
             "data": { <area_fias_id/>
                "qc_complete": null,<area_kladr_id/>
                "qc_house": null,<area_with_type/>
                "qc_geo": null,<area_type/>
                "postal_code": "115093",
  <area_type_full/>
              "postal_box": null,<area/>
                "country": "Россия",<city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
                "region_with_type": "г Москва",<city_kladr_id>7700000000000</city_kladr_id>
                "region_type": "г",<city_with_type>г Москва</city_with_type>
                "region_type_full": "город",<city_type>г</city_type>
                "region": "Москва",<city_type_full>город</city_type_full>
                "area_with_type": null,<city>Москва</city>
                "area_type": null,<city_area/>
                "area_type_full": null,<city_district_fias_id/>
                "area": null,<city_district_kladr_id/>
                "city<city_district_with_type": "г Москва",/>
                "city_type": "г",<city_district_type/>
                "city<city_district_type_full": "город",/>
                "city": "Москва",<city_district/>
                "settlement_with_type": null,<settlement_fias_id/>
                "settlement_type": null,<settlement_kladr_id/>
              <settlement_with_type/>
  "settlement_type_full": null,
            <settlement_type/>
      "settlement": null,
       <settlement_type_full/>
         "street_with_type": "ул Серпуховская Б.",
  <settlement/>
              "street_type": "ул",<street_fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</street_fias_id>
                "<street_kladr_id>77000000000262500</street_type_full": "улица",kladr_id>
                "street": "<street_with_type>ул Серпуховская Б.",</street_with_type>
                "house_type": null,<street_type>ул</street_type>
                "house<street_type_full>улица</street_type_full": null,full>
                "house": null,<street>Серпуховская Б.</street>
              <house_fias_id/>
  "block_type": null,
           <house_kladr_id/>
     "block": null,
         <house_type/>
       "flat_area": null,
      <house_type_full/>
          "flat_type": null,
   <house/>
             "flat": null, <block_type/>
                "fias_id": null,<block_type_full/>
                "kladr_id": "77000000000262500",<block/>
                "tax_office": null,<flat_type/>
                "tax_office_legal": null,<flat_type_full/>
                "okato": null,
  <flat/>
              "oktmo": null,<flat_area/>
                "geo_lat": null,<square_meter_price/>
                "geo_lon": null,<flat_price/>
                "unparsed_parts": null,<postal_box/>
                "qc": null
<fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
              }<fias_level>7</fias_level>
        },

 

Запрос:

Блок кода
languagehtml/xml
<req>
  <query>москва серпуховская</query>
</req>

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>
      <kladr_id>77000000000262500</kladr_id>
    <suggestions>
        <value>г Москва, Серпуховская пл</value> <capital_marker>0</capital_marker>
        <unrestricted_value>г Москва, Серпуховская пл</unrestricted_value>
   <okato/>
     <data>
            <qc_complete<oktmo/>
            <qc  <tax_houseoffice/>
            <qc_geo  <tax_office_legal/>
            <postal_code>115184</postal_code>  <timezone/>
            <postal  <geo_boxlat/>
            <country>Россия</country>
  <geo_lon/>
             <region_with_type>г Москва</region_with_type> <beltway_hit/>
            <region  <beltway_type>г<distance/region_type>>
            <region_type_full>город</region_type_full>  <qc_geo/>
            <region>Москва</region>  <qc_complete/>
            <area_with_type  <qc_house/>
              <area<unparsed_typeparts/>
              <area_type_full<qc/>
            <area</>data>
      </suggestions>
      <city_with_type>г Москва</city_with_type><suggestions>
          <value>г Москва, Серпуховская <city_type>г</city_type>пл</value>
          <unrestricted_value>г  <city_type_full>город</city_type_full>Москва, Серпуховская пл</unrestricted_value>
          <data>
  <city>Москва</city>
            <settlement<postal_with_type/>code>115184</postal_code>
            <settlement_type/>  <country>Россия</country>
            <settlement_type_full/>
  <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
              <settlement/><region_kladr_id>7700000000000</region_kladr_id>
            <street  <region_with_type>Серпуховскаяtype>г пл<Москва</streetregion_with_type>
            <street  <region_type>пл<type>г</streetregion_type>
              <street<region_type_full>площадь<full>город</streetregion_type_full>
             <street>Серпуховская< <region>Москва</street>region>
            <house_type  <area_fias_id/>
            <house  <area_typekladr_fullid/>
            <house  <area_with_type/>
            <block  <area_type/>
             <block <area_type_full/>
              <flat_area<area/>
              <flat_type/>
<city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
              <flat/><city_kladr_id>7700000000000</city_kladr_id>
            <fias_id/>  <city_with_type>г Москва</city_with_type>
            <kladr  <city_id>77000000000702000<type>г</kladrcity_id>type>
              <tax<city_type_office>7705<full>город</taxcity_type_office>full>
            <tax_office_legal/>  <city>Москва</city>
            <okato>45286560000</okato>  <city_area/>
            <oktmo  <city_district_fias_id/>
            <geo_lat  <city_district_kladr_id/>
            <geo_lon  <city_district_with_type/>
            <unparsed_parts  <city_district_type/>
            <qc    <city_district_type_full/>
          </data>
    <<city_district/suggestions>>
    <suggestions>
        <value>г Москва, ул Серпуховская Б.</value>
 <settlement_fias_id/>
          <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value> <settlement_kladr_id/>
        <data>
            <qc_complete<settlement_with_type/>
            <qc  <settlement_housetype/>
              <qc<settlement_type_geofull/>
            <postal_code>115093</postal_code>  <settlement/>
            <postal_box/>
  <street_fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
              <country>Россия</country>
<street_kladr_id>77000000000702000</street_kladr_id>
              <region<street_with_type>гtype>Серпуховская Москва<пл</regionstreet_with_type>
              <region<street_type>г<type>пл</regionstreet_type>
            <region  <street_type_full>город<full>площадь</regionstreet_type_full>
             <region>Москва< <street>Серпуховская</region>street>
            <area  <house_withfias_typeid/>
              <area<house_kladr_typeid/>
            <area  <house_type_full/>
            <area  <house_type_full/>
             <city_with_type>г Москва</city_with_type><house/>
            <city_type>г</city_type>
            <city_type_full>город</city_type_full>
  <block_type/>
             <city>Москва</city>
 <block_type_full/>
             <settlement_with_type <block/>
            <settlement  <flat_type/>
            <settlement  <flat_type_full/>
            <settlement  <flat/>
            <street_with_type>ул Серпуховская Б.</street_with_type>
 <flat_area/>
              <street<square_meter_type>ул<price/street_type>>
            <street_type_full>улица</street_type_full>  <flat_price/>
            <street>Серпуховская Б.</street>  <postal_box/>
            <house_type/>
  <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
              <house<fias_type_full/>
level>7</fias_level>
              <house/><kladr_id>77000000000702000</kladr_id>
            <block  <capital_typemarker>0</>capital_marker>
            <block  <okato>45286560000</>okato>
              <flat_area<oktmo>45376000</>oktmo>
            <flat  <tax_typeoffice>7705</>tax_office>
            <flat  <tax_office_legal/>
             <fias_id <timezone/>
            <kladr  <geo_id>77000000000262500<lat/kladr_id>>
            <tax  <geo_officelon/>
            <tax_office_legal  <beltway_hit/>
            <okato  <beltway_distance/>
            <oktmo  <qc_geo/>
              <geo<qc_latcomplete/>
            <geo  <qc_lonhouse/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestResponse>