Search businesses
Returns organisations matching a query in one 2GIS city — name, address, coordinates, categories, opening hours and ratings. Requires query and city.
Authorization
ApiKeyAuth In: header
Query Parameters
What to search for, in the city's own language — кафе, pharmacy, kavárna. A query 2GIS cannot match does not come back empty: it returns unrelated real businesses at near-zero relevance under a healthy 200. Check is_partial_match before trusting the rows.
1 <= length <= 200A 2GIS city slug — the segment in its own URL, e.g. moscow, spb, dubai, almaty, praha. /v1/2gis/cities lists all 206, and the value is not guessable from a country: 2GIS is organised by city, not by nation.
length <= 40Page of results; pages run to ceil(total / page_size). De-duplicate on id when combining pages.
1 <= value <= 100001How many places per page, at most 50. This is a closed set upstream rather than a ceiling that clamps: 2GIS answers a larger value with paramIsOutsideSet and returns nothing at all.
1 <= value <= 5020One of the city's own locales, e.g. ru_RU or en_AE. Defaults to the city's default. Not a translation layer: a locale the region does not offer is rejected by 2GIS outright — Dubai serves en_AE and refuses en_US. /v1/2gis/cities lists each city's set.
^[a-z]{2}_[A-Z]{2}$length <= 10curl -X GET "https://example.com/v1/2gis/search?query=%D0%BA%D0%B0%D1%84%D0%B5&city=moscow" \ -H "x-api-key: YOUR_API_KEY"{ "data": { "query": "кафе", "city": "moscow", "region_id": "32", "region_name": "Москва", "country_code": "ru", "locale": "ru_RU", "results": [ { "id": "70000001007179642", "search_context_id": "70000001007179642_ku4dspBmdBdB9A82AJ7H…", "name": "Му-Му, кафе", "type": "branch", "url": "https://2gis.ru/moscow/firm/70000001007179642", "address": { "street_address": "Манежная площадь, 1 ст2", "address_comment": "-2 этаж; Средний уровень", "building_name": "Охотный ряд", "postcode": "125009", "country": "Россия", "region": "Москва", "city": "Москва", "district": "Тверской", "settlement": null }, "latitude": 55.755301, "longitude": 37.614586, "region_id": "32", "city_alias": "moscow", "rubrics": [ { "id": "161", "name": "Кафе", "alias": "kafe", "kind": "primary" } ], "primary_rubric": "Кафе", "schedule": { "property1": null, "property2": null }, "contacts": { "phones": [ { "value": "+74957818781", "text": "+7 (495) 781‒87‒81", "comment": "служба доставки", "tracking_url": "http://link.2gis.ru/1.2/97BA0CE6/…" } ], "websites": [ { "value": "+74957818781", "text": "+7 (495) 781‒87‒81", "comment": "служба доставки", "tracking_url": "http://link.2gis.ru/1.2/97BA0CE6/…" } ], "emails": [ { "value": "+74957818781", "text": "+7 (495) 781‒87‒81", "comment": "служба доставки", "tracking_url": "http://link.2gis.ru/1.2/97BA0CE6/…" } ] }, "attribute_groups": [ null ], "organization": { "id": "4504136498368318", "name": "Му-Му, кафе", "branch_count": 18 }, "rating": 4.8, "review_count": 1090, "org_rating": 4.3, "org_review_count": 7817, "is_reviewable": true, "is_advertisement": false, "relevance": 1137.25 } ], "count": 20, "total": 8616, "match_type": "discovery", "is_partial_match": false, "max_relevance": 2151.38, "page": 1, "page_size": 20, "max_page_size": 50, "usage_note": "Check is_partial_match before trusting these rows: true means 2GIS could not match the query and returned unrelated real businesses anyway, under a healthy 200, at a relevance around 1e-09 against 10-8800 for a real match. match_type is not that signal — it names which search mode answered, and a literal text search on a brand name is the best answer available rather than a degraded one. Search rows carry no phone number and no website — the site's own search request omits contact fields — so pass a row's id to /v1/2gis/place for those. If you aggregate pages, de-duplicate on id: 0-4.8% of rows repeat an organisation from an earlier page, so summing count across pages overstates the result set." }}