Skip to main content

Search for categories

OpenAPI Specification

Directory of categories (2.0)

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

Categories

Categories search

Performs the search for categories by keywords.

query Parameters
key
required
string

A unique key of API user.

region_id
required
string

Region ID.

q
required
string [ 1 .. 400 ] characters

An arbitrary search string.

page
integer
Default: 1

The number of the requested page.

page_size
integer [ 1 .. 50 ]
Default: 20

Number of search results displayed on one page.

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

Main result

required
object (ObjMeta)

Response metadata

Response samples

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