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

Ключ

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

Включить страницу
_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": "москва серпуховская" }' \
  https  http://ВАШ_СЕРВЕР:ПОРТ/suggestions.dadata.ru/suggestions//api/4_1/rs/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_server
locations

language

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

Ответ

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

...

titleПоказать

Ответ

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

Раскрыть
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": "г",

...

Примеры

Запрос

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagejs
{
    "suggestions": [
        {
  "region_type_full": "город",
          "valueregion": "г Москва, ул Серпуховская Б.",
            "unrestrictedarea_fias_valueid": "г Москва, ул Серпуховская Б." null,
          "area_kladr_id": null,
            "data"area_with_type": {
      null,
          "qcarea_completetype": null,
                "qc_house"area_type_full": null,
          "area": null,
       "qc_geo   "city_fias_id": null"0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "postal_code"city_kladr_id": "1150937700000000000",
                "postalcity_with_boxtype": null"г Москва",
                "countrycity_type": "Россияг",
                "region_fias_id"city_type_full": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5город",
                "region_kladr_id"city": "7700000000000Москва",
                "regioncity_with_typearea": "г Москва"null,
          "city_district_fias_id": null,
          "region_typecity_district_kladr_id": "г"null,
                "region"city_district_with_type_full": "город"null,
                "region"city_district_type": "Москва"null,
                "area_fias_id"city_district_type_full": null,
     
           "areacity_kladr_iddistrict": null,
                "area_with_type"settlement_fias_id": null,
                "areasettlement_kladr_typeid": null,
                "area"settlement_with_type_full": null,
                "area"settlement_type": null,
                "citysettlement_fiastype_idfull": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5"null,
                "city_kladr_idsettlement": "7700000000000"null,
                "city_with_type"street_fias_id": "г Москва601875e2-717a-4c30-a3c4-1fb49e67d93f",
                "citystreet_kladr_typeid": "г77000000000262500",
                "city"street_with_type_full": "городул Серпуховская Б.",
                "city"street_type": "Москваул",
      
          "citystreet_type_districtfull": null"улица",
                "settlement_fias_id"street": null"Серпуховская Б.",
                "settlement_kladr"house_fias_id": null,
                "settlementhouse_withkladr_typeid": null,
                "settlementhouse_type": null,
                "settlementhouse_type_full": null,
                "settlement"house": null,
     
           "streetblock_fias_idtype": "601875e2-717a-4c30-a3c4-1fb49e67d93f"null,
                "streetblock_kladrtype_idfull": "77000000000262500"null,
          "block": null,
          "streetflat_with_type": "ул Серпуховская Б."null,
                "streetflat_type_full": "ул"null,
          "flat": null,
          "streetflat_type_fullarea": "улица"null,
                "street"square_meter_price": "Серпуховская Б."null,
                "house_fias_id"flat_price": null,
                "housepostal_kladr_idbox": null,
                "housefias_typeid": null"601875e2-717a-4c30-a3c4-1fb49e67d93f",
                "housefias_type_fulllevel": null"7",
          "kladr_id": "77000000000262500",
          "housecapital_marker": null"0",
                "block_typeokato": null,
                "block_type_full"oktmo": null,
                "block"tax_office": null,
                "flat_area"tax_office_legal": null,

          "timezone": null,
          "squaregeo_meter_pricelat": null,
                "flatgeo_pricelon": null,
                "flatbeltway_typehit": null,
                "flatbeltway_type_fulldistance": null,
                "flat"qc_geo": null,
                "fiasqc_idcomplete": "601875e2-717a-4c30-a3c4-1fb49e67d93f",
       null,
          "fiasqc_levelhouse": "7"null,
          "unparsed_parts": null,
          "kladr_idqc": "77000000000262500",null
        }
        "tax_office": null},
      {
          "tax_office_legal": null"value": "г Москва, Серпуховская пл",
        "unrestricted_value": "г Москва, Серпуховская пл",
        "capital_markerdata": "0",
    {
            "okatopostal_code": null"115184",
                "oktmo"country": null"Россия",
                "timezoneregion_fias_id": null"0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
                "georegion_kladr_latid": null"7700000000000",
                "georegion_with_lontype": null"г Москва",
                "beltwayregion_hittype": null"г",
                "beltway_distance"region_type_full": null"город",
                "unparsed_parts"region": null"Москва",
                "qcarea_fias_id": null,
          "area_kladr_id": null,
  }
        }"area_with_type": null,
        {
    "area_type": null,
          "valuearea_type_full": "г Москва, Серпуховская пл"null,
            "unrestricted_valuearea": "г Москва, Серпуховская пл",
  null,
          "datacity_fias_id": {
      "0c5b2444-70a0-4932-980c-b4dc0d3f02b5",
          "qccity_kladr_completeid": null"7700000000000",
                "qc_house": null"city_with_type": "г Москва",
                "qc_geo"city_type": null"г",
                "postalcity_type_codefull": "115184город",
                "postal_box"city": null"Москва",
                "country"city_area": "Россия"null,
                "regioncity_district_fias_id": null,
                "region"city_district_kladr_id": null,
                "regioncity_district_with_type": "г Москва"null,
                "regioncity_district_type": "г"null,
                "region"city_district_type_full": "город"null,
                "region": "Москва",
      "city_district": null,
          "areasettlement_fias_id": null,
                "area"settlement_kladr_id": null,
                "areasettlement_with_type": null,
                "areasettlement_type": null,
                "area"settlement_type_full": null,
                "areasettlement": null,
                "city"street_fias_id": null"6fe35e69-360a-4d75-8061-066a5c9e669c",
                "citystreet_kladr_id": null"77000000000702000",
                "citystreet_with_type": "гСерпуховская Москвапл",
                "city"street_type": "гпл",
                "citystreet_type_full": "городплощадь",
                "city"street": "МоскваСерпуховская",
                "cityhouse_fias_districtid": null,
                "settlement_fias"house_kladr_id": null,
          "house_type": null,
          "settlementhouse_kladrtype_idfull": null,
     
           "settlement_with_typehouse": null,
                "settlement"block_type": null,
                "settlementblock_type_full": null,
                "settlementblock": null,
                "street_fias_id"flat_type": null,
                "streetflat_kladrtype_idfull": null,
          "flat": null,
     "street_with_type": "Серпуховская пл",
      "flat_area": null,
          "streetsquare_meter_typeprice": "пл"null,
          "flat_price": null,
          "streetpostal_type_fullbox": "площадь"null,
                "streetfias_id": "Серпуховская6fe35e69-360a-4d75-8061-066a5c9e669c",
                "house_fias_idlevel": null"7",
                "house_kladr_id": null"77000000000702000",
                "housecapital_typemarker": null"0",
                "house_type_full"okato": null"45286560000",
                "house"oktmo": null"45376000",
                "blocktax_typeoffice": null"7705",
                "blocktax_typeoffice_fulllegal": null,
                "block": null,
      "timezone": null,
          "flatgeo_arealat": null,
                "square_meter_price"geo_lon": null,
                "flatbeltway_pricehit": null,
                "flat_type"beltway_distance": null,
                "flatqc_type_fullgeo": null,
                "flat"qc_complete": null,
                "fiasqc_idhouse": "6fe35e69-360a-4d75-8061-066a5c9e669c"null,
                "fiasunparsed_levelparts": "7"null,
          "qc": null
       "kladr_id": "77000000000702000", }
      }
    ]
  }


Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>"tax_office": "7705",
      <suggestions>
          "tax_office_legal": "7705",
   <value>г Москва, ул Серпуховская Б.</value>
             "capital_marker": "0",
   <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
             "okato": "45286560000",
<data>
              <postal_code>115093</postal_code>
    "oktmo": "45376000",
         <country>Россия</country>
       "timezone": null,
       <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
           "geo_lat": null,
  <region_kladr_id>7700000000000</region_kladr_id>
              "geo_lon": null,<region_with_type>г Москва</region_with_type>
                "beltway_hit": null,<region_type>г</region_type>
                "beltway_distance": null,<region_type_full>город</region_type_full>
              <region>Москва</region>
  "unparsed_parts": null,
           <area_fias_id/>
     "qc": null
        <area_kladr_id/>
    }
        }
  ]
}

 

Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>
    <suggestions>
  <area_with_type/>
              <area_type/>
          <value>г Москва, ул Серпуховская Б.</value>
 <area_type_full/>
          <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
<area/>
              <data>
<city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
              <qc<city_kladr_complete/>
id>7700000000000</city_kladr_id>
              <qc_house/><city_with_type>г Москва</city_with_type>
            <qc  <city_geotype>г</>city_type>
              <postal<city_type_code>115093<full>город</postalcity_type_code>full>
            <postal_box/>
  <city>Москва</city>
             <country>Россия</country> <city_area/>
            <region  <city_district_fias_id/>
              <region<city_district_kladr_id/>
              <region<city_district_with_type>г Москва</region_with_type>
type/>
              <region<city_district_type>г<type/region_type>>
            <region  <city_district_type_full>город</region_type_full>
full/>
              <region>Москва<<city_district/region>>
            <area  <settlement_fias_id/>
            <area  <settlement_kladr_id/>
              <area<settlement_with_type/>
              <area<settlement_type/>
              <area<settlement_type_full/>
            <area  <settlement/>
            <city  <street_fias_id/>id>601875e2-717a-4c30-a3c4-1fb49e67d93f</street_fias_id>
            <city  <street_kladr_id/>
id>77000000000262500</street_kladr_id>
             <city <street_with_type>г Москва</citytype>ул Серпуховская Б.</street_with_type>
              <city<street_type>г<type>ул</citystreet_type>
              <city<street_type_full>город<full>улица</citystreet_type_full>
            <city>Москва</city>
            <city_district/><street>Серпуховская Б.</street>
            <settlement  <house_fias_id/>
              <settlement<house_kladr_id/>
            <settlement_with  <house_type/>
            <settlement_type/>
            <settlement<house_type_full/>
             <settlement <house/>
            <street_fias_id  <block_type/>
            <street  <block_kladrtype_idfull/>
            <street_with_type>ул Серпуховская Б.</street_with_type>
<block/>
              <street<flat_type>ул<type/street_type>>
            <street  <flat_type_full>улица</street_type_full>
full/>
             <street>Серпуховская Б.<<flat/street>>
             <house_fias_id <flat_area/>
            <house  <square_kladrmeter_idprice/>
              <house<flat_typeprice/>
            <house_type_full  <postal_box/>
            <house/>  <fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
            <block  <fias_typelevel>7</>fias_level>
              <block<kladr_type_full/>id>77000000000262500</kladr_id>
            <block/>
  <capital_marker>0</capital_marker>
              <flat_area<okato/>
            <square_meter_price  <oktmo/>
            <flat  <tax_priceoffice/>
              <flat<tax_office_typelegal/>
            <flat_type_full  <timezone/>
              <flat<geo_lat/>
              <fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id><geo_lon/>
            <fias  <beltway_level>7<hit/fias_level>>
            <kladr  <beltway_id>77000000000262500<distance/kladr_id>>
             <tax <qc_officegeo/>
              <tax<qc_office_legalcomplete/>
            <capital  <qc_marker>0<house/capital_marker>>
              <okato<unparsed_parts/>
            <oktmo  <qc/>
            <timezone</>data>
      </suggestions>
      <geo_lat/><suggestions>
          <value>г  <geo_lon/>
Москва, Серпуховская пл</value>
          <unrestricted_value>г Москва, Серпуховская  <beltway_hit/>пл</unrestricted_value>
          <data>
  <beltway_distance/>
            <unparsed<postal_partscode>115184</>postal_code>
            <qc  <country>Россия</>country>
        </data>
      </suggestions><region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
    <suggestions>
        <value>г Москва, Серпуховская пл</value>
   <region_kladr_id>7700000000000</region_kladr_id>
     <unrestricted_value>г Москва, Серпуховская пл</unrestricted_value>
        <data>
<region_with_type>г Москва</region_with_type>
              <qc<region_completetype>г</>region_type>
            <qc_house/>  <region_type_full>город</region_type_full>
            <qc_geo/>  <region>Москва</region>
            <postal_code>115184</postal_code>
  <area_fias_id/>
             <postal_box <area_kladr_id/>
              <area_with_type/>
   <country>Россия</country>
            <region_fias_id<area_type/>
              <region<area_kladrtype_idfull/>
              <region_with_type<area/>
            <region_type/>  <city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
            <region  <city_typekladr_full>город<id>7700000000000</regioncity_typekladr_full>id>
             <region>Москва</region>
 <city_with_type>г Москва</city_with_type>
              <area<city_fias_id/>type>г</city_type>
            <area  <city_kladrtype_id/>
full>город</city_type_full>
             <area_with_type/> <city>Москва</city>
            <area  <city_typearea/>
              <area<city_district_typefias_fullid/>
            <area  <city_district_kladr_id/>
              <city_district_fiaswith_idtype/>
              <city_kladrdistrict_idtype/>
              <city_with_type>г Москва</city_with_type>district_type_full/>
              <city_type>г<district/city_type>>
              <city<settlement_typefias_full>город</city_type_full>id/>
            <city>Москва</city>  <settlement_kladr_id/>
            <city_district  <settlement_with_type/>
              <settlement_fias_idtype/>
              <settlement_kladrtype_idfull/>
              <settlement_with_type/>
               <settlement_type/>
 <street_fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
              <settlement<street_typekladr_full/>
id>77000000000702000</street_kladr_id>
              <settlement/><street_with_type>Серпуховская пл</street_with_type>
              <street_fias_id/>type>пл</street_type>
              <street_kladrtype_id/>full>площадь</street_type_full>
            <street_with_type>Серпуховская пл</street_with_type>  <street>Серпуховская</street>
            <street_type>пл</street_type>
  <house_fias_id/>
              <street<house_typekladr_full>площадь</street_type_full>
id/>
             <street>Серпуховская</street>
 <house_type/>
              <house_fiastype_idfull/>
              <house_kladr_id/>
              <house<block_type/>
              <house<block_type_full/>
              <house<block/>
            <block  <flat_type/>
            <block  <flat_type_full/>
              <block<flat/>
              <flat_area/>
              <square_meter_price/>
             <square <flat_meter_price/>
            <flat  <postal_pricebox/>
            <flat_type/>  <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
            <flat_type_full/>
  <fias_level>7</fias_level>
             <flat/> <kladr_id>77000000000702000</kladr_id>
            <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>  <capital_marker>0</capital_marker>
            <fias_level>7</fias_level>  <okato>45286560000</okato>
            <kladr_id>77000000000702000</kladr_id>  <oktmo>45376000</oktmo>
              <tax_office>7705</tax_office>
              <tax_office_legal>7705</tax_office_legal>legal/>
            <capital_marker>0</capital_marker>  <timezone/>
            <okato>45286560000</okato>
  <geo_lat/>
              <oktmo>45376000<<geo_lon/oktmo>>
              <timezone<beltway_hit/>
            <geo  <beltway_latdistance/>
              <geo<qc_longeo/>
              <beltway<qc_hitcomplete/>
            <beltway  <qc_distancehouse/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestResponse>