Google Places API place_id field length

preyz picture preyz · Jun 26, 2014 · Viewed 7.4k times · Source

Google has marked the reference and id fields as deprecated as of June 24th 2014, and replaced it with a single place_id.

I've so far only seen place_id lengths of exactly 27 characters, but wonder if there is any documentation for this length? I have been unable to find this documented anywhere.

Obviously knowing the length of the place_id is significant for choosing an optimal database field, and therefore something I'd like to know.


From the Google Places API docs site:

The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a unique identifier that can be used to compare places and to retrieve information about a place. The Places API currently returns a place_id in all responses, and accepts a placeid in the Place Details and Place Delete requests. Soon after June 24, 2015, the API will stop returning the id and reference fields in responses. Some time later, the API will no longer accept the reference in requests. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible.

Answer

Andrew picture Andrew · Sep 21, 2016

There's no documentation on the specific length, but the max I have seen is length 255. This corresponds to address 488 Srinagarindra Rd., Suan Luang, Bangkok, 10250. You can check the place id here.

FYI the place id is:

ErwBNDg4IOC4luC4meC4mSDguKjguKPguLXguJnguITguKPguLTguJnguJfguKPguYwg4LmB4LiC4Lin4LiHIOC4quC4p-C4meC4q-C4peC4p-C4hyDguYDguILguJUg4Liq4Lin4LiZ4Lir4Lil4Lin4LiHIOC4geC4o-C4uOC4h-C5gOC4l-C4nuC4oeC4q-C4suC4meC4hOC4oyAxMDI1MCDguJvguKPguLDguYDguJfguKjguYTguJfguKI