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