Skip to main content

Search for regions

OpenAPI Specification

Regions directory (2.0)

2GIS API Support: api@2gis.ru URL: https://docs.2gis.com

Regions

Regions search

A region is an agglomeration that includes a major city and the nearest localities. Now you can implement city selection the way it's done in the 2GIS Online version, which is an 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"

Language of regions.

locale
string
Examples:
  • locale=ar_AE - Arabic for the UAE
  • locale=ru_RU - Russian for Russia

The locale with which the search is performed and given results.

List of available locales:

  • ar_AE — Arabic (UAE);
  • ar_BH — Arabic (Bahrain);
  • ar_EG — Arabic (Egypt);
  • ar_IQ — Arabic (Iraq);
  • ar_KW — Arabic (Kuwait);
  • ar_MA — Arabic (Morocco);
  • ar_OM — Arabic (Oman);
  • ar_QA — Arabic (Qatar);
  • ar_RU — Arabic (Russia);
  • ar_SA — Arabic (Saudi Arabia);
  • az_AZ — Azerbaijani (Azerbaijan);
  • az_RU — Azerbaijani (Russia);
  • cs_CZ — Czech (Czech Republic);
  • cs_RU — Czech (Russia);
  • en_AE — English (UAE);
  • en_AM — English (Armenia);
  • en_AE — English (UAE);
  • en_BH — English (Bahrain);
  • en_CN — English (China);
  • en_CY — English (Cyprus);
  • en_EG — English (Egypt);
  • en_IQ — English (Iraq);
  • en_KW — English (Kuwait);
  • en_MA — English (Morocco);
  • en_MN — English (Mongolia);
  • en_OM — English (Oman);
  • en_QA — English (Qatar);
  • en_RU — English (Russia);
  • en_SA — English (Saudi Arabia);
  • en_TH — English (Thailand);
  • es_CL — Spanish (Cyprus);
  • es_RU — Spanish (Russia);
  • hy_AM — Armenian (Armenia);
  • hy_RU — Armenian (Russia);
  • it_IT — Italian (Italy);
  • it_RU — Italian (Russia);
  • ka_GE — Georgian (Georgia);
  • ka_RU — Georgian (Russia);
  • kk_KZ — Kazakh (Kazakhstan);
  • kk_RU — Kazakh (Russia);
  • ky_KG — Kyrgyz (Kyrgyzstan);
  • ky_RU — Kyrgyz (Russia);
  • mn_MN — Mongolian (Mongolia);
  • ru_AM — Russian (Armenia);
  • ru_AZ — Russian (Azerbaijan);
  • ru_BY — Russian (Belarus);
  • ru_CN — Russian (China);
  • ru_GE — Russian (Georgia);
  • ru_KG — Russian (Kyrgyzstan);
  • ru_KZ — Russian (Kazakhstan);
  • ru_RU — Russian (Russia);
  • ru_TJ — Russian (Tajikistan);
  • ru_UZ — Russian (Uzbekistan);
  • tg_RU — Tajik (Russia);
  • tg_TJ — Tajik (Tajikistan);
  • uz_RU — Uzbek (Russia);
  • uz_UZ — Uzbek (Uzbekistan);
  • zh_CN — Chinese (China).
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

Comma-separated list of locales to filter by.

fields
Array of strings

Additional fields to be displayed in the response should be separated by commas.

List of available fields:

  • items.name_grammatical_cases — declination of the region name;
  • items.domain — domain value;
  • items.locales — the list of locales for which you can search for the region;
  • items.time_zone — time zone;
  • items.bounds — geometry of the project boundaries in the WKT format;
  • items.statistics — statistics for the region;
  • items.locale — the current locale for the region;
  • items.settlements — a list of satellite cities;
  • items.satellites — list of satellite cities as objects;
  • items.online_languages — allowed interface languages in the 2GIS Online version for the project;
  • items.zoom_level — zoom level;
  • items.seo — additional fields for SEO;
  • items.code — region code;
  • items.uri_code — the region code that will be displayed in the domain;
  • items.uri_aliases — set of region aliases;
  • items.allow_for_indexing — the list of project languages allowed for indexing;
  • items.weights_time — the time of the last update of advertising weights in Unix timestamp format;
  • items.hidden — a flag indicating whether the project is hidden;
  • items.country_code — country code;
  • items.flags — indicators of the presence of certain information in the region;
  • items.default_pos — default position for displaying the project;
  • items.extras_tips_languages — allowed languages.
type
Array of strings
Default: "region"
Examples:
  • type=region,segment - An example of multiple types
  • type=region - An example of a single type

Filter by object type, comma-separated.

The list of available types:

  • region — region;
  • segment — segment;
  • universe — universe.

Responses

Response Schema:
One of
required
object

Response metadata.

required
object

Main result

Response samples

Content type
Example
{
  • "meta": {
    • "api_version": "dev",
    • "code": 200,
    • "issue_date": "20200422"
    },
  • "result": {
    • "items": [
      ],
    • "total": 1
    }
}