Skip to main content

List of categories

OpenAPI Specification

Category directory (2.0)

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

Categories

Getting a list of categories by parameters

Provides a list of all available categories for the specified parameters. Recommended for use only in projects that already use the category directory as a navigation element.

query Parameters
key
required
string

A unique key of API user.

region_id
required
string

Region ID.

parent_id
string
Default: "0"

Parent category ID.

page
integer
Default: 1

The number of the requested page.

page_size
integer [ 1 .. 10000 ]
Default: 10000

The maximum number of results on the requested page.

sort
string
Default: "name"

Sorting of the results.

Allowed values:

  • name — alphabetically;
  • popularity — by descending order of popularity.
fields
Array of strings

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

List of available fields:

  • items.region_id — unique identifier of the project;
  • items.is_reviewable_on_flamp — whether to allow reviews of the organizations of this column directly on flamp.ru;
  • items.rubrics — an array of children categories;
  • items.rubrics.region_id — the ID of the region;
  • items.rubrics.is_reviewable_on_flamp — whether to allow reviews of the organizations of this column directly on flamp.ru.
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).

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
    }
}