API returns 0 results for basic search query.
omurbekjk opened this issue · comments
Request:
curl -X GET "http://catalog.api.2gis.ru/2.0/region/search?key=MY_KEY&q=vefa%20center&country_code_filter=kg" -H "accept: application/json"
http://catalog.api.2gis.ru/2.0/region/search?key=rumvfg5161&q=vefa%20center&country_code_filter=kg
result:
{
"meta": {
"api_version": "2.0.347855",
"code": 404,
"error": {
"message": "Results not found",
"type": "itemNotFound"
},
"issue_date": "20191022"
}
}
What am I doing wrong?
Also try it out option in this link does not work.
http://catalog.api.2gis.ru/doc/2.0/suggest/#/default/get_2_0_suggest_list
Hi, Omurbek
Search API is not relevant to Maps API. Please, send your questions through the feedback form next time. Feedback form
Region search is used to find cities and regions. For example:
http://catalog.api.2gis.ru/2.0/region/search?key=YOUR_KEY&q=%D0%91%D0%B8%D1%88%D0%BA%D0%B5%D0%BA&country_code_filter=kg
or
http://catalog.api.2gis.ru/2.0/region/search?key=YOUR_KEY&q=Bishkek&country_code_filter=kg
A server response in this case:
{ "meta": { "api_version": "2.0.347855", "code": 200, "issue_date": "20191023" }, "result": { "items": [ { "id": "112", "name": "Бишкек", "type": "region" } ], "total": 1 } }
To find the "VEFA Center" you need to use geo search.
http://catalog.api.2gis.ru/2.0/geo/search?key=YOUR_KEY&q=vefa%20center®ion_id=112
A server response will be:
{ "meta": { "api_version": "2.0.347855", "code": 200, "issue_date": "20191023" }, "result": { "items": [ { "purpose_name": "Торговый центр", "name": "VEFA Center, торговый центр", "full_name": "Бишкек, VEFA Center, торговый центр", "id": "15763234351159408", "building_name": "VEFA Center, торговый центр", "address_name": "Байтик Баатыра, 98 / Максима Горького, 27/1", "type": "building" } ], "total": 1 } }