迁移到 Google 个地方 API:先有鸡还是先有蛋的问题

Migrating to Google Places API: Chicken and Egg issues

我有一个包含“文本”地址和地点的遗留数据库。示例:

1231 Main Street, Boston, MA
Berkeley, CA
...
...

我想过渡到 Google 个地方 API 并用 place_id 替换那些地方。为了做到这一点,我将不得不 运行 我们后端的一次性流程将这些地址提交给 google 并保留我返回的 place_id

问题是他们的协议阻止了“预取”。被 Google 屏蔽将对我的业务宣判死刑。我会不惜一切代价避免这种情况。

我该怎么做才能将我数以万计的“文本地址”迁移到place_id而不被指责为“预取”?

现在我明白 place_id 不受缓存限制,但是当我使用 geocode API 查询地址时,我得到的整个结构不仅仅包含 [=30] =].我得到了格式化的地址、地址组件的细分和 long/lat。我担心的是,我通过从后端集群提交数万个请求来迁移到 Places API 的尝试看起来像是一种抓取尝试。有没有办法限制输出只包含 place_id - 也许这有助于避免任何合规性问题?

Place IDs page 上面写着:

Place IDs are exempt from the caching restrictions stated in Section 3.2.3(a) of the Google Maps Platform Terms of Service. You can therefore store place ID values for later use.

因此,无需担心违反行为准则。