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

Ключ

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

Включить страницу
_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/4_1/v2rs/suggest/address

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

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

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

Параметры

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

count

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

language

string(2)нет
Ограничение области поиска

Ответ

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

...

titleПоказать

Ответ

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

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

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

Примеры

Запрос

Блок кода
languagejavascript
{
    

...

Примеры

Запрос

Блок кода
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,
          "valuebeltway_hit": "г Москва, Серпуховская пл"null,
            "unrestrictedbeltway_valuedistance": "г Москва, Серпуховская пл"null,
            "dataqc_geo": {
      null,
          "qc_complete": null,
                "qc_house": null,
          "unparsed_parts": null,
           "postal_codeqc": "115184",null
        }
        "postal_box": null},
      {
          "countryvalue": "Россияг Москва, Серпуховская пл",
                "regionunrestricted_typevalue": "г Москва, Серпуховская пл",
        "data": {
          "regionpostal_type_fullcode": "город115184",
                "regioncountry": "МоскваРоссия",
                "arearegion_fias_typeid": null"0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "arearegion_typekladr_fullid": null"7700000000000",
                "arearegion_with_type": nullМосква",
                "cityregion_type": null"г",
                "cityregion_type_full": null"город",
          "region": "Москва",
          "cityarea_fias_id": null,
                "settlementarea_kladr_typeid": null,
                "settlementarea_with_type_full": null,
                "settlementarea_type": null,
                "streetarea_type_full": "пл"null,
                "street_type_fullarea": "площадь"null,
                "streetcity_fias_id": "Серпуховская0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "house_type"city_kladr_id": null"7700000000000",
                "housecity_with_type_full": null"г Москва",
                "house": null,
   "city_type": "г",
             "blockcity_type_full": null"город",
                "blockcity": null"Москва",
                "flatcity_area": null,
                "flat_type"city_district_fias_id": null,
          "city_district_kladr_id": null,
     "flat": null,
      "city_district_with_type": null,
          "taxcity_district_officetype": "7705"null,
                "kladr_idcity_district_type_full": "77000000000702000"null,
                "okato"city_district": "45286560000"null,
                "oktmo"settlement_fias_id": null,
                "unparsedsettlement_kladr_parts": null,
      id": null,
          "qcsettlement_with_type": null,
            }"settlement_type": null,
        },
        {"settlement_type_full": null,
            "valuesettlement": "г Москва, ул Серпуховская Б."null,
            "unrestrictedstreet_fias_valueid": "г Москва, ул Серпуховская Б.6fe35e69-360a-4d75-8061-066a5c9e669c",
            "data"street_kladr_id": {
      "77000000000702000",
          "qcstreet_with_completetype": "Серпуховская nullпл",
                "qcstreet_housetype": null"пл",
                "postalstreet_type_codefull": "115093площадь",
          "street": "Серпуховская",
          "postalhouse_fias_boxid": null,
                "countryhouse_kladr_id": "Россия"null,
                "regionhouse_type": "г"null,
                "regionhouse_type_full": "город"null,
                "regionhouse": "Москва"null,
                "areablock_type": null,
                "areablock_type_full": null,
     
           "areablock": null,
                "cityflat_type": null,
                "cityflat_type_full": null,
                "cityflat": null,
                "settlementflat_typearea": null,
                "settlementsquare_typemeter_fullprice": null,
                "settlementflat_price": null,
                "streetpostal_typebox": "ул",
     null,
           "streetfias_type_fullid": "улица6fe35e69-360a-4d75-8061-066a5c9e669c",
                "street"fias_level": "Серпуховская Б.7",
                "housekladr_typeid": null"77000000000702000",
                "housecapital_type_fullmarker": null"0",
          "okato": "45286560000",
     "house": null,
       "oktmo": "45376000",
          "blocktax_typeoffice": null"7705",
                "blocktax_office_legal": null,
                "flat_areatimezone": null,
                "flatgeo_typelat": null,
                "flatgeo_lon": null,
                "taxbeltway_officehit": "",
      null,
           "kladrbeltway_iddistance": "77000000000262500"null,
          "qc_geo": null,
          "okatoqc_complete": ""null,
                "oktmo"qc_house": null,
                "unparsed_parts": null,
                "qc": null
        }
      }
    ]
  }


Запрос:

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

Ответ:

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

 

Запрос:

Блок кода
languagehtml/xml
Раскрыть
titleПоказать
<req>
  
<query>москва серпуховская</query> </req>

Ответ:

Блок кода
languagehtml/xml
<SuggestAddressResponse> <house_fias_id/>
    <suggestions>
        <value>г Москва, Серпуховская пл</value>
 <house_kladr_id/>
          <unrestricted_value>г  Москва, Серпуховская пл</unrestricted_value>
<house_type/>
             <data>
 <house_type_full/>
             <qc_complete <house/>
            <qc  <block_housetype/>
            <postal_code>115184</postal_code>
  <block_type_full/>
              <postal_box<block/>
             <country>Россия</country>
 <flat_type/>
              <region<flat_type_type>г<full/region_type>>
             <region_type_full>город</region_type_full>
 <flat/>
              <region>Москва<<flat_area/region>>
            <area_type  <square_meter_price/>
             <area_type_full <flat_price/>
              <area<postal_box/>
              <city_type/><fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
            <city_type_full/>
  <fias_level>7</fias_level>
              <city/>
<kladr_id>77000000000262500</kladr_id>
              <settlement<capital_typemarker>0</>capital_marker>
              <settlement_type_full<okato/>
            <settlement  <oktmo/>
            <street  <tax_type>пл<office/street_type>>
            <street  <tax_typeoffice_full>площадь</street_type_full>
legal/>
             <street>Серпуховская< <timezone/street>>
            <house  <geo_typelat/>
            <house_type_full  <geo_lon/>
             <house <beltway_hit/>
            <block  <beltway_typedistance/>
            <block  <qc_geo/>
              <flat<qc_areacomplete/>
              <flat<qc_typehouse/>
             <flat <unparsed_parts/>
            <tax_office>7705</tax_office>  <qc/>
            <kladr_id>77000000000702000</kladr_id></data>
      </suggestions>
      <okato>45286560000</okato><suggestions>
          <value>г Москва, Серпуховская <oktmoпл</>value>
          <unrestricted_value>г Москва, Серпуховская <unparsed_parts/>пл</unrestricted_value>
          <data>
  <qc/>
        </data>
    </suggestions><postal_code>115184</postal_code>
    <suggestions>
        <value>г Москва, ул Серпуховская Б.<<country>Россия</value>country>
        <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>      <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
        <data>
            <qc_complete/><region_kladr_id>7700000000000</region_kladr_id>
            <qc_house/>
  <region_with_type>г Москва</region_with_type>
              <postal<region_code>115093<type>г</postalregion_code>type>
              <postal<region_type_box/>full>город</region_type_full>
            <country>Россия<  <region>Москва</country>region>
              <region<area_fias_type>г<id/region_type>>
             <region <area_typekladr_full>город</region_type_full>
id/>
              <region>Москва</region>
<area_with_type/>
              <area_type/>
              <area_type_full/>
              <area/>
              <city_type/>
fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
              <city_typekladr_full/>
id>7700000000000</city_kladr_id>
              <city_with_type>г Москва</city_with_type>
    <city/>
            <settlement<city_typetype>г</>city_type>
            <settlement  <city_type_full/>
full>город</city_type_full>
              <settlement<city>Москва</>city>
              <street<city_type>ул<area/street_type>>
              <street<city_district_typefias_full>улица</street_type_full>id/>
            <street>Серпуховская Б.</street>
            <house_type <city_district_kladr_id/>
            <house  <city_district_with_type_full/>
            <house  <city_district_type/>
              <block<city_district_type_full/>
            <block  <city_district/>
              <flat<settlement_fias_areaid/>
            <flat_type  <settlement_kladr_id/>
              <flat<settlement_with_type/>
            <tax  <settlement_office><type/tax_office>>
            <kladr_id>77000000000262500</kladr_id>
  <settlement_type_full/>
              <okato><<settlement/okato>>
             <oktmo/> <street_fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
            <unparsed_parts/>  <street_kladr_id>77000000000702000</street_kladr_id>
            <qc/>   <street_with_type>Серпуховская пл</street_with_type>
        </data>
      </suggestions><street_type>пл</street_type>
    <suggestions>
        <value>г Москва, пл Серпуховская Застава</value><street_type_full>площадь</street_type_full>
        <unrestricted_value>г Москва, пл Серпуховская Застава</unrestricted_value>      <street>Серпуховская</street>
        <data>
            <qc_complete<house_fias_id/>
            <qc_house  <house_kladr_id/>
              <postal<house_code>115191<type/postal_code>>
              <postal<house_type_boxfull/>
            <country>Россия<  <house/country>>
              <region<block_type>г<type/region_type>>
              <region<block_type_full>город</region_type_full>
full/>
             <region>Москва< <block/region>>
            <area  <flat_type/>
             <area <flat_type_full/>
              <area<flat/>
              <city<flat_typearea/>
              <city<square_typemeter_fullprice/>
            <city/>
            <settlement_type<flat_price/>
             <settlement_type_full <postal_box/>
              <settlement/><fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
            <street  <fias_type>пл<level>7</streetfias_type>level>
            <street_type_full>площадь</street_type_full>
  <kladr_id>77000000000702000</kladr_id>
             <street>Серпуховская Застава</street>
<capital_marker>0</capital_marker>
             <house_type/>
 <okato>45286560000</okato>
              <house_type_full/>
<oktmo>45376000</oktmo>
              <tax_office>7705</tax_office>
   <house/>
            <block<tax_office_typelegal/>
            <block  <timezone/>
            <flat  <geo_arealat/>
            <flat  <geo_typelon/>
              <flat<beltway_hit/>
              <tax<beltway_office>7725<distance/tax_office>>
              <kladr<qc_id>77000000000262600<geo/kladr_id>>
              <okato>45296559000<<qc_complete/okato>>
            <oktmo  <qc_house/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestAddressResponse>SuggestResponse>