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

Ключ

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

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

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

Возможности

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

Запрос

Запрос

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

Без форматирования
curl -X POST \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "москва серпуховская" }' \
    httpshttp://dadata.ru/api/v2/ВАШ_СЕРВЕР:ПОРТ/suggestions/api/4_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,
          "settlement_kladr_id": null,
          "settlement_with_type": null,
          "settlement_type": null,
          "settlement_type_full": null,
          "settlement": null,
          "street_fias_id": "6fe35e69-360a-4d75-8061-066a5c9e669c",
          "street_kladr_id": "77000000000702000",

Ответ

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

...

titleПоказать

...

Примеры

Запрос

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagejs
{
  "suggestions": [
    {
      "value": "г Москва, ул Серпуховская Б.",
      "unrestricted_value": "г Москва, ул Серпуховская Б.",
      "data": {
          "qcstreet_with_completetype": null"Серпуховская пл",
          "qcstreet_housetype": null"пл",
          "qcstreet_type_geofull": null"площадь",
          "postal_codestreet": "115093Серпуховская",
          "postalhouse_fias_boxid": null,
        "country  "house_kladr_id": "Россия"null,
          "region_withhouse_type": "г Москва"null,
          "regionhouse_type_full": "г",
null,
          "region_type_fullhouse": "город"null,
          "regionblock_type": "Москва"null,
          "areablock_withtype_typefull": null,
          "area_typeblock": null,
          "areaflat_type_full": null,
        "area  "flat_type_full": null,
        "city_with_type  "flat": "г Москва"null,
          "cityflat_typearea": "г"null,
          "citysquare_typemeter_fullprice": "город"null,
          "cityflat_price": "Москва"null,
          "citypostal_districtbox": null,
          "settlementfias_with_typeid": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
          "settlementfias_typelevel": null"7",
          "settlementkladr_type_fullid": null"77000000000702000",
        "settlement": null,
  "capital_marker": "0",
          "street_with_typeokato": "ул Серпуховская Б.45286560000",
          "street_typeoktmo": "ул45376000",
          "streettax_type_fulloffice": "улица7705",
          "streettax_office_legal": "Серпуховская Б."null,
          "house_typetimezone": null,
          "housegeo_type_fulllat": null,
          "housegeo_lon": null,
          "blockbeltway_typehit": null,
          "blockbeltway_type_fulldistance": null,
          "blockqc_geo": null,
          "flatqc_areacomplete": null,
          "squareqc_meter_pricehouse": null,
          "flatunparsed_priceparts": null,
          "flat_typeqc": null,
        }
   "flat_type_full": null,
  }
    ]
  "flat": null,}


Запрос:

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

Ответ:

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

 

Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>
  <house_fias_id/>
        <suggestions>
      <house_kladr_id/>
  <value>г Москва, ул Серпуховская Б.</value>
        <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
<house_type/>
              <data><house_type_full/>
            <qc_complete  <house/>
            <qc  <block_housetype/>
            <qc_geo  <block_type_full/>
            <postal_code>115093</postal_code>  <block/>
            <postal  <flat_boxtype/>
              <country>Россия</country><flat_type_full/>
            <region_with_type>г Москва</region_with_type>  <flat/>
            <region  <flat_type>г<area/region_type>>
            <region  <square_typemeter_full>город</region_type_full>price/>
            <region>Москва</region>  <flat_price/>
            <area_with_type  <postal_box/>
              <area_type/>
<fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
             <area_type_full/> <fias_level>7</fias_level>
            <area/>  <kladr_id>77000000000262500</kladr_id>
            <city_with_type>г Москва</city_with_type>
  <capital_marker>0</capital_marker>
              <city_type>г</city_type><okato/>
            <city_type_full>город</city_type_full>  <oktmo/>
              <tax_office/>
  <city>Москва</city>
            <city<tax_office_districtlegal/>
             <settlement_with_type <timezone/>
            <settlement  <geo_typelat/>
              <settlement<geo_type_fulllon/>
            <settlement  <beltway_hit/>
            <street_with_type>ул Серпуховская Б.</street_with_type>
 <beltway_distance/>
              <street<qc_type>ул<geo/street_type>>
            <street_type_full>улица</street_type_full>
  <qc_complete/>
             <street>Серпуховская Б.</street>
 <qc_house/>
             <house <unparsed_typeparts/>
            <house_type_full  <qc/>
            <house</>data>
      </suggestions>
      <block_type/><suggestions>
          <value>г  <block_type_full/>Москва, Серпуховская пл</value>
          <unrestricted_value>г Москва, Серпуховская <blockпл</>unrestricted_value>
            <flat_area/><data>
            <square_meter_price/>
  <postal_code>115184</postal_code>
              <flat_price<country>Россия</>country>
            <flat_type/>
  <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
             <flat <region_typekladr_full/>
id>7700000000000</region_kladr_id>
              <region_with_type>г Москва</region_with_type>
    <flat/>
            <fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
<region_type>г</region_type>
              <fias<region_type_level>7<full>город</fiasregion_type_level>full>
             <kladr_id>77000000000262500</kladr_id> <region>Москва</region>
            <tax_office  <area_fias_id/>
              <tax<area_officekladr_legalid/>
             <capital_marker>0</capital_marker>
 <area_with_type/>
              <okato<area_type/>
              <oktmo<area_type_full/>
            <timezone  <area/>
            <geo_lat/>  <city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
            <geo_lon/>  <city_kladr_id>7700000000000</city_kladr_id>
            <unparsed_parts/>  <city_with_type>г Москва</city_with_type>
            <qc/>  <city_type>г</city_type>
        </data>
      </suggestions><city_type_full>город</city_type_full>
    <suggestions>
        <value>г Москва, Серпуховская пл<<city>Москва</value>city>
        <unrestricted_value>г Москва, Серпуховская пл</unrestricted_value>
   <city_area/>
     <data>
            <qc_complete<city_district_fias_id/>
              <qc_house<city_district_kladr_id/>
            <qc_geo   <city_district_with_type/>
            <postal_code>115184</postal_code>  <city_district_type/>
            <postal_box  <city_district_type_full/>
            <country>Россия</country>
  <city_district/>
              <region<settlement_withfias_type>г Москва</region_with_type>id/>
            <region_type>г</region_type>  <settlement_kladr_id/>
            <region  <settlement_with_type_full>город</region_type_full>/>
            <region>Москва</region>
  <settlement_type/>
              <area<settlement_withtype_typefull/>
            <area_type  <settlement/>
              <area<street_type_full/>fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
            <area/>  <street_kladr_id>77000000000702000</street_kladr_id>
            <city  <street_with_type>гtype>Серпуховская Москва<пл</citystreet_with_type>
            <city  <street_type>г<type>пл</citystreet_type>
             <city <street_type_full>город<full>площадь</citystreet_type_full>
              <city>Москва<<street>Серпуховская</city>street>
              <city<house_fias_districtid/>
            <settlement  <house_withkladr_typeid/>
            <settlement  <house_type/>
            <settlement  <house_type_full/>
            <settlement  <house/>
              <street_with_type>Серпуховская пл</street_with_type>
 <block_type/>
           <street_type>пл</street_type>
            <street<block_type_full>площадь</street_type_full>
full/>
              <street>Серпуховская<<block/street>>
             <house <flat_type/>
            <house  <flat_type_full/>
              <house<flat/>
            <block  <flat_typearea/>
            <block  <square_typemeter_fullprice/>
            <block  <flat_price/>
            <flat  <postal_areabox/>
            <square_meter_price/>  <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
            <flat  <fias_pricelevel>7</>fias_level>
            <flat  <kladr_typeid>77000000000702000</>kladr_id>
            <flat_type_full/>  <capital_marker>0</capital_marker>
            <flat  <okato>45286560000</>okato>
            <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>  <oktmo>45376000</oktmo>
            <fias  <tax_level>7<office>7705</fiastax_level>office>
              <kladr<tax_office_id>77000000000702000</kladr_id>
legal/>
              <tax_office>7705</tax_office>
<timezone/>
              <tax<geo_office_legal>7705</tax_office_legal>
lat/>
              <capital<geo_marker>0<lon/capital_marker>>
            <okato>45286560000</okato>  <beltway_hit/>
            <oktmo>45376000</oktmo>  <beltway_distance/>
            <timezone  <qc_geo/>
              <geo<qc_latcomplete/>
              <geo<qc_lonhouse/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestResponse>