Skip to main content

Get object by id

Directory of map objects (2.0)

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

Geocoding

Getting information about map object

Displays detailed information about the map object by its unique identifier.

query Parameters
key
required
string

A unique key of API user.

id
required
string

Map object ID.

hash
string

Basic hash consisting of 16 characters. It is used to generate statistics and display advertising options.

locale
string

The locale with which the search is performed and given results.

fields
Array of strings

Additional fields to display in the response are separated by commas.
List of available fields:

  • items.adm_div — administrative division;
  • items.address — address where the organization's branch is located;
  • items.address.is_conditional — flag for "conditional address";
  • items.full_address_name — the same as address_name, but with the city;
  • items.floors — number of floors;
  • items.attraction — description of the attraction;
  • items.statistics — summary information about the geo object;
  • items.level_count — number of Parking levels;
  • items.capacity — Parking capacity;
  • items.description — description of the geo object;
  • items.context — dynamic information;
  • items.access_name — localized name of the access type;
  • items.is_paid — whether Parking is paid;
  • items.for_trucks — truck parking;
  • items.paving_type — type of parking paving;
  • items.access — type of access for Parking;
  • items.access_comment — localized name for the access type;
  • items.schedule — work schedule for a geo object (for example, for Parking);
  • hash — base hash;
  • items.stat — data for generating statistics messages;
  • search_attributes — information about the search performed;
  • items.geometry.selection - geometry for selecting the object;
  • items.geometry.hover — geometry of the area used to determine whether the cursor is in the area of the object.
  • items.geometry.style - ID of the style to display;
  • items.geometry.centroid — visual center of the object geometry;
  • items.region_id — unique project ID;
  • items.links - related objects;
  • items.external_content — additional company data (requires additional permission on API key);
  • items.is_routing_available - flag for whether travel to the object is possible;
  • items.group — objects linked to the combined card;
  • items.reviews — statistics on branch reviews;
  • items.is_main_in_group — indicates that this is the main object in the hybrid object group;
  • items.city_alias — alias of the city, where the object is located;
  • items.detailed_subtype — detailed type of administrative-territorial unit;
  • items.name_back — revealed name in the reverse direction, if available;
  • items.value_back — kilometer number in the reverse direction;

Responses

Response Schema:
required
object (ObjMeta)

Response metadata

required
object

Main result

Response samples

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