google-mapsgoogle-maps-api-3google-places-api

Google maps place id refresh


I have a relatively simple question, I can't find an answer for. I'm using the google places api and store the ids. However the documentation states, that refreshing placeId is free of charge. It's simple, you just have to query the id field and nothing else.

I wonder, if the placeId will get refreshed, if I specify other fields as well? That would ease the refresh-process. Lets say I request the fields id, formattedAddress and location by placeId. Will google respond with the new Id or just state, that the request is invalid?


Solution

  • The Places Details (New) will respond with the new Place ID along with the other fields such as formattedAddress and location.

    Take note that specifying the list is only used to filter a response and not a request so returning it as invalid wouldn't occur unless you omit the field mask itself.