Storing Data from Google Places API

送分小仙女□ 提交于 2019-11-30 14:00:00
  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.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!