Geocoding API
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แปลงที่อยู่เป็นพิกัดทางภูมิศาสตร์ (Geocoding) ซึ่งคุณใช้เพื่อวางเครื่องหมายหรือจัดตำแหน่งแผนที่ได้ นอกจากนี้ API นี้ยังช่วยให้คุณแปลงพิกัดทางภูมิศาสตร์เป็นที่อยู่ (การแปลงพิกัดทางภูมิศาสตร์แบบย้อนกลับ) ได้อีกด้วย
บริการ: geocoding-backend.googleapis.com
หากแอปพลิเคชันของคุณต้องใช้ไลบรารีของคุณเองเพื่อเรียกใช้บริการนี้ ให้ใช้ข้อมูลต่อไปนี้เมื่อส่งคำขอ API
เอกสารการค้นพบ
เอกสารการค้นพบเป็นข้อกำหนดที่เครื่องอ่านได้สำหรับการอธิบายและการใช้ REST API โดยใช้เพื่อสร้างไลบรารีของไคลเอ็นต์ ปลั๊กอิน IDE และเครื่องมืออื่นๆ ที่โต้ตอบกับ Google API บริการหนึ่งๆ อาจมีเอกสารการค้นพบหลายรายการ บริการนี้มีเอกสารการค้นพบต่อไปนี้
ปลายทางบริการ
ปลายทางบริการคือ URL ฐานที่ระบุที่อยู่เครือข่ายของบริการ API บริการหนึ่งๆ อาจมีปลายทางบริการหลายรายการ บริการนี้มีปลายทางของบริการต่อไปนี้ และ URI ทั้งหมดด้านล่างจะเกี่ยวข้องกับปลายทางของบริการนี้
https://geocode.googleapis.com
เมธอด |
geocodeAddress |
GET /v4beta/geocode/address
เมธอดนี้จะทำการเข้ารหัสพิกัดภูมิศาสตร์ของที่อยู่ ซึ่งจะแมปที่อยู่กับ LatLng |
geocodeAddressQuery |
GET /v4beta/geocode/address/{addressQuery}
เมธอดนี้จะทำการเข้ารหัสพิกัดภูมิศาสตร์ของที่อยู่ ซึ่งจะแมปที่อยู่กับ LatLng |
เมธอด |
geocodeLocation |
GET /v4beta/geocode/location
วิธีนี้จะดำเนินการรหัสพิกัดภูมิศาสตร์ของตำแหน่ง ซึ่งจะแมป LatLng กับที่อยู่ |
geocodeLocationQuery |
GET /v4beta/geocode/location/{locationQuery}
วิธีนี้จะดำเนินการรหัสพิกัดภูมิศาสตร์ของตำแหน่ง ซึ่งจะแมป LatLng กับที่อยู่ |
เมธอด |
geocodePlace |
GET /v4beta/geocode/{place=places/*}
เมธอดนี้จะทำการค้นหา Geocode โดยใช้รหัสสถานที่ |
เมธอด |
searchDestinations |
POST /v4alpha/geocode/destinations
เมธอดนี้จะทำการค้นหาปลายทางและแสดงรายการปลายทาง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-13 UTC
[null,null,["อัปเดตล่าสุด 2025-08-13 UTC"],[],[],null,["# Geocoding API\n\nConvert addresses into geographic coordinates (geocoding), which you can use to place markers or position the map. This API also allows you to convert geographic coordinates into an address (reverse geocoding).\n\n- [REST Resource: v4beta.geocode.address](#v4beta.geocode.address)\n- [REST Resource: v4beta.geocode.location](#v4beta.geocode.location)\n- [REST Resource: v4beta.geocode.places](#v4beta.geocode.places)\n- [REST Resource: v4alpha.geocode.destinations](#v4alpha.geocode.destinations)\n\nService: geocoding-backend.googleapis.com\n-----------------------------------------\n\nIf your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:\n\n- \u003chttps://geocoding-backend.googleapis.com/$discovery/rest?version=v4beta\u003e\n- \u003chttps://geocoding-backend.googleapis.com/$discovery/rest?version=v4alpha\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://geocode.googleapis.com`\n\nREST Resource: [v4beta.geocode.address](/maps/documentation/geocoding/reference/rest/v4beta/geocode.address)\n------------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [geocodeAddress](/maps/documentation/geocoding/reference/rest/v4beta/geocode.address/geocodeAddress) | `GET /v4beta/geocode/address` This method performs an address geocode, which maps an address to a LatLng. |\n| [geocodeAddressQuery](/maps/documentation/geocoding/reference/rest/v4beta/geocode.address/geocodeAddressQuery) | `GET /v4beta/geocode/address/{addressQuery}` This method performs an address geocode, which maps an address to a LatLng. |\n\nREST Resource: [v4beta.geocode.location](/maps/documentation/geocoding/reference/rest/v4beta/geocode.location)\n--------------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| [geocodeLocation](/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation) | `GET /v4beta/geocode/location` This method performs a location geocode, which maps a LatLng to an address. |\n| [geocodeLocationQuery](/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocationQuery) | `GET /v4beta/geocode/location/{locationQuery}` This method performs a location geocode, which maps a LatLng to an address. |\n\nREST Resource: [v4beta.geocode.places](/maps/documentation/geocoding/reference/rest/v4beta/geocode.places)\n----------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| [geocodePlace](/maps/documentation/geocoding/reference/rest/v4beta/geocode.places/geocodePlace) | `GET /v4beta/geocode/{place=places/*}` This method performs a geocode lookup using a place ID. |\n\nREST Resource: [v4alpha.geocode.destinations](/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations)\n------------------------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [searchDestinations](/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations) | `POST /v4alpha/geocode/destinations` This method performs a destination lookup and returns a list of destinations. |"]]