Запрос

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

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Token ${API_KEY}" \
  -d '{ "query": "москва серпуховская" }' \
  https://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

Параметры

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

Ответ

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

Примеры

Запрос

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

Ответ:

{
    "suggestions": [
        {
            "value": "г Москва, ул Серпуховская Б.",
            "unrestricted_value": "г Москва, ул Серпуховская Б.",
            "data": {
                "qc_complete": null,
                "qc_house": null,
                "qc_geo": null,
                "postal_code": "115093",
                "postal_box": null,
                "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_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_area": null,
                "square_meter_price": null,
                "flat_price": null,
                "flat_type": null,
                "flat_type_full": null,
                "flat": null,
                "fias_id": "601875e2-717a-4c30-a3c4-1fb49e67d93f",
                "fias_level": "7",
                "kladr_id": "77000000000262500",
                "tax_office": null,
                "tax_office_legal": null,
                "capital_marker": "0",
                "okato": null,
                "oktmo": null,
                "timezone": null,
                "geo_lat": null,
                "geo_lon": null,
                "beltway_hit": null,
                "beltway_distance": null,
                "unparsed_parts": null,
                "qc": null
            }
        },
        {
            "value": "г Москва, Серпуховская пл",
            "unrestricted_value": "г Москва, Серпуховская пл",
            "data": {
                "qc_complete": null,
                "qc_house": null,
                "qc_geo": null,
                "postal_code": "115184",
                "postal_box": null,
                "country": "Россия",
                "region_fias_id": null,
                "region_kladr_id": null,
                "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": null,
                "city_kladr_id": null,
                "city_with_type": "г Москва",
                "city_type": "г",
                "city_type_full": "город",
                "city": "Москва",
                "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": null,
                "street_kladr_id": null,
                "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_area": null,
                "square_meter_price": null,
                "flat_price": null,
                "flat_type": null,
                "flat_type_full": null,
                "flat": null,
                "fias_id": "6fe35e69-360a-4d75-8061-066a5c9e669c",
                "fias_level": "7",
                "kladr_id": "77000000000702000",
                "tax_office": "7705",
                "tax_office_legal": "7705",
                "capital_marker": "0",
                "okato": "45286560000",
                "oktmo": "45376000",
                "timezone": null,
                "geo_lat": null,
                "geo_lon": null,
                "beltway_hit": null,
                "beltway_distance": null,
                "unparsed_parts": null,
                "qc": null
            }
        }
  ]
}

 

Запрос:

<req>
  <query>москва серпуховская</query>
</req>

Ответ:

<SuggestResponse>
    <suggestions>
        <value>г Москва, ул Серпуховская Б.</value>
        <unrestricted_value>г Москва, ул Серпуховская Б.</unrestricted_value>
        <data>
            <qc_complete/>
            <qc_house/>
            <qc_geo/>
            <postal_code>115093</postal_code>
            <postal_box/>
            <country>Россия</country>
            <region_fias_id/>
            <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/>
            <city_kladr_id/>
            <city_with_type>г Москва</city_with_type>
            <city_type>г</city_type>
            <city_type_full>город</city_type_full>
            <city>Москва</city>
            <city_district/>
            <settlement_fias_id/>
            <settlement_kladr_id/>
            <settlement_with_type/>
            <settlement_type/>
            <settlement_type_full/>
            <settlement/>
            <street_fias_id/>
            <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_area/>
            <square_meter_price/>
            <flat_price/>
            <flat_type/>
            <flat_type_full/>
            <flat/>
            <fias_id>601875e2-717a-4c30-a3c4-1fb49e67d93f</fias_id>
            <fias_level>7</fias_level>
            <kladr_id>77000000000262500</kladr_id>
            <tax_office/>
            <tax_office_legal/>
            <capital_marker>0</capital_marker>
            <okato/>
            <oktmo/>
            <timezone/>
            <geo_lat/>
            <geo_lon/>
            <beltway_hit/>
            <beltway_distance/>
            <unparsed_parts/>
            <qc/>
        </data>
    </suggestions>
    <suggestions>
        <value>г Москва, Серпуховская пл</value>
        <unrestricted_value>г Москва, Серпуховская пл</unrestricted_value>
        <data>
            <qc_complete/>
            <qc_house/>
            <qc_geo/>
            <postal_code>115184</postal_code>
            <postal_box/>
            <country>Россия</country>
            <region_fias_id/>
            <region_kladr_id/>
            <region_with_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/>
            <city_kladr_id/>
            <city_with_type>г Москва</city_with_type>
            <city_type>г</city_type>
            <city_type_full>город</city_type_full>
            <city>Москва</city>
            <city_district/>
            <settlement_fias_id/>
            <settlement_kladr_id/>
            <settlement_with_type/>
            <settlement_type/>
            <settlement_type_full/>
            <settlement/>
            <street_fias_id/>
            <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_area/>
            <square_meter_price/>
            <flat_price/>
            <flat_type/>
            <flat_type_full/>
            <flat/>
            <fias_id>6fe35e69-360a-4d75-8061-066a5c9e669c</fias_id>
            <fias_level>7</fias_level>
            <kladr_id>77000000000702000</kladr_id>
            <tax_office>7705</tax_office>
            <tax_office_legal>7705</tax_office_legal>
            <capital_marker>0</capital_marker>
            <okato>45286560000</okato>
            <oktmo>45376000</oktmo>
            <timezone/>
            <geo_lat/>
            <geo_lon/>
            <beltway_hit/>
            <beltway_distance/>
            <unparsed_parts/>
            <qc/>
        </data>
    </suggestions>
</SuggestResponse>