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

Ключ

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

Включить страницу
_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": "москва серпуховская" }' \
    httpshttp://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

...

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]

...

Параметры

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

Ответ

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

Ответ

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

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

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

Примеры

Запрос

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

Ответ:

javascript
{
    "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": "ул Серпуховская Б.",
   
Раскрыть
titleПоказать
Блок кода
languagejs
{
    "suggestions": [
        {
  "street_type": "ул",
          "boundedstreet_type_valuefull": null"улица",
            "valuestreet": "г Москва, Серпуховская плБ.",
            "unrestrictedhouse_fias_valueid": "г Москва, Серпуховская пл",
  null,
          "datahouse_kladr_id": {null,
          "house_type": null,
          "qchouse_type_completefull": null,
                "qc_house": null,
                "postalblock_codetype": "115184"null,
                "postal_box"block_type_full": null,
                "countryblock": "Россия"null,
                "region"flat_type": "г"null,
                "regionflat_type_full": "город"null,
                "regionflat": "Москва"null,
                "flat_area_type": null,
                "area_type_full"square_meter_price": null,
          "flat_price": null,
          "areapostal_box": null,
          "fias_id": "601875e2-717a-4c30-a3c4-1fb49e67d93f",
          "cityfias_typelevel": "г7",
          "kladr_id": "77000000000262500",
          "citycapital_type_fullmarker": "город0",
          "okato": null,
          "cityoktmo": "Москва"null,
                "settlementtax_typeoffice": null,
                "settlementtax_typeoffice_fulllegal": null,
                "settlementtimezone": null,
                "streetgeo_typelat": "пл"null,
          "geo_lon": null,
          "streetbeltway_type_fullhit": "площадь"null,
                "streetbeltway_distance": "Серпуховская"null,
                "houseqc_typegeo": null,
                "house_type_full"qc_complete": null,
                "qc_house": null,
                "blockunparsed_typeparts": null,
                "blockqc": null,
    null
        }
     "flat_area": null },
        {
        "flat_typevalue": null"г Москва,
 Серпуховская пл",
        "unrestricted_value":  Москва, Серпуховская пл",
  "flat": null,
     "data": {
          "fiaspostal_idcode": null"115184",
          "country": "Россия",
           "kladrregion_fias_id": "770000000007020000c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "tax_office"region_kladr_id": "77057700000000000",
                "taxregion_officewith_legaltype": null"г Москва",
                "okatoregion_type": "45286560000г",
                "oktmoregion_type_full": null"город",
                "unparsed_partsregion": null"Москва",
                "qc"area_fias_id": null,
          "area_kladr_id": null,
  }
        }"area_with_type": null,
        {
    "area_type": null,
          "boundedarea_type_valuefull": null,
            "valuearea": "г Москва, ул Серпуховская Б." null,
            "unrestrictedcity_fias_valueid": "г Москва, ул Серпуховская Б.0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
            "datacity_kladr_id": {
    "7700000000000",
            "qccity_with_completetype": nullМосква",
                "qccity_housetype": null,
     "г",
           "postalcity_type_codefull": "115093город",
          "city": "Москва",
          "postalcity_boxarea": null,
                "country"city_district_fias_id": "Россия"null,
                "region_typecity_district_kladr_id": "г"null,
                "region"city_district_with_type_full": "город"null,
                "region"city_district_type": "Москва"null,
                "area"city_district_type_full": null,
          "city_district": null,
          "areasettlement_typefias_fullid": null,
                "area"settlement_kladr_id": null,
                "citysettlement_with_type": "г",
       null,
          "citysettlement_type_full": "город"null,
                "citysettlement_type_full": "Москва"null,
                "settlement_type": null,
                "settlementstreet_typefias_fullid": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
          "street_kladr_id": "77000000000702000",
     "settlement": null,
     "street_with_type": "Серпуховская пл",
          "street_type": "улпл",
                "street_type_full": "улицаплощадь",
                "street": "Серпуховская Б.",
                "house_typefias_id": null,
                "house_typekladr_fullid": null,
                "house_type": null,
                "blockhouse_type_full": null,
       null,
          "blockhouse": null,
                "flat_area"block_type": null,
                "flatblock_type_full": null,
                "flatblock": null,
                "fiasflat_idtype": null,
                "kladrflat_type_idfull": "77000000000262500"null,
          "flat": null,
     "tax_office": null,
      "flat_area": null,
          "taxsquare_officemeter_legalprice": null,
                "okato"flat_price": null,
                "oktmo"postal_box": null,
                "unparsedfias_partsid": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
                "qcfias_level": null"7",
            }
        }"kladr_id": "77000000000702000",
        {
  "capital_marker": "0",
          "bounded_valueokato": null"45286560000",
            "valueoktmo": "г Москва, пл Серпуховская Застава45376000",
            "unrestrictedtax_valueoffice": "г Москва, пл Серпуховская Застава7705",
            "datatax_office_legal": {
null,
          "timezone": null,
          "qcgeo_completelat": null,
                "qc_house"geo_lon": null,
                "postal_code"beltway_hit": "115191"null,
                "postalbeltway_boxdistance": null,
                "country"qc_geo": "Россия"null,
          "qc_complete": null,
     "region_type": "г",
      "qc_house": null,
          "regionunparsed_type_fullparts": "город"null,
          "qc": null
      "region": "Москва",  }
      }
    ]
  }


Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>  "area_type": null,
      <suggestions>
          "area_type_full": null,
   <value>г Москва, ул Серпуховская Б.</value>
          <unrestricted_value>г Москва, ул "area": null,Серпуховская Б.</unrestricted_value>
                "city_type": "г",<data>
                "city_type_full": "город",
<postal_code>115093</postal_code>
              <country>Россия</country>
    "city": "Москва",
         <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
       "settlement_type": null,
         <region_kladr_id>7700000000000</region_kladr_id>
              "settlement<region_typewith_full": null,type>г Москва</region_with_type>
              <region_type>г</region_type>
  "settlement": null,
           <region_type_full>город</region_type_full>
     "street_type": "пл",
        <region>Москва</region>
        "street_type_full": "площадь",
      <area_fias_id/>
            "street": "Серпуховская Застава",
  <area_kladr_id/>
               "house<area_with_type": null,/>
                "house<area_type_full": null,/>
                "house": null,<area_type_full/>
                "block_type": null,<area/>
                "block": null,<city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
              <city_kladr_id>7700000000000</city_kladr_id>
   "flat_area": null,
          <city_with_type>г Москва</city_with_type>
     "flat_type": null,
        <city_type>г</city_type>
        "flat": null,
     <city_type_full>город</city_type_full>
           "fias_id": null,
  <city>Москва</city>
              "kladr_id": "77000000000262600",<city_area/>
              <city_district_fias_id/>
  "tax_office": "7725",
           <city_district_kladr_id/>
     "tax_office_legal": null,
        <city_district_with_type/>
        "okato": "45296559000",
     <city_district_type/>
           "oktmo": null,
  <city_district_type_full/>
              "unparsed_parts": null,<city_district/>
                "qc": null
<settlement_fias_id/>
              }<settlement_kladr_id/>
        }
  ]
}

 

Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestAddressResponse>
      <settlement_with_type/>
      <suggestions>
        <bounded<settlement_valuetype/>
         <value>г   Москва, Серпуховская пл</value>
<settlement_type_full/>
         <unrestricted_value>г Москва, Серпуховская пл</unrestricted_value>
     <settlement/>
              <data><street_fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</street_fias_id>
            <qc_complete/>  <street_kladr_id>77000000000262500</street_kladr_id>
            <qc_house/>  <street_with_type>ул Серпуховская Б.</street_with_type>
            <postal  <street_code>115184<type>ул</postalstreet_code>type>
            <postal_box/>
  <street_type_full>улица</street_type_full>
              <street>Серпуховская <country>Россия<Б.</country>street>
            <region_type>г</region_type>  <house_fias_id/>
            <region  <house_typekladr_full>город</region_type_full>id/>
            <region>Москва</region>
            <area<house_type/>
            <area  <house_type_full/>
             <area <house/>
              <city<block_type>г<type/city_type>>
              <city<block_type_full>город</city_type_full>
full/>
              <city>Москва<<block/city>>
            <settlement  <flat_type/>
            <settlement  <flat_type_full/>
              <settlement<flat/>
            <street  <flat_type>пл<area/street_type>>
              <street<square_typemeter_full>площадь</street_type_full>price/>
            <street>Серпуховская</street>
  <flat_price/>
             <house <postal_typebox/>
            <house_type_full/>
       <fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
     <house/>
            <block_type/><fias_level>7</fias_level>
            <block/>
  <kladr_id>77000000000262500</kladr_id>
              <flat<capital_areamarker>0</>capital_marker>
            <flat_type  <okato/>
             <flat <oktmo/>
              <fias<tax_idoffice/>
             <kladr_id>77000000000702000</kladr_id> <tax_office_legal/>
            <tax_office>7705</tax_office>  <timezone/>
            <tax_office_legal  <geo_lat/>
            <okato>45286560000</okato>  <geo_lon/>
            <oktmo  <beltway_hit/>
            <unparsed  <beltway_partsdistance/>
              <qc_geo/>
          </data>
    <<qc_complete/suggestions>>
    <suggestions>
          <bounded<qc_valuehouse/>
          <value>г Москва, ул Серпуховская Б.</value>
 <unparsed_parts/>
          <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
<qc/>
         <data> </data>
      </suggestions>
      <qc_complete/><suggestions>
          <value>г  <qc_house/>Москва, Серпуховская пл</value>
          <unrestricted_value>г Москва, Серпуховская <postal_code>115093<пл</postalunrestricted_code>value>
          <data>
  <postal_box/>
            <country>Россия</country><postal_code>115184</postal_code>
            <region_type>г</region_type>  <country>Россия</country>
              <region_type_full>город<_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_typefias_full>id>
            <region>Москва</region>
            <area_type/>  <region_kladr_id>7700000000000</region_kladr_id>
            <area  <region_typewith_full/>
type>г Москва</region_with_type>
              <area/>
<region_type>г</region_type>
              <city<region_type_type>г<full>город</cityregion_type_type>full>
            <city_type_full>город</city_type_full>  <region>Москва</region>
            <city>Москва</city>
  <area_fias_id/>
             <settlement_type <area_kladr_id/>
              <settlement<area_with_type_full/>
            <settlement  <area_type/>
            <street_type>ул</street_type>
  <area_type_full/>
              <street_type_full>улица</street_type_full>
<area/>
              <city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
  <street>Серпуховская Б.</street>
            <house_type/><city_kladr_id>7700000000000</city_kladr_id>
            <house  <city_typewith_full/>type>г Москва</city_with_type>
            <house/>  <city_type>г</city_type>
            <block  <city_type/>
_full>город</city_type_full>
              <block<city>Москва</>city>
             <flat <city_area/>
              <flat_type<city_district_fias_id/>
            <flat  <city_district_kladr_id/>
              <fias_id<city_district_with_type/>
              <kladr<city_district_id>77000000000262500<type/kladr_id>>
             <tax_office <city_district_type_full/>
             <tax_office_legal <city_district/>
              <okato<settlement_fias_id/>
            <oktmo  <settlement_kladr_id/>
              <unparsed<settlement_with_partstype/>

              <qc<settlement_type/>
        </data>
      </suggestions><settlement_type_full/>
    <suggestions>
          <bounded_value<settlement/>
        <value>г   Москва, пл Серпуховская Застава</value>
 <street_fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
          <unrestricted_value>г Москва, пл Серпуховская Застава</unrestricted_value>
<street_kladr_id>77000000000702000</street_kladr_id>
              <data>
<street_with_type>Серпуховская пл</street_with_type>
             <qc <street_completetype>пл</>street_type>
             <qc_house/> <street_type_full>площадь</street_type_full>
            <postal_code>115191</postal_code>
  <street>Серпуховская</street>
              <postal<house_fias_boxid/>
            <country>Россия</country>  <house_kladr_id/>
            <region  <house_type>г<type/region_type>>
            <region  <house_type_full>город</region_type_full>full/>
            <region>Москва<  <house/region>>
              <area<block_type/>
            <area  <block_type_full/>
            <area  <block/>
            <city  <flat_type>г<type/city_type>>
            <city  <flat_type_full>город</city_type_full>
full/>
              <city>Москва<<flat/city>>
              <settlement<flat_typearea/>
             <settlement <square_typemeter_fullprice/>
              <settlement<flat_price/>
              <street<postal_type>пл<box/street_type>>
            <street_type_full>площадь</street_type_full>
  <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
             <street>Серпуховская Застава</street>
<fias_level>7</fias_level>
             <house <kladr_typeid>77000000000702000</>kladr_id>
             <house_type_full/> <capital_marker>0</capital_marker>
            <house  <okato>45286560000</>okato>
              <block_type<oktmo>45376000</>oktmo>
            <block/>
  <tax_office>7705</tax_office>
              <flat<tax_office_arealegal/>
            <flat_type  <timezone/>
              <flat<geo_lat/>
            <fias  <geo_idlon/>
            <kladr  <beltway_id>77000000000262600<hit/kladr_id>>
            <tax  <beltway_office>7725<distance/tax_office>>
            <tax_office_legal  <qc_geo/>
              <okato>45296559000<<qc_complete/okato>>
            <oktmo  <qc_house/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestAddressResponse>SuggestResponse>