Skip to main content

List of categories

OpenAPI Specification

Directory of categories (2.0)

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

Categories

Getting a list of categories according to parameters

Shows the list of all available categories according to the specified parameters. We recommend to use it only for projects that already use the list of categories 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"

The sorting of results.
Valid values:

  • name — alphabetically;
  • popularity — by descending order of the 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.

Responses

Response Schema:
required
object (ObjMeta)

Response metadata

required
object

Main result

Response samples

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