Guerrilla
Guerrilla

Reputation: 14926

Google Places API reference field

When I make an API request to Google places API one of the fields I get back is "reference".

It is not documented in the API documents. The value appears like a long hash code.

Is this versioning for the places details? For instance, does this reference stay the same until something like phone number or name is changed?

I am looking for a way to cache results. I was going to do it by date of request but if this value is for versioning of the record then it will be ideal to check against the cache.

I can't find any mention of it on developer site but value appears to be consistent so I figured this might be the case.

Does anyone know for sure one way or the other?

Upvotes: 0

Views: 425

Answers (1)

geocodezip
geocodezip

Reputation: 161384

From the web service documentation (same is true for the Google Maps Javascript API v3):

Note: The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a textual identifier that uniquely identifies a place and can be used to retrieve information about the place. The usual deprecation period of one year has been extended, as we’re looking into ways of ensuring this change will not break existing code. We’ll update this page with a final notice at least 90 days before we change the way the API handles the id and reference fields. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible.

Upvotes: 1

Related Questions