Method: geocode.address.geocodeAddress
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
這個方法會執行地址地理編碼,將地址對應至 LatLng。此外,也會提供地址的結構化資訊。
HTTP 要求
GET https://geocode.googleapis.com/v4beta/geocode/address
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
locationBias |
object (GeocodeAddressRequest.LocationBias )
(選用步驟) 要搜尋的區域。這個位置會做為偏差值,也就是說,系統可能會傳回指定位置附近的結果。
|
languageCode |
string
(選用步驟) 傳回結果時使用的語言。
|
regionCode |
string
(選用步驟) 區域代碼。區碼,指定為 ccTLD (「頂層網域」) 的兩位字元值。這個參數會根據適用法律影響結果。這項參數也會影響服務提供的結果,但不會完全限制。
|
聯集參數 address_input 。要進行地理編碼的地址。address_input 只能是下列其中一項: |
addressQuery |
string
要進行地理編碼的非結構化地址。
|
address |
object (PostalAddress )
要以郵政地址格式進行地理編碼的結構化地址。
|
回應主體
如果成功,回應主體會包含 GeocodeAddressResponse
的執行例項。
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/maps-platform.geocode
https://www.googleapis.com/auth/maps-platform.geocode.address
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[],[],null,["# Method: geocode.address.geocodeAddress\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nThis method performs an address geocode, which maps an address to a LatLng. It also provides structured information about the address.\n\n### HTTP request\n\n`GET https://geocode.googleapis.com/v4beta/geocode/address`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locationBias` | `object (`[GeocodeAddressRequest.LocationBias](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeAddressRequest.LocationBias)`)` Optional. The region to search. This location serves as a bias which means results around given location might be returned. |\n| `languageCode` | `string` Optional. Language in which the results should be returned. |\n| `regionCode` | `string` Optional. Region code. The region code, specified as a ccTLD (\"top-level domain\") two-character value. The parameter affects results based on applicable law. This parameter will also influence, but not fully restrict, results from the service. |\n| Union parameter `address_input`. The address to geocode. `address_input` can be only one of the following: ||\n| `addressQuery` | `string` The unstructured address to geocode. |\n| `address` | `object (`[PostalAddress](/maps/documentation/geocoding/reference/rest/Shared.Types/PostalAddress)`)` The structured address to geocode in postal address format. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [GeocodeAddressResponse](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeAddressResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode.address`"]]