Storing Data from Google Places API

后端 未结 3 482
再見小時候
再見小時候 2020-12-16 23:05

Please don\'t mind if this question sounds a little silly!

I am trying to learn more about Google Places API. I am interested in doing an implementation similar to

相关标签:
3条回答
  • 2020-12-16 23:36
    1. I've read pretty much all of Places API's documentation and I have never once seen restrictions on what and what not you are allowed to store in a database. I would however recommend just storing the locations "reference" ID and just getting the details view HTTP every time so if a location's info changes, you are kept up-to-date.

    2. Of course you can do that, Google doesn't own country names :P

    3. Again, I would recommend storing the reference and accessing the location that way.

    4. A Place only has one ID. When you get the details of a place that ID will be returned every time. A reference, however, varies with each request. You cannot use an ID to get details about a Place but you can use a reference. An ID is useful for comparing places to see if they are the same as a location only has one ID.

    Keep the storage as light as possible. Keep only Place references and maybe IDs.

    0 讨论(0)
  • 2020-12-16 23:46

    I just found this question and although it's a bit late, maybe this answer can help some person looking for the policies.

    Google Places API only allows you to store the unique place id. Therefore you are not allowed to store URLs, photos or anything in your database. But you can store their place ids and the next time you need the data you can fetch it by making a place detail search.

    0 讨论(0)
  • 2020-12-17 00:01

    You can find here: https://developers.google.com/places/place-id#find-id

    Save place IDs for later use

    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.

    This supports the answer given by Windwaker, that the place ID is the right, and only legal thing you may store permanently.

    0 讨论(0)
提交回复
热议问题