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

Ключ

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

Включить страницу
_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

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

Параметры

ПараметрТипОбязательный?
ОписаниеqueryдаЗапрос, для которого нужно получить подсказки
count
нет Включить страницу_count_server_count_serverlocations
Описание
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

нетГранулярные подсказки по адресу
language
нетЯзык отображения адреса в результатах поиска (en/ru) 20.3+

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",
          "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": "6fe35e69-360a-4d75-8061-066a5c9e669c",
          "fias_level": "7",
          "kladr_id": "77000000000702000",
          "capital_marker": "0",
          "okato": "45286560000",
          "oktmo": "45376000",
          "tax_office": "7705",
          "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
        }
      }
    ]
  }


Запрос:

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

Ответ:

Раскрыть
titleПоказать
Блок кода
languagehtml/xml
<SuggestResponse>
      <suggestions>
          <value>г Москва, ул Серпуховская Б.</value>
          <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
          <data>
              <postal_code>115093</postal_code>
              <country>Россия</country>
              <region_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</region_fias_id>
              <region_kladr_id>7700000000000</region_kladr_id>
              <region_with_type>г Москва</region_with_type>
              <region_type>г</region_type>
              <region_type_full>город</region_type_full>
              <region>Москва</region>
              <area_fias_id/>
              <area_kladr_id/>
              <area_with_type/>
              <area_type/>
              <area_type_full/>
              <area/>
              <city_fias_id>0c5b2444-70a0-4932-980c-b4dc0d3f02b5</city_fias_id>
              <city_kladr_id>7700000000000</city_kladr_id>
              <city_with_type>г Москва</city_with_type>
              <city_type>г</city_type>
              <city_type_full>город</city_type_full>
              <city>Москва</city>
              <city_area/>
              <city_district_fias_id/>
              <city_district_kladr_id/>
              <city_district_with_type/>
              <city_district_type/>
              <city_district_type_full/>
              <city_district/>
              <settlement_fias_id/>
              <settlement_kladr_id/>

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

              <street_fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</street_fias_id>
              <street_kladr_id>77000000000702000</street_kladr_id>
              <street_with_type>Серпуховская пл</street_with_type>
              <street_type>пл</street_type>
              <street_type_full>площадь</street_type_full>
              <street>Серпуховская</street>
              <house_fias_id/>
              <house_kladr_id/>
              <house_type/>
              <house_type_full/>
              <house/>
              <block_type/>
              <block_type_full/>
              <block/>
              <flat_type/>
              <flat_type_full/>
              <flat/>
              <flat_area/>
              <square_meter_price/>
              <flat_price/>
              <postal_box/>
              <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
              <fias_level>7</fias_level>
              <kladr_id>77000000000702000</kladr_id>
              <capital_marker>0</capital_marker>
              <okato>45286560000</okato>
              <oktmo>45376000</oktmo>
              <tax_office>7705</tax_office>
              <tax_office_legal/>
              <timezone/>
              <geo_lat/>
              <geo_lon/>
              <beltway_hit/>
              <beltway_distance/>
              <qc_geo/>
              <qc_complete/>
              <qc_house/>
              <unparsed_parts/>
              <qc/>
          </data>
      </suggestions>
  </SuggestResponse>