Places API (New)
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Places API umożliwia programistom dostęp do różnych punktów końcowych wyszukiwania i pobierania miejsc.
Usługa: places.googleapis.com
W celu wywołania tej usługi zalecamy użycie dostarczonych przez Google bibliotek klienta. Jeśli do wywołania tej usługi aplikacja musi używać własnych bibliotek, podczas tworzenia żądań do interfejsu API używaj podanych niżej informacji.
Dokument opisujący
Dokument opisujący to czytelna dla komputera specyfikacja opisująca interfejsy API REST i korzystanie z nich. Służy do tworzenia bibliotek klienta, wtyczek IDE i innych narzędzi, które współdziałają z interfejsami API Google. Jedna usługa może udostępniać wiele dokumentów opisujących. Ta usługa dostarcza następujący dokument opisujący interfejs API:
Punkt końcowy usługi
Punkt końcowy usługi to podstawowy adres URL, który określa adres sieciowy usługi interfejsu API. Jedna usługa może mieć wiele punktów końcowych. Ta usługa ma następujący punkt końcowy, a wszystkie poniższe identyfikatory URI odnoszą się do niego:
https://places.googleapis.com
Metody |
autocomplete |
POST /v1/places:autocomplete Zwraca prognozy dla podanych danych wejściowych. |
get |
GET /v1/{name=places/*} Uzyskuj informacje o miejscu na podstawie jego nazwy zasobu, która jest ciągiem znaków w formacie places/{place_id} . |
searchNearby |
POST /v1/places:searchNearby
Wyszukuj miejsca w pobliżu lokalizacji. |
searchText |
POST /v1/places:searchText
Wyszukiwanie miejsc na podstawie zapytania. |
Metody |
getMedia |
GET /v1/{name=places/*/photos/*/media}
Pobierz plik multimedialny ze zdjęciem z ciągiem referencyjnym zdjęcia. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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,["# 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. |"]]