Search for regions
Directory of regions (2.0)
Search for regions
A region is an agglomeration which includes a major city and the surrounding areas. Now you can implement the selection of the city, as it is made in the Online version of 2GIS, which is the API partner.
query Parameters
| key required | string A unique key of API user. |
| q required | string [ 1 .. 400 ] characters An arbitrary search string. |
| lang | string Default: "ru" The language of regions. |
| locale | string The locale with which the search is performed and given results. |
| country_code_filter | Array of strings Example: country_code_filter=ru List of country codes separated by commas that you use to filter. |
| page | integer Default: 1 The number of the requested page. |
| page_size | integer [ 1 .. 2000 ] Default: 1000 Number of search results displayed on one page. |
| locale_filter | Array of strings Example: locale_filter=ru_RU List of locales separated by commas that you use to filter. |
| fields | Array of strings Additional fields to be displayed in the response should be separated by commas.
|
| type | string Default: "region" Examples:
A filter by object type, the types should be comma separated.
|
Responses
Response Schema:
required | object (ObjMeta) Response metadata |
required | object Main result |
Response samples
- 200
- 400
- 403
- 404
- 408
- 500
{- "meta": {
- "code": 200,
- "api_version": "dev",
- "issue_date": "string"
}, - "result": {
- "total": 1,
- "items": [
- {
- "id": "123456",
- "type": "region",
- "satellites": [
- {
- "id": "123456",
- "centroid": "POINT(83.4457915421126 53.4866943332863)",
- "name": "Moscow",
- "geometry": "POLYGON((83.4457915421126 53.4866943332863,84.0879338133862 53.4866943332863,84.0879338133862 53.1585977185895,83.4457915421126 53.1585977185895,83.4457915421126 53.4866943332863)"
}
], - "country_code": "st",
- "flags": {
- "public_transport": true,
- "ctx_layer": true,
- "gdpr": true,
- "2gis_reviews": true,
- "pedestrian_routing": true,
- "road_network": true,
- "traffic": true,
- "flamp": true,
- "parking_layer": true,
- "has_net_booklet": true,
- "metro": true,
- "truck_graph": true
}, - "uri_aliases": [
- "string"
], - "default_pos": {
- "lon": "43.2988455",
- "lat": "56.7724145",
- "zoom": "11"
}, - "online_languages": {
- "available": "string",
- "default_lang": "string"
}, - "statistics": {
- "rubric_count": 0,
- "org_count": 0,
- "branch_count": 0,
- "route_count": 0
}, - "locale": "ru_RU",
- "name": "Moscow",
- "domain": "ru",
- "name_grammatical_cases": {
- "accusative": "Novosibirsk",
- "dative": "to Novosibirsk",
- "genitive": "of Novosibirsk",
- "prepositional": "in Novosibirsk"
}, - "tips_languages": "{\"ru\": \"ru\"}",
- "settlements": [
- "string"
], - "bounds": "POLYGON((83.4457915421126 53.4866943332863,84.0879338133862 53.4866943332863,84.0879338133862 53.1585977185895,83.4457915421126 53.1585977185895,83.4457915421126 53.4866943332863)",
- "zoom_level": {
- "max": 22,
- "min": 22
}, - "locales": "ru_RU",
- "seo": {
- "title": "string",
- "description": "string"
}, - "uri_code": "nnovgorod",
- "code": "nnovgorod",
- "time_zone": {
- "offset": 240,
- "name": "Asia/Novosibirsk"
}
}
]
}
}