Список всех регионов
Справочник регионов (2.0)
2GIS API Support: api@2gis.ru URL: https://docs.2gis.com/
Получение списка регионов по параметрам
Осуществляет выдачу списка всех существующих регионов по заданным параметрам.
query Parameters
key required | string Уникальный ключ пользователя API. |
page | integer Default: 1 Номер запрашиваемой страницы. |
page_size | integer [ 1 .. 2000 ] Default: 1000 Количество результатов поиска, выводимых на одной странице. |
locale | string Локаль, с которой производится поиск и отдаются результаты. |
locale_filter | Array of strings Example: locale_filter=ru_RU Список локалей через запятую, по которым нужно фильтровать. |
country_code_filter | string Example: country_code_filter=ru Список кодов страны через запятую, по которым нужно фильтровать. |
fields | Array of strings Дополнительные поля, которые необходимо отобразить в ответе, перечисляются через запятую.
|
type | string Default: "region" Examples:
Фильтр по типу объекта, перечисляются через запятую.
|
Responses
Response Schema: application/jsonapplication/jsontext/xml
application/json
application/json
text/xml
required | object (ObjMeta) Метаданные ответа |
required | object Основной результат |
Response Schema: application/json
object (ObjMetaBadRequest) Метаданные ответа |
Response Schema: application/json
object (ObjMetaForbidden) Метаданные ответа |
Response Schema: application/json
object (ObjMetaNotFound) Метаданные ответа |
Response Schema: application/json
object (ObjMetaServerError) Метаданные ответа |
https://catalog.api.2gis.com/2.0/region/list
Response samples
- 200
- 400
- 403
- 404
- 500
Content type
application/json
application/json
text/xml
{- "meta": {
- "code": 200,
- "api_version": "dev",
- "issue_date": "string"
}, - "result": {
- "items": [
- {
- "id": "123456",
- "type": "region",
- "seo": {
- "title": "string",
- "description": "string"
}, - "locale": "ru_RU",
- "code": "nnovgorod",
- "locales": "ru_RU",
- "statistics": {
- "branch_count": 0,
- "route_count": 0,
- "rubric_count": 0,
- "org_count": 0
}, - "name_grammatical_cases": {
- "prepositional": "Новосибирске",
- "accusative": "Новосибирск",
- "dative": "Новосибирску",
- "genitive": "Новосибирска"
}, - "settlements": [
- "string"
], - "default_pos": {
- "lat": "56.7724145",
- "zoom": "11",
- "lon": "43.2988455"
}, - "satellites": [
- {
- "id": "123456",
- "name": "Москва",
- "geometry": "POLYGON((83.4457915421126 53.4866943332863,84.0879338133862 53.4866943332863,84.0879338133862 53.1585977185895,83.4457915421126 53.1585977185895,83.4457915421126 53.4866943332863)",
- "centroid": "POINT(83.4457915421126 53.4866943332863)"
}
], - "domain": "ru",
- "tips_languages": "{\"ru\": \"ru\"}",
- "country_code": "st",
- "name": "Москва",
- "online_languages": {
- "available": "string",
- "default_lang": "string"
}, - "flags": {
- "parking_layer": true,
- "flamp": true,
- "metro": true,
- "road_network": true,
- "public_transport": true,
- "truck_graph": true,
- "pedestrian_routing": true,
- "traffic": true,
- "has_net_booklet": true,
- "gdpr": true,
- "2gis_reviews": true
}, - "zoom_level": {
- "min": 22,
- "max": 22
}, - "time_zone": {
- "name": "Asia/Novosibirsk",
- "offset": 240
}, - "uri_aliases": [
- "string"
], - "uri_code": "nnovgorod",
- "bounds": "POLYGON((83.4457915421126 53.4866943332863,84.0879338133862 53.4866943332863,84.0879338133862 53.1585977185895,83.4457915421126 53.1585977185895,83.4457915421126 53.4866943332863)"
}
], - "total": 1
}
}