地点网络服务常见问题解答
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档包含有关 Places API 的常见问题解答。如果您在此处找不到问题的答案,以下页面可能会对您有所帮助。
Places API 也有一个充满活力的开发者社区。如果您对代码有疑问,建议您在社区中发帖咨询。如需详细了解如何提问,请参阅支持页面。
搜索地点
为什么按类型过滤时,系统不会返回某些地点?
您要查找的地点可能尚未归类。
在 Google 掌握足够的数据来将某个地点归类为受支持的地点类型之前,所有地点都归类为泛型类型“establishment
”。
作为一种解决方法,您可以将地点 type
传递给 keyword
参数。keyword
参数与以下内容相匹配:名称、类型、地址和客户评价。
如果您想自行为地点详情添加type
类别,请提交地点修改建议。修改获得批准并发布后,系统会使用正确的 type
过滤条件显示该修改。
为什么未返回某些附近的地点?
默认情况下,Places API 会按所提供的 radius
内的 prominence
对结果进行排序。附近搜索请求最多可返回 60 条结果,分三页显示。如果某个地点在 prominence
中排名第 22 位,则会显示在结果的第二页上,您可以通过分页功能访问该页面。
如果某个地点的排名在 prominence
中低于第 60 位,即使它离搜索中心更近,也不会包含在搜索结果中。
您可以在查询中将 rankby
参数设置为 distance
并省略 radius
参数,从而按 distance
而不是 prominence
对结果进行排序。系统将忽略相关性,并按与 location
的距离顺序返回地点。
如果您按类型过滤请求,则某些结果可能会从响应中滤除。如需了解详情,请参阅常见问题解答条目:按类型过滤时,为什么系统不返回某些地点?。
为什么在按某些 types
过滤时,我最多只能获得两个结果?
Places API 旨在返回附近establishments
(受支持地点类型第一个表格中的任何内容)的列表,以及最多两个位置(受支持地点类型第二个表格中的任何内容)结果,以帮助确定您要执行附近搜索请求的区域。
按位置 type
(例如 locality
或 political
)过滤附近搜索请求会过滤掉 establishment
结果。
地点数据
如何添加或修改地点?
如果您是商家所有者,可以使用商家资料在 Google 地图上添加、验证和管理商家信息。
如果您不是该地点的业主,仍然可以建议更改。
问题排查
为什么我一直收到“status”: “REQUEST_DENIED”?
在以下情况下,Places API 会返回 "status": "REQUEST_DENIED"
:
- 您尚未在 Google Cloud 控制台中激活 Places API。
- 您的请求中缺少
key
参数。
key
参数与 Google Cloud 控制台中的 API 密钥不匹配。
- 您的 API 密钥未在 Google Cloud 控制台中正确设置:
- 如果您使用的是受浏览器限制的 API 密钥,请检查您的允许的引荐来源网址是否正确。
- 如果您使用的是受服务器限制的 API 密钥,请检查允许的 IP 是否正确。
- 不支持设置了 Android 或 iOS 限制的 API 密钥。使用通用(不受限)API 密钥,或使用存在浏览器或服务器限制的密钥。
- 请求未作为
HTTPS
请求发送,而所有 Places API 请求都需要 HTTPS
。
- 用于发送请求的
HTTP method
不正确。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eThis document provides answers to common questions about the Places API, covering topics like searching, place data, and troubleshooting.\u003c/p\u003e\n"],["\u003cp\u003ePlace results are sorted by prominence within a radius by default, but you can sort by distance instead; also, some places may be uncategorized or ranked too low to appear in results.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage business listings using Business Profile, suggest edits for places you don't own, and understand potential reasons for "REQUEST_DENIED" errors.\u003c/p\u003e\n"],["\u003cp\u003eThe Places API returns nearby establishments and up to two location results, with location type filtering potentially removing establishment results from the response.\u003c/p\u003e\n"]]],["The Places API categorizes new places as \"establishment\" until it gathers sufficient data. To find uncategorized places, use the `keyword` parameter. Nearby searches prioritize results by `prominence`, with up to 60 results across three pages, but can be sorted by `distance` using `rankby`. Filtering by location `types` limits results to locations. To add or edit places, owners use Business Profile, while others can suggest changes. \"REQUEST_DENIED\" errors occur due to API key issues, incorrect request methods, or non-HTTPS requests.\n"],null,["# Places Web Service Frequently Asked Questions\n\nThis document contains answers to frequently asked questions about the\nPlaces API. If you are unable to find the answer to your question here, you\nmay find some of the following pages helpful.\n\n- [Google Maps Developer FAQ](/maps/faq)\n- [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms)\n- [Places API Developer Policies](/maps/documentation/places/web-service/policies)\n\nThe Places API also has a vibrant developer community. If you have questions\nabout your code, we recommend that you post your question to the community. More\ninformation about asking questions can be found in the [Support page](/maps/documentation/places/web-service/support).\n\nSearch for places\n-----------------\n\n### Why are some places not returned when I filter by type?\n\nIt's possible that the place you are looking for has not yet been categorized.\nAll places are categorized as the generic type \"`establishment`\" until Google\nhas enough data about a place to categorize it as one of the [supported place\ntypes](/maps/documentation/places/web-service/supported_types).\n\nAs a workaround you can pass the place `type` to the `keyword` parameter. The\n`keyword` parameter is matched to: name, type, address, and customer reviews.\n\nIf you would like to add the category `type` to a place listing yourself,\n[submit a place edit](#how_do_i_add_or_edit_places). Once the edit has been\napproved and published it will appear using the correct `type` filtering.\n\n### Why are some nearby places not returned?\n\nBy default, the Places API sorts results by `prominence` within the supplied\n`radius`. A [Nearby Search](/maps/documentation/places/web-service/search#PlaceSearchRequests) request can return up to 60 results,\nsplit across three pages. If a place ranks 22nd in `prominence`, it will appear\non the second page of results which you can access through\n[paging](/maps/documentation/places/web-service/search#PlaceSearchPaging).\nIf a placeranks greater than 60th in `prominence` it won't be included in the\nsearch result, even if it is closer to the center of your search.\n\nYou can sort your results by `distance` instead of `prominence` by setting the\n`rankby` parameter in your query to `distance` and omitting the `radius`\nparameter. Relevance will be ignored and places will be returned in order of\ndistance from `location`.\n\nIf you are filtering your request by type, some results may be filtered out of\nthe response. For more information, see the FAQ entry: [Why are some places not\nreturned when I filter by\ntype?](#why_are_some_places_not_returned_when_i_filter_by_type).\n\n### Why do I receive at most two results when filtering by some `types`?\n\nThe Places API is designed to return a list of nearby `establishments`\n(anything from the\n[first table](/maps/documentation/places/web-service/supported_types)\nin the supported place types) and up to two location (anything from the\n[second table](/maps/documentation/places/web-service/supported_types#table2)\nof supported place types) results to to help identify the area you are\nperforming a [Nearby Search](/maps/documentation/places/web-service/search#PlaceSearchRequests) request for.\n\nFiltering your [Nearby Search](/maps/documentation/places/web-service/search#PlaceSearchRequests) request by a location `type`, like\n`locality` or `political`, will filter out the `establishment` results.\n\nPlace data\n----------\n\n### How can I add or edit places?\n\nIf you are the owner of a business, you can add, verify and manage your business\nlistings on Google Maps using [Business Profile](http://www.google.com/business/).\n\nIf you don't own the place, you can still [suggest\nchanges](https://support.google.com/maps/answer/7084895).\n\nTroubleshooting\n---------------\n\n### Why do I keep receiving \"status\": \"REQUEST_DENIED\"?\n\nThe `\"status\": \"REQUEST_DENIED\"` is returned by the Places API\nwhen:\n\n- You have not activated the Places API in the [Google Cloud console](https://console.cloud.google.com).\n- The `key` parameter is missing from your request.\n- The `key` parameter does not match the your API key in the [Google Cloud console](https://console.cloud.google.com).\n- Your API key has not been correctly set up in the [Google Cloud console](https://console.cloud.google.com):\n - If you are using a browser-restricted API key, check that your allowed referer(s) are correct.\n - If you are using a server-restricted API key, check that your allowed IP(s) are correct.\n - API keys with Android or iOS restrictions are not supported. Use a generic (unrestricted) API key, or a key with browser or server restrictions.\n- The request was not sent as an `HTTPS` request, `HTTPS` is required for all Places API requests.\n- The incorrect `HTTP method` was used to send the request."]]