Method: geocode.address.geocodeAddress
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Metode ini melakukan geocode alamat, yang memetakan alamat ke LatLng. API ini juga memberikan informasi terstruktur tentang alamat.
Permintaan HTTP
GET https://geocode.googleapis.com/v4beta/geocode/address
URL menggunakan sintaksis gRPC Transcoding.
Parameter kueri
Parameter |
locationBias |
object (GeocodeAddressRequest.LocationBias )
Opsional. Wilayah yang akan ditelusuri. Lokasi ini berfungsi sebagai bias yang berarti hasil di sekitar lokasi tertentu dapat ditampilkan.
|
languageCode |
string
Opsional. Bahasa yang digunakan untuk menampilkan hasil.
|
regionCode |
string
Opsional. Kode wilayah. Kode wilayah, yang ditentukan sebagai nilai dua karakter ccTLD ("domain level teratas"). Parameter ini memengaruhi hasil berdasarkan hukum yang berlaku. Parameter ini juga akan memengaruhi, tetapi tidak sepenuhnya membatasi, hasil dari layanan.
|
Parameter gabungan address_input . Alamat yang akan di-geocode. address_input hanya dapat berupa salah satu dari berikut: |
addressQuery |
string
Alamat tidak terstruktur yang akan di-geocode.
|
address |
object (PostalAddress )
Alamat terstruktur yang akan di-geocode dalam format alamat pos.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons memuat instance GeocodeAddressResponse
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/maps-platform.geocode
https://www.googleapis.com/auth/maps-platform.geocode.address
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-31 UTC.
[null,null,["Terakhir diperbarui pada 2025-08-31 UTC."],[],[],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`"]]