Skip to main content

List of regions

Directory of regions (2.0)

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

Region

Getting a list of regions according to parameters

Provides a list of all available regions for the specified parameters.

query Parameters
key
required
string

A unique key of API user.

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
string

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

locale_filter
Array of strings
Example: locale_filter=ru_RU

List of locales separated by commas that you use to filter.

country_code_filter
string
Example: country_code_filter=ru

List of country codes 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.
List of available fields:

  • items.name_grammatical_cases — inducing names of the region;
  • items.domain — the value of the domain.
  • items.locales — the list of locales for which you can search for the region;
  • items.time_zone — time zone;
  • items.bounds — the geometry of the boundaries of the project WKT;
  • items.statistics — statistics for the region;
  • items.locale — the current locale for the region;
  • items.settlements — the list of satellite cities;
  • items.satellites — the list of satellite cities as objects;
  • items.code — the region code;
  • items.uri_code — the region code that will be displayed in the domain;
  • items.uri_aliases is the set of aliases of the region;
  • items.allow_for_indexing — a list of languages project, which allowed the index;
  • items.country_code — country code;
  • items.default_pos — the default position for display of the project;
  • items.zoom_level is the zoom level;
  • items.flags — signs of the presence of certain information in the region;
  • items.seo — additional fields for SEO;
  • items.hidden — a flag whether a project is hidden;
  • items.weights_time — time of last update of promotional scales in Unix timestamp format.

type
string
Default: "region"
Examples:
  • type=region,segment - An example of multiple types
  • type=region - An example of a single type

A filter by object type, the types should be comma separated.
The list of available types:

  • region;
  • segment;
  • universe.

Responses

Response Schema:
required
object (ObjMeta)

Response metadata

required
object

Main result

Response samples

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