Google Places API Link - Length / Characteristics

After searching on Google Docs and on the Internet, I canโ€™t find what specific characteristics the โ€œPlacesโ€ link has. Basically the length (max) of the link, so it can be saved in the database.

It seems that when testing these identifiers, they always contain 211 characters (max.) Alphanumeric characters, including dashes and underscores.

However, as I said, I canโ€™t find official documents on this issue, and I do not want to assume that, since I have already encountered a problem when the link downloaded from the database does not work with the Places API from Google. (Even if the resulting link matches the same specifications as above).

Thanks for any help!

+4
source share
4 answers

There is no documentation for this, since we can not guarantee the maximum length, because each link contains information specified by the user related to the corresponding search query.

If you are using an SQL database, I would suggest using varchar with a high maximum number.

+2
source

Although most API link identifiers are 211 characters long, there are some identifiers that also have a length of 234 characters.

Use the substring of the identifier ref if you have memory limitations.

Hope this helps.

0
source

There are, apparently, some with 255.

0
source

I see one link having a length of 276

0
source

Source: https://habr.com/ru/post/1433447/


All Articles