Method: geocode.location.geocodeLocation
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit dieser Methode wird eine Standort-Geocodierung durchgeführt, bei der ein LatLng einer Adresse zugeordnet wird. Außerdem werden strukturierte Informationen zur Adresse bereitgestellt.
HTTP-Anfrage
GET https://geocode.googleapis.com/v4beta/geocode/location
Die URL verwendet die Syntax der gRPC-Transcodierung.
Abfrageparameter
Parameter |
languageCode |
string
Optional. Sprache, in der die Ergebnisse zurückgegeben werden sollen.
|
regionCode |
string
Optional. Regionscode. Der Regionscode, angegeben als zweistelliger Ländercode der Top-Level-Domain (ccTLD). Der Parameter wirkt sich auf Ergebnisse aus, die auf anwendbarem Recht basieren.
|
types[] |
string
Optional. Eine Reihe von Typ-Tags, um die Ergebnisse einzuschränken. Ergebnisse, die keinen der angegebenen Typen haben, werden entfernt. Eine vollständige Liste der möglichen Werte finden Sie in Tabelle A und Tabelle B unter https://developers.google.com/maps/documentation/places/web-service/place-types.
|
granularity[] |
enum (GeocodeResult.Granularity )
Optional. Ein Filter mit mindestens einem Enum für die Standortgranularität.
|
Union-Parameter location_input . Der Ort, der geocodiert werden soll. Für location_input ist nur einer der folgenden Werte zulässig: |
locationQuery |
string
Der Standort im Format „lat,lng“ (String). Beispiel: „64.7611872,-18.4705364“.
|
location |
object (LatLng )
Der Standort im strukturierten Format.
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von GeocodeLocationResponse
.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/maps-platform.geocode
https://www.googleapis.com/auth/maps-platform.geocode.location
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-31 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-31 (UTC)."],[],[],null,["# Method: geocode.location.geocodeLocation\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nThis method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.\n\n### HTTP request\n\n`GET https://geocode.googleapis.com/v4beta/geocode/location`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` Optional. Language in which the results should be returned. |\n| `regionCode` | `string` Optional. Region code. The region code, specified as a ccTLD (\"top-level domain\") two-character value. The parameter affects results based on applicable law. |\n| `types[]` | `string` Optional. A set of type tags to restrict the results. Results that do not have any of the specified types are removed. For the complete list of possible values, see Table A and Table B at \u003chttps://developers.google.com/maps/documentation/places/web-service/place-types\u003e. |\n| `granularity[]` | `enum (`[GeocodeResult.Granularity](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeResult.Granularity)`)` Optional. A filter of one or more location granularity enums. |\n| Union parameter `location_input`. The location to geocode. `location_input` can be only one of the following: ||\n| `locationQuery` | `string` The location in the format of \"lat,lng\" string. For example, \"64.7611872,-18.4705364\". |\n| `location` | `object (`[LatLng](/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng)`)` The location in the structured format. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [GeocodeLocationResponse](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeLocationResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode.location`"]]