Search code examples
google-mapsgoogle-maps-api-3google-apigoogle-maps-api-2google-api-client

Maps search api won't show some results


i'm using google maps search api to search for an existing place but i don't get any result. If i search the same query on google maps or google street view, i can find the place.

Query: Rialto Luxury Studios

Maps result: https://www.google.it/maps/place/Rialto+Luxury+Studios/@45.4378195,12.3367443,18z/data=!4m8!1m2!2m1!1sRialto+Luxury+Studios!3m4!1s0x477eb1dbca09ab15:0x98e130dbd1f6fbf7!8m2!3d45.4377321!4d12.336083

Api call: https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Rialto+Luxury+Studios&key=[xxxxxxxxxxxx]

Is there anything i'm doing wrong?

Thx


Solution

  • Why are you using autocomplete? If you are just searching for place details then textsearch is probably the way to go.

    A textsearch for 'Rialto+Luxury+Studios' returns the result you want as the second result.

    Adding some more detail, a textsearch for 'Rialto+Luxury+Studios+Ponte+di+Rialto' returns the result you want as the first result.

    If you can't find a place, a nearbysearch is usually a good way to go: location=45.437670,%2012.336059&radius=1000&keyword=rialto+luxury

    I do not know why autocomplete isn't showing your result, sorry, can't help you there.