Để 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ụ 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:
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 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,["The 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\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\nDiscovery 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\nService 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| 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| 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. |"]]