Geocoding API v4 概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
此版本的地理编码 API v4 包含以下端点:
地理编码 API v4 在 Google Cloud 的服务基础架构上实现。此实现带来了更安全、更可信的平台,并提供了增强的安全选项,例如 OAuth。这种标准 API 设计可提高 API 之间的一致性,从而提高使用 Geocoding API v4 进行开发的效率。
添加了 OAuth 支持
Geocoding API v4 支持使用 OAuth 2.0 进行身份验证。Google 支持常见的 OAuth 2.0 用例,例如网络服务器用例。
添加了字段掩码支持
使用字段掩码指定响应应返回哪些信息。对于对地址进行地理编码、对位置进行地理编码和地点地理编码端点,默认情况下会返回响应对象中的所有字段。对于搜索目的地端点,您必须在 API 请求中指定字段掩码。
在预览版期间使用无需付费
Geocoding API v4 处于正式发布前预览阶段,在预览期间使用该 API 不会产生任何费用。API 调用将显示在 Cloud 控制台的“结算”页面上,但费用将为 0 美元。
反馈
这是一项预览版功能。欢迎发送电子邮件至 geocoding-feedback-channel@google.com 提供反馈。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Geocoding API v4 overview\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThis release of Geocoding API v4 includes the release of the\nfollowing endpoints:\n\n- (Preview) [Geocode an address](/maps/documentation/geocoding/geocoding) --- Also called *forward geocoding*.\n- (Preview) [Geocode a location](/maps/documentation/geocoding/reverse-geocoding) --- Also called *reverse geocoding*.\n- (Preview) [Place geocoding](/maps/documentation/geocoding/places-geocoding) --- Retrieve an address from a place ID.\n- (Experimental) [Search for destinations](/maps/documentation/geocoding/search-for-destinations) --- Search for a destination from an address, place ID, or location.\n\nImplemented on the Google Cloud standard platform\n-------------------------------------------------\n\nGeocoding API v4 is implemented on the [service\ninfrastructure](https://cloud.google.com/service-infrastructure/docs/overview)\non Google Cloud. This implementation brings with it a more secure and trusted\nplatform with enhanced security options like\n[OAuth](/maps/documentation/places/web-service/oauth-token). This standard API\ndesign brings a level of consistency across the APIs that improve the efficiency\nof development with Geocoding API v4.\n\nOAuth support added\n-------------------\n\nGeocoding API v4 supports the use of [OAuth\n2.0](/maps/documentation/geocoding/oauth-token) for authentication. Google\nsupports common OAuth 2.0 scenarios such as those for a web server.\n\nField mask support added\n------------------------\n\nUse [field masks](/maps/documentation/geocoding/choose-fields) to specify what\ninformation the response should return. For the [Geocode an address](/maps/documentation/geocoding/geocoding),\n[Geocode a location](/maps/documentation/geocoding/reverse-geocoding), and\n[Place geocoding](/maps/documentation/geocoding/places-geocoding) endpoints, all\nfields in the response object are returned by default. For the\n[Search for destinations](/maps/documentation/geocoding/search-for-destinations)\nendpoint, you must specify a field mask in the API request.\n\nNo cost for usage during Preview\n--------------------------------\n\nGeocoding API v4 is in the pre-GA Preview stage, and there is no charge for\nAPI usage during Preview. API calls will appear on the Billing page in the Cloud\nConsole, but charges will be $0.\n\nFeedback\n--------\n\nThis is a Preview feature. We would appreciate feedback at\n[geocoding-feedback-channel@google.com](mailto:geocoding-feedback-channel@google.com)."]]