Iliya Krinchiyan
Iliya Krinchiyan

Reputation: 267

Is the id of the place, returned by google place api remain constant?

When using Google place api functions, for example, nearbysearch, result contais found places. Each place has it's id. In documentation https://developers.google.com/places/documentation/search#PlaceSearchResults , it is mentioned that "id contains a unique stable identifier" and id " is guaranteed to be valid across sessions".

Does that mean that a place will have the same id, until it exists in google db. And if I obtain this id, it will be always referencing the same place.

Upvotes: 0

Views: 302

Answers (1)

pushbit
pushbit

Reputation: 1268

Yes and no. If ID 1 is specified for Place 1, then ID 1 will never be used for another place. But, theoretically, another place with ID 2 could be created and then Place 1 is merged into it because both virtual places represent the same physical place. Then, the same queries that were returning ID 1 for this place could now return ID 2. Both ID 1 and ID 2 would be valid for this place.

Upvotes: 1

Related Questions