Этот метод выполняет геокодирование местоположения, сопоставляя координаты LatLng с адресом. Он также предоставляет структурированную информацию об адресе.
HTTP-запрос
GET https://geocode.googleapis.com/v4beta/geocode/location/{locationQuery}
Параметр объединения location_input . Местоположение для геокодирования. location_input может быть только одним из следующих:
locationQuery
string
Местоположение в формате строки «lat,lng». Например, «64.7611872,-18.4705364».
Параметры запроса
Параметры
languageCode
string
Необязательно. Язык, на котором должны быть возвращены результаты.
regionCode
string
Необязательный. Код региона. Код региона, указанный как двухсимвольное значение ccTLD («домен верхнего уровня»). Параметр влияет на результаты в соответствии с действующим законодательством.
types[]
string
Необязательно. Набор тегов типа для ограничения результатов. Результаты, не соответствующие ни одному из указанных типов, удаляются.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-08-13 UTC."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\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\nHTTP request\n\n`GET https://geocode.googleapis.com/v4beta/geocode/location/{locationQuery}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|-----------------|-------------------------------------------------------------------------------------------------|\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\nQuery 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 (`[Granularity](/maps/documentation/geocoding/reference/rest/v4beta/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| `location` | `object (`[LatLng](/maps/documentation/geocoding/reference/rest/v4beta/LatLng)`)` The location in the structured format. |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body\n\nIf successful, the response body contains an instance of [GeocodeLocationResponse](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeLocationResponse).\n\nAuthorization 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`"]]