List of categories
OpenAPI Specification
Category directory (2.0)
2GIS API Support: api@2gis.ru URL: https://docs.2gis.com
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:
|
| fields | Array of strings Additional fields to be displayed in the response should be separated by commas. List of available fields:
|
| locale | string Examples:
The locale with which the search is performed and given results. List of available locales:
|
Responses
Response Schema:
One of
required | object Response metadata. |
required | object Main result |
Response samples
- 200
Content type
Example
{- "meta": {
- "api_version": "dev",
- "code": 200,
- "issue_date": "20200422"
}, - "result": {
- "items": [
- {
- "alias": "avarijjnye_sluzhby",
- "branch_count": 25,
- "geo_count": 10,
- "id": "4503719886454906",
- "is_reviewable_on_flamp": true,
- "keyword": "Milk chocolate",
- "name": "Emergency services",
- "org_count": 10,
- "region_id": "1",
- "rubrics": [
- {
- "alias": "avarijjnye_sluzhby",
- "branch_count": 25,
- "caption": "string",
- "geo_count": 2,
- "icon_url": "string",
- "id": "4503719886454906",
- "keyword": "Milk chocolate",
- "name": "Emergency services",
- "org_count": 10,
- "parent_id": "4503719886460203",
- "region_id": "1",
- "search_attributes": {
- "additional_context": [
- 0
], - "additional_info": { },
- "dgis_address_details": {
- "address": "12",
- "apartment": "15",
- "entrance": "1",
- "precision": "string"
}, - "external_source": 1,
- "suggest_parts": [
- {
- "is_suggested": true,
- "text": "string"
}
], - "suggested_text": "string"
}, - "seo_name": "Emergency (emergency on-call) services",
- "suggest_icon": "string",
- "tag": "string",
- "title": "string",
- "type": "rubric"
}
], - "type": "general_rubric"
}
], - "total": 1
}
}