Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Place from Google Maps missing in Google Places API

I've been trying to find specific place in Google Places API with no success. When I type "La Cucina Trattoria" in 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 only get two results. So I've tested more queries with similar effectiveness:

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 - place missing in results (I've put its exact location as a parameter)

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

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

like image 282
nets Avatar asked Jan 22 '15 15:01

nets


2 Answers

I've come across similar issues, but usually changing the query gave better results. Aside from reporting it, 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 have it added into Google Maps.

like image 65
Andy Avatar answered Nov 15 '22 09:11

Andy


I was unable to find La Cucina Trattoria in Places, and I tried a number of different tactics, including a Text Search (https://maps.googleapis.com/maps/api/place/textsearch/xml?query=italian restaurant on Neherstraße in munich&key=MYKEY). I'd report it to the Place API Issues tracker here: 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

Check through the extensive list of existing bugs to see if you can add your name to an existing one and speed its resolution. Here are some similar confirmed bugs:

Some queries return no results when there should be many

Bug: Sparse search results in germany

Bug: Place details request returns wrong result

like image 26
Scott Avatar answered Nov 15 '22 11:11

Scott