Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Places API - can I save place_id?

We develop a platform for building travel itineraries. The travel plan (=trip) is combined of places ordered by a user defined flow. We want to use Google Places API for searching places. We would like to store a place_id, and use it for retrieving a trip info. The place_id will be used for fetching that place details from Google. A place_id will be saved for future use only if a user decided to include that place within his trip itinerary.

Is it permitted according to the terms of use ?

Thanks! Orit

like image 786
Orit Avatar asked Sep 10 '14 09:09

Orit


2 Answers

Yes you can

Place IDs are exempt from the caching restrictions stated in Section 10.1.3 of the Google Maps APIs Terms of Service. You can therefore store place ID values indefinitely.

Referencing a Place with a Place ID

like image 71
gchao Avatar answered Oct 07 '22 00:10

gchao


I am currently asking the exact same question to myself.

Reading throught the Google Places API documentation (as you also did I guess), I haven't found a clear/explicit answer to that question.

However, several parts of the documentation make me think that place_id can be saved and used later on to retrieve a place result.

In the "Place Details Results" section, it is said that the "id" property is deprecated and should be replaced by place_id. As "id" was said to be a stable identifier, I conclude that place_id is also a stable identifier.

Another interesting part is the one about the "alt_ids": it is said that a given place can see its place_id changing over the time: when the SCOPE changes, a new place_id is attributed to this place. So, I would said that:

  • a place_id is unique and stable for a given place and a given SCOPE (APP|GOOGLE), as long as the place exists.
  • a given place will remain searchable using any the place_id previously attributed to this place
  • using an APP scope place_id, there is no guaranty that the result sent in the response has the same place_id (it is not a problem, but it need to be kept in my mind, from a developing point of view)

At the end, unfortunately, I have no definitive answer. It is just my current assumptions. I hope somebody will help us with that question.

Regards

Philippe

like image 6
Philippe Brunet Avatar answered Oct 07 '22 00:10

Philippe Brunet