Examples
Search for companies
Search by text parameter
https://catalog.api.2gis.com/3.0/markers?q=Moscow cafe&type=branch&key=YOUR_KEY
For more accurate search without geographical restrictions you should specify the city (village, district, region) where the search should be performed in the text of the query.
Search within a radius
https://catalog.api.2gis.com/3.0/markers?q=cafe&type=branch&point=37.416469%2C55.619325&radius=1000&key=YOUR_KEY
Search within a radius and sort by distance
https://catalog.api.2gis.com/3.0/markers?q=cafe&point=37.545423%2C55.740693&radius=1000&location=37.545423%2C55.740693&sort=distance&key=YOUR_KEY
Search with specifying a search point
https://catalog.api.2gis.com/3.0/markers?q=cafe&location=37.545423%2C55.740693&key=YOUR_KEY
Objects closest to the point will be displayed first. There is no need to specify a city in the query.
Search in a rectangular area
https://catalog.api.2gis.com/3.0/markers?q=cafe&point1=37.602631%2C55.764592&point2=37.648702%2C55.743089&key=YOUR_KEY
Search in an arbitrary area
https://catalog.api.2gis.com/3.0/markers?q=cafe&polygon=POLYGON((37.5930 55.7667,37.6494 55.7667,37.6494 55.7405,37.5930 55.7405,37.5930 55.7667))&key=YOUR_KEY
The search area should be defined in the WKT format.
Search in a specific city
-
Identify the ID of a city where the search is performed in one of the ways:
-
Find the city by a point:
https://catalog.api.2gis.com/3.0/markers?lon=37.62143&lat=55.752966&type=adm_div.city&key=YOUR_KEY -
Find the city by its name:
https://catalog.api.2gis.com/3.0/markers?q=Moscow&key=YOUR_KEY
-
-
Copy the value from the
idfield (part before the underscore "_" symbol) and pass it to thecity_idfield:https://catalog.api.2gis.com/3.0/markers?q=cafe&city_id=4504222397630173&key=YOUR_KEY
Search in a specific city and sort by rating
https://catalog.api.2gis.com/3.0/markers?q=beauty&city_id=4504222397630173&sort=rating&key=YOUR_KEY
Search near a metro station
You can perform search in in one of the following ways:
-
Search with a station name in the request:
https://catalog.api.2gis.com/3.0/markers?q=metro kosino beauty&city_id=4504222397630173&key=YOUR_KEY -
Search and filter by a metro station:
-
Identify the station ID:
https://catalog.api.2gis.com/3.0/markers?type=station.metro&q=kosino&location=37.617135%2C55.757705&key=YOUR_KEY -
Copy the value from the
idfield (part before the underscore "_" symbol) and pass it to thesubwayfield:https://catalog.api.2gis.com/3.0/markers?q=beauty&subway=70030076180130124&location=37.617135%2C55.757705&key=YOUR_KEY
-
Search in a building
-
Identify the building ID:
https://catalog.api.2gis.com/3.0/markers?q=Moskva Dovatora 6/6&type=building&key=YOUR_KEY -
Copy the value from the
idfield (part before the underscore "_" symbol) and pass it to thebuilding_idfield, and also specify the search typesearch_type=indoor:https://catalog.api.2gis.com/3.0/markers?q=pick-up point&search_type=indoor&building_id=4504235282582289&key=YOUR_KEY
Search and filter by working hours and website availability
https://catalog.api.2gis.com/3.0/markers?q=beauty&city_id=4504222397630173&work_time=thu,09:00&has_site=true&key=YOUR_KEY
Search and filter by additional attributes
https://catalog.api.2gis.com/3.0/markers?q=Eat out&city_id=4504222397630173&attr[food_service_business_lunch]=true&attr[food_service_capacity]=10,30&key=YOUR_KEY
Search for places
Search for parking lots within a specified radius
https://catalog.api.2gis.com/3.0/markers?q=parking&type=parking&point=37.592004%2C55.737264&radius=1000&key=YOUR_KEY
Search for a building
https://catalog.api.2gis.com/3.0/markers?q=Moskva Dovatora 9&key=YOUR_KEY
Search for a public transport stop
Search for a metro station in Moscow:
https://catalog.api.2gis.com/3.0/markers?q=Arbatskaya&type=station&city_id=4504222397630173&key=YOUR_KEY
Search for a bus stop in Moscow:
https://catalog.api.2gis.com/3.0/markers?q=Red Square&type=station&city_id=4504222397630173&key=YOUR_KEY