Geocoding API
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chuyển đổi địa chỉ thành toạ độ địa lý (mã hoá địa lý). Bạn có thể dùng toạ độ này để đặt điểm đánh dấu hoặc định vị bản đồ. API này cũng cho phép bạn chuyển đổi toạ độ địa lý thành địa chỉ (mã hoá địa lý ngược).
Dịch vụ: geocoding-backend.googleapis.com
Nếu ứng dụng của bạn cần sử dụng các thư viện riêng để gọi dịch vụ này, hãy sử dụng thông tin sau khi bạn thực hiện các yêu cầu API.
Tài liệu khám phá
Tài liệu khám phá là một quy cách có thể đọc được bằng máy để mô tả và sử dụng API REST. Thư viện này được dùng để tạo các thư viện ứng dụng, trình bổ trợ IDE và các công cụ khác tương tác với API của Google. Một dịch vụ có thể cung cấp nhiều tài liệu khám phá. Dịch vụ này cung cấp các tài liệu khám phá sau:
Điểm cuối dịch vụ
Điểm cuối dịch vụ là một URL cơ sở chỉ định địa chỉ mạng của một dịch vụ API. Một dịch vụ có thể có nhiều điểm cuối dịch vụ. Dịch vụ này có điểm cuối dịch vụ sau và tất cả URI bên dưới đều liên quan đến điểm cuối dịch vụ này:
https://geocode.googleapis.com
Phương thức |
geocodeAddress |
GET /v4beta/geocode/address
Phương thức này thực hiện một mã địa lý địa chỉ, ánh xạ một địa chỉ đến một LatLng. |
geocodeAddressQuery |
GET /v4beta/geocode/address/{addressQuery}
Phương thức này thực hiện một mã địa lý địa chỉ, ánh xạ một địa chỉ đến một LatLng. |
Phương thức |
geocodeLocation |
GET /v4beta/geocode/location
Phương thức này thực hiện một mã địa lý vị trí, giúp liên kết một LatLng với một địa chỉ. |
geocodeLocationQuery |
GET /v4beta/geocode/location/{locationQuery}
Phương thức này thực hiện một mã địa lý vị trí, giúp liên kết một LatLng với một địa chỉ. |
Phương thức |
geocodePlace |
GET /v4beta/geocode/{place=places/*}
Phương thức này thực hiện một thao tác tra cứu mã hoá địa lý bằng mã địa điểm. |
Phương thức |
searchDestinations |
POST /v4alpha/geocode/destinations
Phương thức này thực hiện một thao tác tra cứu đích đến và trả về danh sách đích đến. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-13 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]