There is no place in Google Maps in the Google Places API

I am trying to find a specific location in the Google Places API without success. When I type “La Cucina Trattoria” on Google Maps, I get three results. However, when I run this query:

https://maps.googleapis.com/maps/api/place/autocomplete/json?key=API_KEY&input=la%20cucina%20trattoria

I get only two results. Therefore, I tested more queries with equal efficiency:

input = la% 20cucina% 20trattoria% 20gmbh - no results

https://maps.googleapis.com/maps/api/place/search/json?key=API_KEY&location=48.139649,11.602685&rankby=distance&keyword=cucina - the place is not in the results (I set its exact location as a parameter)

location = 48.139649,11.602685 & rankby = distance & keyword = Neherstraße% 209 - the place is not in the results (however, it returns results from the same street)

My client named two random places that he knows, and none of them can be found in the Google Places API. Is it possible that Google Places Google and Google Maps work in two different databases? Or can these places be hidden in the public API?

+6
source share
2 answers

I came across similar problems, but usually changing the query gave better results. Besides reporting this , you can manually add a place :

POST https://maps.googleapis.com/maps/api/place/add/json?key=AddYourOwnKeyHere HTTP/1.1 Host: maps.googleapis.com { "location": { "lat": -33.8669710, "lng": 151.1958750 }, "accuracy": 50, "name": "Google Shoes!", "phone_number": "(02) 9374 4000", "address": "48 Pirrama Road, Pyrmont, NSW 2009, Australia", "types": ["shoe_store"], "website": "http://www.google.com.au/", "language": "en-AU" } 

This should allow your application to immediately see the place and potentially add it to Google Maps.

+1
source

I couldn’t find La Cucina Trattoria in Places, and I tried several different tactics, including text search ( https://maps.googleapis.com/maps/api/place/textsearch/xml? Query = Italian restaurant in Non-Strasse in Munich and Key = MYKEY ). I would report this to the API Capabilities tracker: https://code.google.com/p/gmaps-api-issues/issues/list?can=2&q=apitype:PlacesAPI%20type:Defect&sort=-stars&colspec=ID% 20Type% 20Status% 20Introduced% 20Fixed% 20Summary% 20Internal% 20Stars

Browse the extensive list of existing errors to see if you can add your name to an existing one and speed up its resolution. Here are some confirmed errors:

Some queries do not return results when there should be many

Error: rarefied search results in Germany

Error: requesting location data returns incorrect result

+1
source

Source: https://habr.com/ru/post/981403/


All Articles