Method: geocode.address.geocodeAddressQuery
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
วิธีนี้จะดำเนินการรหัสพิกัดภูมิศาสตร์ของที่อยู่ ซึ่งจะแมปที่อยู่กับ LatLng นอกจากนี้ยังให้ข้อมูลที่มีโครงสร้างเกี่ยวกับที่อยู่ด้วย
คำขอ HTTP
GET https://geocode.googleapis.com/v4beta/geocode/address/{addressQuery}
URL ใช้ไวยากรณ์การแปลงรหัส gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
พารามิเตอร์ Union address_input ที่อยู่ที่ต้องการเข้ารหัสพิกัดภูมิศาสตร์ address_input ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น |
addressQuery |
string
ที่อยู่ที่ไม่มีโครงสร้างที่จะเข้ารหัสพิกัดภูมิศาสตร์
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
locationBias |
object (GeocodeAddressRequest.LocationBias )
ไม่บังคับ ภูมิภาคที่จะค้นหา ตำแหน่งนี้ทำหน้าที่เป็นอคติ ซึ่งหมายความว่าระบบอาจแสดงผลลัพธ์ที่อยู่รอบๆ ตำแหน่งที่ระบุ
|
languageCode |
string
ไม่บังคับ ภาษาที่ควรแสดงผลลัพธ์
|
regionCode |
string
ไม่บังคับ รหัสภูมิภาค รหัสภูมิภาคที่ระบุเป็นค่า ccTLD ("โดเมนระดับบนสุด") 2 อักขระ พารามิเตอร์นี้จะส่งผลต่อผลลัพธ์ตามกฎหมายที่เกี่ยวข้อง พารามิเตอร์นี้จะส่งผลต่อผลลัพธ์จากบริการด้วย แต่จะไม่จำกัดผลลัพธ์ทั้งหมด
|
พารามิเตอร์ Union address_input ที่อยู่ที่ต้องการเข้ารหัสพิกัดภูมิศาสตร์ address_input ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น |
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
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[],[],null,["# Method: geocode.address.geocodeAddressQuery\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\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/{addressQuery}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------|\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\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| `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`"]]