Places API (New)
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.
Places API cho phép nhà phát triển truy cập nhiều điểm cuối tìm kiếm và truy xuất của một Địa điểm.
Dịch vụ: places.googleapis.com
Để gọi dịch vụ này, bạn nên sử dụng thư viện ứng dụng do Google cung cấp. Nếu ứng dụng của bạn cần sử dụng thư viện của riêng bạn để gọi dịch vụ này, hãy sử dụng thông tin sau đây khi đưa ra yêu cầu API.
Tài liệu khám phá
Tài liệu khám phá là thông số kỹ thuật mà máy có thể đọc được để mô tả và sử dụng các API REST. Thư viện này được dùng để xây dựng 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 các 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 tài liệu khám phá sau đây:
Đ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 của dịch vụ sau đây và tất cả URI bên dưới đều liên quan đến điểm cuối của dịch vụ này:
https://places.googleapis.com
Phương thức |
autocomplete |
POST /v1/places:autocomplete
Trả về kết quả dự đoán cho dữ liệu nhập đã cho. |
get |
GET /v1/{name=places/*}
Lấy thông tin chi tiết về một địa điểm dựa trên tên tài nguyên của địa điểm đó, là một chuỗi ở định dạng places/{place_id} . |
searchNearby |
POST /v1/places:searchNearby
Tìm địa điểm gần các địa điểm. |
searchText |
POST /v1/places:searchText
Tìm kiếm địa điểm dựa trên cụm từ tìm kiếm văn bản. |
Phương thức |
getMedia |
GET /v1/{name=places/*/photos/*/media}
Nhận nội dung nghe nhìn dạng ảnh có chuỗi tham chiếu ảnh. |
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-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eThe Places API gives developers access to search and retrieval endpoints for places data.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers functionalities such as place autocomplete, details retrieval, nearby search, and text-based search.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can retrieve photos associated with places using the \u003ccode\u003eplaces.photos\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eThe service endpoint for the Places API is \u003ccode\u003ehttps://places.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGoogle-provided client libraries are recommended for interacting with the API.\u003c/p\u003e\n"]]],["The Places API offers `v1.places` and `v1.places.photos` resources via the `places.googleapis.com` service. Developers can utilize Google-provided client libraries or their own to make API requests. The `v1.places` resource supports methods for place-related actions such as `autocomplete`, `get` (details), `searchNearby`, and `searchText`. The `v1.places.photos` resource's `getMedia` method retrieves photo media using a photo reference string. The service's base URL is `https://places.googleapis.com`.\n"],null,["# Places API (New)\n\nThe Places API allows developers to access a variety of search and retrieval endpoints for a Place.\n\n- [REST Resource: v1.places](#v1.places)\n- [REST Resource: v1.places.photos](#v1.places.photos)\n\nService: places.googleapis.com\n------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If 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 document:\n\n- \u003chttps://places.googleapis.com/$discovery/rest?version=v1\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://places.googleapis.com`\n\nREST Resource: [v1.places](/maps/documentation/places/web-service/reference/rest/v1/places)\n-------------------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [autocomplete](/maps/documentation/places/web-service/reference/rest/v1/places/autocomplete) | `POST /v1/places:autocomplete` Returns predictions for the given input. |\n| [get](/maps/documentation/places/web-service/reference/rest/v1/places/get) | `GET /v1/{name=places/*}` Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format. |\n| [searchNearby](/maps/documentation/places/web-service/reference/rest/v1/places/searchNearby) | `POST /v1/places:searchNearby` Search for places near locations. |\n| [searchText](/maps/documentation/places/web-service/reference/rest/v1/places/searchText) | `POST /v1/places:searchText` Text query based place search. |\n\nREST Resource: [v1.places.photos](/maps/documentation/places/web-service/reference/rest/v1/places.photos)\n---------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [getMedia](/maps/documentation/places/web-service/reference/rest/v1/places.photos/getMedia) | `GET /v1/{name=places/*/photos/*/media}` Get a photo media with a photo reference string. |"]]