Troubleshooting common search issues
When using Places API, you may occasionally fail to find the object you are looking for, or you might receive inaccurate or overly broad results. This instruction covers common search issues and their possible solutions.
Error codes
The server will return a 200 status code even if the request contains an error. You can find the specific error code in the meta.code field within the response body, for example:
{
"meta": {
"api_version": "3.0.20949",
"code": 404,
"error": {
"message": "Results not found",
"type": "itemNotFound"
},
"issue_date": "20260717"
}
}
| Code | Description | Solution |
|---|---|---|
| 400 | Invalid request. | Check the error description in the error.message parameter and verify your request parameters. For examples of invalid requests, see the No results are returned section. |
| 403 | Access denied. |
|
| 404 | Object not found. | Verify that the request parameters are specified correctly. For an example of an invalid request, see the No results are returned section. |
| 408 | Request timed out. | Retry the request later. |
| 503 | Internal server error. | Retry the request later. |
No results are returned
Possible issue causes:
Mistakes in request parameters
Make sure that parameter names are written in the proper case and without typos: see the API Reference.
Incorrect request example (the q parameter is specified in the wrong case as Q):
https://catalog.api.2gis.com/3.0/items?Q=Universitetsky prospekt, 9 Moscow&key=API_KEY
Response
{
"meta": {
"api_version": "3.0.20949",
"code": 404,
"error": {
"message": "Results not found",
"type": "itemNotFound"
},
"issue_date": "20260717"
}
}
Fixed request example (the q parameter is specified in the correct case):
https://catalog.api.2gis.com/3.0/items?q=Universitetsky prospekt, 9 Moscow&key=API_KEY
Response
{
"meta": {
"api_version": "3.0.20949",
"code": 200,
"issue_date": "20260717"
},
"result": {
"items": [
{
"address_name": "Университетский проспект, 9",
"full_name": "Москва, Университетский проспект, 9",
"id": "4504235282606753",
"name": "Университетский проспект, 9",
"purpose_name": "Жилой дом",
"type": "building"
}
],
"total": 1
}
}
No access to fields available on demand
If you request information about fields that are available only for an extra cost, ensure that you have access to them. If you do not, the requested fields will not be included in the response body. To purchase access, contact the 2GIS sales team. For more details, see the Additional information on demand section.
Incorrect request example (access is missing for the items.structure_info.year_of_construction field):
https://catalog.api.2gis.com/3.0/items/byid?id=4504235299048514&fields=items.address,items.point,items.structure_info.year_of_construction&key=API_KEY
The response will not include the field for the building's year of construction:
Response
{
"meta": {
"api_version": "3.0.21981",
"code": 200,
"issue_date": "20261106"
},
"result": {
"items": [
{
"address": {
"building_id": "4504235299048514",
"components": [
{
"number": "12",
"street": "Кадашёвская набережная",
"street_id": "4504338361755723",
"type": "street_number"
}
],
"postcode": "119017"
},
"address_name": "Кадашёвская набережная, 12",
"full_name": "Москва, Кадашёвская набережная, 12",
"id": "4504235299048514",
"name": "Кадашёвская набережная, 12",
"point": {
"lat": 55.743142,
"lon": 37.618706
},
"purpose_name": "Музей",
"type": "building"
}
],
"total": 1
}
}
Invalid parameters or values
Check the list of available parameters and values in the API Reference.
Incorrect request example (the type parameter does not have an entrance value):
https://catalog.api.2gis.com/3.0/items?q=Universitetsky prospekt, 9 Moscow&type=entrance&key=API_KEY
Response
{
"meta": {
"api_version": "3.0.20949",
"code": 400,
"error": {
"message": "Param 'type' is invalid. Value 'entrance' is outside of allowed values: 'coordinates','station_entrance','street','adm_div.country','route','branch','adm_div.district','adm_div.amana','attraction','adm_div.region','adm_div.place','adm_div','parking','adm_div.city','adm_div.district_area','station_platform','crossroad','kilometer_road_sign','adm_div.settlement','station','coordinates_additional','gate','building','station.metro','road','adm_div.division','adm_div.living_area'",
"type": "paramIsOutsideSet"
},
"issue_date": "20260717"
}
}
No data in 2GIS
To make sure that 2GIS is indeed missing data, try to find the required object manually. Open the map at 2gis.ru and enter the object address, name, or coordinates in the search field. If you find the required object, edit your request and send it again.
Inaccurate or too broad results
Possible issue causes:
No key parameters used
Requests work most efficiently if the following parameters are used:
location- coordinates of the point where to search for results (user location, city center, and others). The closer a found object is to the point, the higher it stands in the search response.viewpoint1andviewpoint2- coordinates of upper-left and lower-right edges of a rectangular view area. This area serves as one of the criteria for selecting and ranking results but it does not limit the search area severely.radius- search radius in meters to filter the results.type- type of objects considered for search. If multiple types are passed, more relevant results of some types can displace less relevant results of other types.
For more information about the request structure, see the Request example.
Example of an efficient request with all key parameters:
https://catalog.api.2gis.com/3.0/items?q=Universitetsky prospekt, 9 Moscow&type=building&location=37.549425,55.697848&radius=300&viewpoint1=37.531115,55.702856&viewpoint2=37.575258,55.687182&key=API_KEY
Response
{
"meta": {
"api_version": "3.0.20949",
"code": 200,
"issue_date": "20260717"
},
"result": {
"items": [
{
"address_name": "Университетский проспект, 9",
"full_name": "Москва, Университетский проспект, 9",
"id": "4504235282606753",
"name": "Университетский проспект, 9",
"purpose_name": "Жилой дом",
"type": "building"
}
],
"total": 1
}
}
See parameter formats, available values, and limitations in the API Reference.
Not enough parameters to narrow down the search
Use georestrictions and specify more filtering parameters.
For example, you can specify a category. Example of a request without specifying the category:
https://catalog.api.2gis.com/3.0/items?q=1913 year&location=30.3079,59.9289&key=API_KEY
Response (2 objects are returned)
{
"meta": {
"api_version": "3.0.20949",
"code": 200,
"issue_date": "20260715"
},
"result": {
"items": [
{
"address_comment": "1-4 этаж",
"address_name": "Вознесенский проспект, 13",
"id": "5348553838538209",
"name": "1913 год, гостиница",
"type": "branch"
},
{
"address_comment": "1, 2 этаж",
"address_name": "Вознесенский проспект, 13",
"id": "5348552838519391",
"name": "1913 год, ресторан в историческом центре",
"type": "branch"
}
],
"total": 2
}
}
Example of a request with the specified category:
https://catalog.api.2gis.com/3.0/items?q=1913 year&location=30.3079,59.9289&rubric_id=164&key=API_KEY
Response (1 object is returned)
{
"meta": {
"api_version": "3.0.20949",
"code": 200,
"issue_date": "20260717"
},
"result": {
"items": [
{
"address_comment": "1, 2 этаж",
"address_name": "Вознесенский проспект, 13",
"id": "5348552838519391",
"name": "1913 год, ресторан в историческом центре",
"type": "branch"
}
],
"total": 1
}
}