Package google.maps.places.v1

Индекс

Места

Определение сервиса для API Places. Примечание: для каждого запроса (кроме запросов Autocomplete и GetPhotoMedia) требуется маска поля, заданная вне протокола запроса ( all/* не предполагается). Маску поля можно задать через HTTP-заголовок X-Goog-FieldMask . См.: https://developers.google.com/maps/documentation/places/web-service/choose-fields

Автозаполнение мест

rpc AutocompletePlaces( AutocompletePlacesRequest ) returns ( AutocompletePlacesResponse )

Возвращает прогнозы для заданных входных данных.

Области авторизации

Требуется следующая область OAuth:

  • https://www.googleapis.com/auth/cloud-platform
GetPhotoMedia

rpc GetPhotoMedia( GetPhotoMediaRequest ) returns ( PhotoMedia )

Получите фотоноситель со строкой ссылки на фотографию.

Области авторизации

Требуется следующая область OAuth:

  • https://www.googleapis.com/auth/cloud-platform
GetPlace

rpc GetPlace( GetPlaceRequest ) returns ( Place )

Получите подробную информацию о месте на основе названия его ресурса, которое представляет собой строку в формате places/{place_id} .

Области авторизации

Требуется следующая область OAuth:

  • https://www.googleapis.com/auth/cloud-platform
Поиск рядом

rpc SearchNearby( SearchNearbyRequest ) returns ( SearchNearbyResponse )

Поиск мест вблизи локаций.

Области авторизации

Требуется следующая область OAuth:

  • https://www.googleapis.com/auth/cloud-platform
SearchText

rpc SearchText( SearchTextRequest ) returns ( SearchTextResponse )

Поиск мест на основе текстового запроса.

Области авторизации

Требуется следующая область OAuth:

  • https://www.googleapis.com/auth/cloud-platform

АдресДескриптор

Относительное описание местоположения. Включает в себя ранжированный набор близлежащих ориентиров и точные области, а также их связь с целевым местоположением.

Поля
landmarks[]

Landmark

Рейтинг ближайших достопримечательностей. Самые узнаваемые и ближайшие достопримечательности расположены первыми.

areas[]

Area

Ранжированный список содержащих или смежных областей. Наиболее узнаваемые и точные области ранжируются первыми.

Область

Информация о местности и ее взаимосвязь с целевым местоположением.

Районы включают в себя точные микрорайоны, кварталы и крупные комплексы, которые полезны для описания местоположения.

Поля
name

string

Название ресурса области.

place_id

string

Идентификатор места в этом районе.

display_name

LocalizedText

Отображаемое название области.

containment

Containment

Определяет пространственное соотношение между целевым местоположением и областью.

Сдерживание

Определяет пространственное соотношение между целевым местоположением и областью.

Перечисления
CONTAINMENT_UNSPECIFIED Условия сдерживания не определены.
WITHIN Местоположение объекта находится в пределах района, недалеко от центра.
OUTSKIRTS Местоположение цели находится в пределах области, близко к краю.
NEAR Местоположение объекта находится за пределами региона, но поблизости.

Достопримечательность

Основная информация об ориентире и его взаимосвязь с целевым местоположением.

Достопримечательности — это заметные места, которые можно использовать для описания местоположения.

Поля
name

string

Название ресурса достопримечательности.

place_id

string

Идентификатор места достопримечательности.

display_name

LocalizedText

Отображаемое название достопримечательности.

types[]

string

Набор тегов типа для этого ориентира. Полный список возможных значений см. на странице https://developers.google.com/maps/documentation/places/web-service/place-types .

spatial_relationship

SpatialRelationship

Определяет пространственное соотношение между целевым местоположением и ориентиром.

straight_line_distance_meters

float

Расстояние по прямой в метрах между центральной точкой цели и центральной точкой ориентира. В некоторых случаях это значение может превышать travel_distance_meters .

travel_distance_meters

float

Расстояние, пройденное по дорожной сети от цели до ориентира (если известно), в метрах. Это значение не учитывает способ передвижения (например, пешком, на машине или велосипеде).

Пространственные отношения

Определяет пространственное соотношение между целевым местоположением и ориентиром.

Перечисления
NEAR Это соотношение применяется по умолчанию, когда не применимо ничего более конкретного из приведенных ниже.
WITHIN Ориентир имеет пространственную геометрию, и цель находится в его пределах.
BESIDE Цель находится непосредственно рядом с ориентиром.
ACROSS_THE_ROAD Цель находится прямо напротив ориентира на другой стороне дороги.
DOWN_THE_ROAD На том же маршруте, что и ориентир, но не рядом или поперёк.
AROUND_THE_CORNER Не на том же маршруте, что и достопримечательность, а на одном повороте от нее.
BEHIND Рядом с строением достопримечательности, но дальше от ее уличных входов.

Авторство

Информация об авторе данных пользовательского контента. Используется в разделе Photo и Review .

Поля
display_name

string

Имя автора Photo или Review .

uri

string

URI автора Photo или Review .

photo_uri

string

URI фотографии профиля автора Photo или Review .

AutocompletePlacesRequest

Запросить прототип для AutocompletePlaces.

Поля
input

string

Обязательно. Текстовая строка для поиска.

location_bias

LocationBias

Необязательно. Смещение результатов в указанное место.

Следует задать максимум один из параметров location_bias или location_restriction . Если ни один из них не задан, результаты будут смещены по IP-адресу, то есть IP-адрес будет сопоставлен с неточным местоположением и использован в качестве сигнала смещения.

location_restriction

LocationRestriction

Необязательно. Ограничьте результаты указанным местоположением.

Следует задать максимум один из параметров location_bias или location_restriction . Если ни один из них не задан, результаты будут смещены по IP-адресу, то есть IP-адрес будет сопоставлен с неточным местоположением и использован в качестве сигнала смещения.

included_primary_types[]

string

Необязательно. Включен основной тип места (например, «ресторан» или «заправочная станция») в типы мест ( https://developers.google.com/maps/documentation/places/web-service/place-types) или только (regions) или только (cities) . Место возвращается только в том случае, если его основной тип включен в этот список. Можно указать до 5 значений. Если типы не указаны, возвращаются все типы мест.

included_region_codes[]

string

Необязательно. Включать результаты только в указанных регионах, заданных как до 15 двухсимвольных кодов регионов CLDR. Пустой набор не ограничивает результаты. Если заданы оба location_restriction и included_region_codes , результаты будут расположены в области пересечения.

language_code

string

Необязательно. Язык, на котором возвращаются результаты. По умолчанию — en-US. Результаты могут быть на смешанных языках, если язык, используемый во input , отличается от language_code или если возвращаемое место не имеет перевода с локального языка на language_code .

region_code

string

Необязательный параметр. Код региона, указанный как двухсимвольный код региона CLDR. Он влияет на форматирование адреса, ранжирование результатов и может влиять на возвращаемые результаты. Это не ограничивает результаты указанным регионом. Чтобы ограничить результаты регионом, используйте region_code_restriction .

origin

LatLng

Необязательно. Начальная точка, от которой рассчитывается геодезическое расстояние до пункта назначения (возвращается как distance_meters ). Если это значение пропущено, геодезическое расстояние не будет возвращено.

input_offset

int32

Необязательно. Смещение символа Unicode, начинающееся с нуля, указывает позицию курсора в input input Положение курсора может влиять на возвращаемые прогнозы.

Если пусто, по умолчанию используется длина input .

include_query_predictions

bool

Необязательно. Если true, ответ будет включать как прогнозы по месту, так и по запросу. В противном случае ответ будет содержать только прогнозы по месту.

session_token

string

Необязательная строка. Строка, идентифицирующая сеанс автозаполнения для выставления счетов. Должна представлять собой строку в формате base64, безопасную для URL и имени файла, длиной не более 36 символов ASCII. В противном случае возвращается ошибка INVALID_ARGUMENT.

Сеанс начинается с того, что пользователь начинает вводить запрос, и завершается выбором места и вызовом функции проверки сведений о месте или адреса. В каждом сеансе может быть несколько запросов, за которыми следует один запрос на проверку сведений о месте или адреса. Учётные данные, используемые для каждого запроса в рамках сеанса, должны принадлежать одному проекту Google Cloud Console. После завершения сеанса токен становится недействительным; ваше приложение должно генерировать новый токен для каждого сеанса. Если параметр session_token пропущен или вы повторно используете токен сеанса, сеанс тарифицируется так, как если бы токен сеанса не предоставлялся (каждый запрос оплачивается отдельно).

Мы рекомендуем следующие рекомендации:

  • Используйте токены сеанса для всех вызовов Place Autocomplete.
  • Генерируйте новый токен для каждого сеанса. Рекомендуется использовать UUID версии 4.
  • Убедитесь, что учетные данные, используемые для всех запросов Place Autocomplete, Place Details и Address Validation в рамках сеанса, принадлежат одному и тому же проекту Cloud Console.
  • Обязательно передавайте уникальный токен сеанса для каждого нового сеанса. Использование одного и того же токена для нескольких сеансов приведёт к тому, что каждый запрос будет оплачиваться отдельно.
include_pure_service_area_businesses

bool

Необязательно. Включайте компании, работающие исключительно в зоне обслуживания, если поле установлено как true. Компании, работающие исключительно в зоне обслуживания, — это компании, которые посещают клиентов или доставляют им товары напрямую, но не обслуживают их по адресу. Например, компании, предоставляющие услуги по уборке или сантехнике. У таких компаний нет физического адреса или местоположения на Google Картах. Функция Places не будет возвращать поля, включая location , plus_code и другие поля, связанные с местоположением, для этих компаний.

МестоположениеBias

Регион поиска. Результаты могут быть смещены относительно указанного региона.

Поля

type поля «Союз».

type может быть только одним из следующих:

rectangle

Viewport

Область просмотра, определяемая северо-восточным и юго-западным углом.

circle

Circle

Окружность, определяемая центральной точкой и радиусом.

МестоположениеОграничение

Регион поиска. Результаты будут ограничены указанным регионом.

Поля

type поля «Союз».

type может быть только одним из следующих:

rectangle

Viewport

Область просмотра, определяемая северо-восточным и юго-западным углом.

circle

Circle

Окружность, определяемая центральной точкой и радиусом.

AutocompletePlacesResponse

Прототип ответа для AutocompletePlaces.

Поля
suggestions[]

Suggestion

Содержит список предложений, упорядоченных в порядке убывания релевантности.

Предположение

Результат предложения автозаполнения.

Поля

kind поля Союза.

kind может быть только одним из следующих:

place_prediction

PlacePrediction

Прогноз для Места.

query_prediction

QueryPrediction

Прогноз для запроса.

ФорматируемыйТекст

Текст, представляющий место или подсказку по запросу. Текст можно использовать как есть или отформатировать.

Поля
text

string

Текст, который можно использовать как есть или отформатировать с помощью matches .

matches[]

StringRange

Список диапазонов строк, указывающих, где запрос ввода совпал с text . Эти диапазоны можно использовать для форматирования отдельных частей text . Подстроки могут не совпадать с input в точности, если совпадение определялось по критериям, отличным от соответствия строк (например, исправление орфографии или транслитерация).

Эти значения представляют собой смещения символов Unicode в text . Диапазоны гарантированно упорядочены по возрастанию значений смещения.

PlacePrediction

Результаты прогнозирования для функции автозаполнения места.

Поля
place

string

Имя ресурса предлагаемого места. Это имя можно использовать в других API, принимающих имена мест.

place_id

string

Уникальный идентификатор предлагаемого места. Этот идентификатор можно использовать в других API, принимающих идентификаторы мест.

text

FormattableText

Содержит понятное для человека название возвращаемого результата. Для результатов поиска по учреждениям это обычно название и адрес компании.

Рекомендуется использовать text для разработчиков, желающих отобразить один элемент пользовательского интерфейса. Разработчики, желающие отобразить два отдельных, но связанных элемента пользовательского интерфейса, могут использовать structured_format . Это два разных способа представления прогноза места. Пользователям не следует пытаться преобразовать structured_format в text и наоборот.

Этот текст может отличаться от display_name , возвращаемого GetPlace.

Может быть на смешанных языках, если input данные запроса и language_code указаны на разных языках или если у места нет перевода с местного языка на language_code .

structured_format

StructuredFormat

Разбивка прогнозируемого места на основной текст, содержащий название места, и вторичный текст, содержащий дополнительные неоднозначные признаки (например, город или регион).

structured_format рекомендуется разработчикам, желающим отобразить два отдельных, но связанных элемента пользовательского интерфейса. Разработчики, желающие отобразить один элемент пользовательского интерфейса, могут использовать text . Это два разных способа представления прогноза места. Пользователям не следует пытаться преобразовать structured_format в text и наоборот.

types[]

string

Список типов, которые применяются к этому месту из таблицы A или таблицы B в https://developers.google.com/maps/documentation/places/web-service/place-types .

Тип — это категоризация места. Места с общими типами будут иметь схожие характеристики.

distance_meters

int32

Длина геодезической линии в метрах от origin если origin указана. Некоторые прогнозы, например, маршруты, могут не содержать это поле.

ЗапросПредсказание

Результаты прогнозирования для прогноза автозаполнения запроса.

Поля
text

FormattableText

Прогнозируемый текст. Этот текст не представляет место, а представляет собой текстовый запрос, который можно использовать в конечной точке поиска (например, текстовый поиск).

Разработчикам, желающим отобразить один элемент пользовательского интерфейса, рекомендуется использовать text . Разработчикам, желающим отобразить два отдельных, но связанных элемента пользовательского интерфейса, рекомендуется использовать structured_format . Это два разных способа представления прогноза запроса. Пользователям не следует пытаться преобразовать structured_format в text и наоборот.

Могут быть на смешанных языках, если input данные запроса и language_code указаны на разных языках или если часть запроса не имеет перевода с локального языка на language_code .

structured_format

StructuredFormat

Разбивка прогноза запроса на основной текст, содержащий запрос, и вторичный текст, содержащий дополнительные неоднозначные признаки (например, город или регион).

structured_format рекомендуется разработчикам, желающим отобразить два отдельных, но связанных элемента пользовательского интерфейса. Разработчики, желающие отобразить один элемент пользовательского интерфейса, могут использовать text . Это два разных способа представления прогноза запроса. Пользователям не следует пытаться преобразовать structured_format в text и наоборот.

StringRange

Определяет подстроку в заданном тексте.

Поля
start_offset

int32

Смещение от нуля первого символа Unicode в строке (включительно).

end_offset

int32

Смещение от нуля последнего символа Unicode (исключая его).

СтруктурированныйФормат

Содержит разбивку места или прогнозируемого запроса на основной текст и вторичный текст.

Для прогнозов по месту основной текст содержит конкретное название места. Для прогнозов по запросу основной текст содержит сам запрос.

Вторичный текст содержит дополнительные неоднозначные признаки (например, город или регион), позволяющие более точно определить место или уточнить запрос.

Поля
main_text

FormattableText

Представляет название места или запроса.

secondary_text

FormattableText

Представляет дополнительные неоднозначные признаки (например, город или регион) для дальнейшей идентификации места или уточнения запроса.

Круг

Окружность с центром в координатах LatLng и радиусом.

Поля
center

LatLng

Обязательно. Центральная широта и долгота.

Диапазон широты должен быть в пределах [-90,0, 90,0]. Диапазон долготы должен быть в пределах [-180,0, 180,0].

radius

double

Обязательно. Радиус измеряется в метрах. Радиус должен быть в диапазоне [0,0, 50000,0].

ContentBlock

Блок контента, который может подаваться индивидуально.

Поля
content

LocalizedText

Контент, соответствующий теме.

referenced_places[]

string

Список имён ресурсов указанных мест. Это имя может использоваться в других API, принимающих имена ресурсов мест.

ContextualContent

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

Контент, соответствующий контексту поиска места.

Поля
reviews[]

Review

Список отзывов об этом месте, соответствующих поисковому запросу.

photos[]

Photo

Информация (включая ссылки) о фотографиях этого места, контекстуальная для запроса места.

justifications[]

Justification

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

Обоснования места.

Обоснование

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

Обоснования места. Обоснования отвечают на вопрос, почему место может быть интересно конечному пользователю.

Поля

justification поля Союза.

justification может быть только одним из следующих:

review_justification

ReviewJustification

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

business_availability_attributes_justification

BusinessAvailabilityAttributesJustification

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

БизнесДоступностьАтрибутыОбоснование

Экспериментальный: см. https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative для получения более подробной информации. Обоснование BusinessAvailabilityAttributes. Здесь показаны некоторые характеристики компании, которые могут быть интересны конечному пользователю.

Поля
takeout

bool

Если в заведении можно заказать еду на вынос.

delivery

bool

Если место обеспечивает доставку.

dine_in

bool

Если в заведении есть возможность пообедать.

ОбзорОбоснование

Экспериментальный: более подробную информацию см. на странице https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative .

Обоснование отзывов пользователей. Выделяет раздел отзыва, который может быть интересен конечному пользователю. Например, если поисковый запрос — «пицца на дровах», в обосновании отзыва выделяется текст, релевантный поисковому запросу.

Поля
highlighted_text

HighlightedText

review

Review

Обзор, на основе которого создан выделенный текст.

Выделенный текст

Текст, выделенный в обосновании. Это подмножество самого обзора. Точное слово, которое нужно выделить, отмечено в HighlightedTextRange. В выделенном тексте может быть несколько слов.

Поля
text

string

highlighted_text_ranges[]

HighlightedTextRange

Список диапазонов выделенного текста.

HighlightedTextRange

Диапазон выделенного текста.

Поля
start_index

int32

end_index

int32

EVChargeOptions

Информация о станции зарядки электромобилей, размещённой на сайте Place. Терминология: https://afdc.energy.gov/fuels/electricity_infrastructure.html . Один порт может одновременно заряжать только один автомобиль. Каждый порт имеет один или несколько разъёмов. Одна станция имеет один или несколько разъёмов.

Поля
connector_count

int32

Количество разъёмов на этой станции. Однако, поскольку некоторые порты могут иметь несколько разъёмов, но при этом заряжать только один автомобиль одновременно (например), количество разъёмов может превышать общее количество автомобилей, которые могут заряжаться одновременно.

connector_aggregation[]

ConnectorAggregation

Список агрегатов разъемов для зарядки электромобилей, содержащих разъемы одного типа и с одинаковой скоростью зарядки.

Агрегация коннекторов

Информация о зарядке электромобиля, сгруппированная по [тип, максимальная_скорость_заряда_кВт]. Показывает агрегацию заряда электромобиля через разъёмы одного типа и максимальной скорости зарядки в кВт.

Поля
type

EVConnectorType

Тип соединителя данной агрегации.

max_charge_rate_kw

double

Максимальная статическая скорость зарядки в кВт каждого разъема в агрегации.

count

int32

Количество коннекторов в этой агрегации.

availability_last_update_time

Timestamp

Метка времени последнего обновления информации о доступности коннектора в этом агрегировании.

available_count

int32

Количество коннекторов в этой агрегации, которые в данный момент доступны.

out_of_service_count

int32

Количество коннекторов в этом агрегировании, которые в настоящее время не обслуживаются.

EVConnectorType

Дополнительную информацию/контекст о типах разъемов для зарядки электромобилей см. по адресу http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 .

Перечисления
EV_CONNECTOR_TYPE_UNSPECIFIED Неуказанный соединитель.
EV_CONNECTOR_TYPE_OTHER Другие типы разъемов.
EV_CONNECTOR_TYPE_J1772 Разъем J1772 типа 1.
EV_CONNECTOR_TYPE_TYPE_2 Разъём IEC 62196 типа 2. Часто называется MENNEKES.
EV_CONNECTOR_TYPE_CHADEMO Разъем типа CHAdeMO.
EV_CONNECTOR_TYPE_CCS_COMBO_1 Комбинированная система зарядки (переменный и постоянный ток). Основана на стандарте SAE. Разъём J-1772 Тип 1.
EV_CONNECTOR_TYPE_CCS_COMBO_2 Комбинированная система зарядки (переменный и постоянный ток). На основе разъёма Mennekes Type-2.
EV_CONNECTOR_TYPE_TESLA Стандартный разъём TESLA. В Северной Америке он имеет сертификат NACS, но в других частях мира может иметь сертификат, отличный от NACS (например, CCS Combo 2 (CCS2) или GB/T). Это значение не столько отражает реальный тип разъёма, сколько отражает возможность зарядки автомобилей Tesla на зарядной станции Tesla.
EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T Тип GB/T соответствует китайскому стандарту GB/T. Этот тип охватывает все типы GB_T.
EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET Неуказанная розетка.
EV_CONNECTOR_TYPE_NACS Североамериканская система зарядки (NACS), стандартизированная как SAE J3400.

FuelOptions

Актуальная информация о видах топлива на АЗС. Эта информация регулярно обновляется.

Поля
fuel_prices[]

FuelPrice

Последняя известная цена на топливо каждого типа, доступного на этой заправке. Для каждого типа топлива, доступного на этой заправке, существует одна запись. Порядок не важен.

FuelPrice

Информация о ценах на топливо определенного типа.

Поля
type

FuelType

Тип топлива.

price

Money

Цена на топливо.

update_time

Timestamp

Время последнего обновления цены на топливо.

Тип топлива

Виды топлива.

Перечисления
FUEL_TYPE_UNSPECIFIED Тип топлива не указан.
DIESEL Дизельное топливо.
DIESEL_PLUS Дизельное топливо плюс топливо.
REGULAR_UNLEADED Обычный неэтилированный.
MIDGRADE Средний уровень.
PREMIUM Премиум.
SP91 СП 91.
SP91_E10 СП 91 Е10.
SP92 СП 92.
SP95 СП 95.
SP95_E10 СП95 Е10.
SP98 СП 98.
SP99 СП 99.
SP100 СП 100.
LPG Сжиженный нефтяной газ.
E80 Е 80.
E85 Е 85.
E100 Е 100.
METHANE Метан.
BIO_DIESEL Биодизель.
TRUCK_DIESEL Грузовой дизель.

GetPhotoMediaRequest

Запрос на получение фотографии места с использованием названия фоторесурса.

Поля
name

string

Обязательно. Имя ресурса фотоносителя в формате: places/{place_id}/photos/{photo_reference}/media .

Имя ресурса фотографии, возвращаемое в поле photos.name объекта Place, имеет формат places/{place_id}/photos/{photo_reference} . Чтобы получить имя ресурса медиафайла, необходимо добавить /media в конец имени ресурса фотографии.

max_width_px

int32

Необязательно. Указывает максимальную желаемую ширину изображения в пикселях. Если изображение меньше указанных значений, будет возвращено исходное изображение. Если изображение больше по одному из двух измерений, оно будет масштабировано до меньшего из двух измерений с сохранением исходного соотношения сторон. Свойства max_height_px и max_width_px принимают целые числа от 1 до 4800 включительно. Если значение выходит за пределы допустимого диапазона, будет возвращена ошибка INVALID_ARGUMENT.

Необходимо указать хотя бы один из параметров: max_height_px или max_width_px. Если не указаны ни max_height_px, ни max_width_px, будет возвращена ошибка INVALID_ARGUMENT.

max_height_px

int32

Необязательно. Указывает максимальную желаемую высоту изображения в пикселях. Если изображение меньше указанных значений, будет возвращено исходное изображение. Если изображение больше по одному из двух измерений, оно будет масштабировано до меньшего из двух измерений с сохранением исходного соотношения сторон. Свойства max_height_px и max_width_px принимают целые числа от 1 до 4800 включительно. Если значение выходит за пределы допустимого диапазона, будет возвращена ошибка INVALID_ARGUMENT.

Необходимо указать хотя бы один из параметров: max_height_px или max_width_px. Если не указаны ни max_height_px, ни max_width_px, будет возвращена ошибка INVALID_ARGUMENT.

skip_http_redirect

bool

Необязательно. Если установлено, пропускается HTTP-перенаправление по умолчанию и формируется ответ в текстовом формате (например, в формате JSON для HTTP-запроса). Если не установлено, будет выполнено HTTP-перенаправление для перенаправления вызова к медиафайлу с изображением. Этот параметр игнорируется для запросов, отличных от HTTP.

GetPlaceRequest

Запрос на выборку места на основе имени его ресурса, которое представляет собой строку в формате places/{place_id} .

Поля
name

string

Обязательно. Имя ресурса места в формате places/{place_id} .

language_code

string

Необязательно. Информация о месте будет отображаться на выбранном вами языке (если он доступен).

Текущий список поддерживаемых языков: https://developers.google.com/maps/faq#languagesupport .

region_code

string

Необязательный. Код страны/региона в формате Unicode (CLDR) местоположения, откуда поступил запрос. Этот параметр используется для отображения информации о месте, например, названия региона, если оно доступно. Этот параметр может влиять на результаты в зависимости от действующего законодательства. Подробнее см. https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html .

Обратите внимание, что трехзначные коды регионов в настоящее время не поддерживаются.

session_token

string

Необязательная строка. Строка, идентифицирующая сеанс автозаполнения для выставления счетов. Должна представлять собой строку в формате base64, безопасную для URL и имени файла, длиной не более 36 символов ASCII. В противном случае возвращается ошибка INVALID_ARGUMENT.

Сеанс начинается с того, что пользователь начинает вводить запрос, и завершается выбором места и вызовом функции проверки сведений о месте или адреса. В каждом сеансе может быть несколько запросов, за которыми следует один запрос на проверку сведений о месте или адреса. Учётные данные, используемые для каждого запроса в рамках сеанса, должны принадлежать одному проекту Google Cloud Console. После завершения сеанса токен становится недействительным; ваше приложение должно генерировать новый токен для каждого сеанса. Если параметр session_token пропущен или вы повторно используете токен сеанса, сеанс тарифицируется так, как если бы токен сеанса не предоставлялся (каждый запрос оплачивается отдельно).

Мы рекомендуем следующие рекомендации:

  • Используйте токены сеанса для всех вызовов Place Autocomplete.
  • Генерируйте новый токен для каждого сеанса. Рекомендуется использовать UUID версии 4.
  • Убедитесь, что учетные данные, используемые для всех запросов Place Autocomplete, Place Details и Address Validation в рамках сеанса, принадлежат одному и тому же проекту Cloud Console.
  • Обязательно передавайте уникальный токен сеанса для каждого нового сеанса. Использование одного и того же токена для нескольких сеансов приведёт к тому, что каждый запрос будет оплачиваться отдельно.

Фото

Информация о фотографии места.

Поля
name

string

Идентификатор. Ссылка, представляющая фотографию этого места, которую можно использовать для повторного поиска этой фотографии (также называется именем «ресурса» API: places/{place_id}/photos/{photo} ).

width_px

int32

Максимально доступная ширина в пикселях.

height_px

int32

Максимально доступная высота в пикселях.

author_attributions[]

AuthorAttribution

Авторы этой фотографии.

flag_content_uri

string

Ссылка, по которой пользователи могут сообщить о проблеме с фотографией.

google_maps_uri

string

Ссылка для показа фотографии на Google Maps.

ФотоМедиа

Фотоматериалы из Places API.

Поля
name

string

Имя ресурса фотоносителя в формате: places/{place_id}/photos/{photo_reference}/media .

photo_uri

string

Краткосрочный URI, который можно использовать для рендеринга фотографии.

Место

Вся информация, представляющая место.

Поля
name

string

Название ресурса этого места в формате places/{place_id} . Может использоваться для поиска места.

id

string

Уникальный идентификатор места.

display_name

LocalizedText

Локализованное название места, подходящее для краткого и понятного описания. Например, «Google Сидней», «Starbucks», «Pyrmont» и т. д.

types[]

string

Набор тегов типа для этого результата. Например, «политический» и «местность». Полный список возможных значений см. в таблицах A и B по адресу https://developers.google.com/maps/documentation/places/web-service/place-types .

primary_type

string

Основной тип результата. Этот тип должен быть одним из поддерживаемых Places API. Например, «ресторан», «кафе», «аэропорт» и т. д. У места может быть только один основной тип. Полный список возможных значений см. в таблицах A и B по адресу https://developers.google.com/maps/documentation/places/web-service/place-types . Основной тип может отсутствовать, если основной тип места не поддерживается. Если основной тип присутствует, он всегда соответствует одному из типов, указанных в поле types .

primary_type_display_name

LocalizedText

Отображаемое имя основного типа, локализованное для языка запроса, если применимо. Полный список возможных значений см. в таблицах A и B на сайте https://developers.google.com/maps/documentation/places/web-service/place-types . Основной тип может отсутствовать, если основной тип места не поддерживается.

national_phone_number

string

Удобный для восприятия номер телефона места в национальном формате.

international_phone_number

string

Удобный для восприятия номер телефона этого места в международном формате.

formatted_address

string

Полный, понятный человеку адрес этого места.

short_formatted_address

string

Короткий, понятный человеку адрес этого места.

postal_address

PostalAddress

Адрес в формате почтового адреса.

address_components[]

AddressComponent

Повторяющиеся компоненты для каждого уровня населённого пункта. Обратите внимание на следующие факты о массиве address_components[]: - Массив компонентов адреса может содержать больше компонентов, чем formatted_address. - Массив не обязательно включает все политические единицы, содержащие адрес, помимо тех, которые включены в formatted_address. Чтобы получить все политические единицы, содержащие определённый адрес, следует использовать обратное геокодирование, передавая широту/долготу адреса в качестве параметра запроса. - Формат ответа не гарантируется одинаковым между запросами. В частности, количество address_components зависит от запрошенного адреса и может меняться со временем для одного и того же адреса. Компонент может изменить положение в массиве. Тип компонента может измениться. В последующем ответе может отсутствовать определённый компонент.

plus_code

PlusCode

Плюс код местоположения места широта/долгота.

location

LatLng

Положение этого места.

viewport

Viewport

Область просмотра, подходящая для отображения места на карте среднего размера. Эта область просмотра не должна использоваться в качестве физической границы или зоны обслуживания компании.

rating

double

Рейтинг от 1,0 до 5,0, основанный на отзывах пользователей об этом месте.

google_maps_uri

string

URL-адрес, предоставляющий более подробную информацию об этом месте.

website_uri

string

Официальный веб-сайт данного места, например, домашняя страница компании. Обратите внимание, что для мест, входящих в сеть (например, магазина IKEA), это обычно веб-сайт отдельного магазина, а не всей сети.

reviews[]

Review

Список отзывов об этом месте, отсортированный по релевантности. Можно добавить не более 5 отзывов.

regular_opening_hours

OpeningHours

Обычные часы работы. Обратите внимание: если место открыто круглосуточно, поле close не будет установлено. Клиенты могут использовать « open круглосуточно» как период, содержащий day со значением 0 , hour со значением 0 и minute со значением 0 .

time_zone

TimeZone

Часовой пояс базы данных часовых поясов IANA. Например, «America/New_York».

photos[]

Photo

Информация (включая ссылки) о фотографиях этого места. Можно вернуть не более 10 фотографий.

adr_format_address

string

Адрес места в микроформате adr: http://microformats.org/wiki/adr .

business_status

BusinessStatus

Бизнес-статус места.

price_level

PriceLevel

Уровень цен в данном месте.

attributions[]

Attribution

Набор поставщиков данных, которые должны быть показаны вместе с этим результатом.

icon_mask_base_uri

string

Укороченный URL-адрес маски значка. Пользователь может получить доступ к значкам разных типов, добавив суффикс типа в конец имени (например, «.svg» или «.png»).

icon_background_color

string

Цвет фона для icon_mask в шестнадцатеричном формате, например #909CE1.

current_opening_hours

OpeningHours

Часы работы на следующие семь дней (включая сегодняшний). Период начинается в полночь в день запроса и заканчивается в 23:59 через шесть дней. Это поле включает подполе special_days для всех часов, заданных для дат с особыми часами работы.

current_secondary_opening_hours[]

OpeningHours

Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

regular_secondary_opening_hours[]

OpeningHours

Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.

editorial_summary

LocalizedText

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

payment_options

PaymentOptions

Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.

parking_options

ParkingOptions

Options of parking provided by the place.

sub_destinations[]

SubDestination

A list of sub-destinations related to the place.

fuel_options

FuelOptions

The most recent information about fuel options in a gas station. This information is updated regularly.

ev_charge_options

EVChargeOptions

Information of ev charging options.

generative_summary

GenerativeSummary

AI-generated summary of the place.

containing_places[]

ContainingPlace

List of places in which the current place is located.

address_descriptor

AddressDescriptor

The address descriptor of the place. Address descriptors include additional information that help describe a location using landmarks and areas. See address descriptor regional coverage in https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage .

price_range

PriceRange

The price range associated with a Place.

review_summary

ReviewSummary

AI-generated summary of the place using user reviews.

ev_charge_amenity_summary

EvChargeAmenitySummary

The summary of amenities near the EV charging station.

neighborhood_summary

NeighborhoodSummary

A summary of points of interest near the place.

consumer_alert

ConsumerAlert

The consumer alert message for the place when we detect suspicious review activity on a business or a business violates our policies.

moved_place

string

If this Place is permanently closed and has moved to a new Place, this field contains the new Place's resource name, in places/{place_id} format. If this Place moved multiple times, this field will represent the first moved place. This field will not be populated if this Place has not moved.

moved_place_id

string

If this Place is permanently closed and has moved to a new Place, this field contains the new Place's place ID. If this Place moved multiple times, this field will represent the first moved Place. This field will not be populated if this Place has not moved.

utc_offset_minutes

int32

Number of minutes this place's timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, eg X hours and 15 minutes.

user_rating_count

int32

The total number of reviews (with or without text) for this place.

takeout

bool

Specifies if the business supports takeout.

delivery

bool

Specifies if the business supports delivery.

dine_in

bool

Specifies if the business supports indoor or outdoor seating options.

curbside_pickup

bool

Specifies if the business supports curbside pickup.

reservable

bool

Specifies if the place supports reservations.

serves_breakfast

bool

Specifies if the place serves breakfast.

serves_lunch

bool

Specifies if the place serves lunch.

serves_dinner

bool

Specifies if the place serves dinner.

serves_beer

bool

Specifies if the place serves beer.

serves_wine

bool

Specifies if the place serves wine.

serves_brunch

bool

Specifies if the place serves brunch.

serves_vegetarian_food

bool

Specifies if the place serves vegetarian food.

outdoor_seating

bool

Place provides outdoor seating.

live_music

bool

Place provides live music.

menu_for_children

bool

Place has a children's menu.

serves_cocktails

bool

Place serves cocktails.

serves_dessert

bool

Place serves dessert.

serves_coffee

bool

Place serves coffee.

good_for_children

bool

Place is good for children.

allows_dogs

bool

Place allows dogs.

restroom

bool

Place has restroom.

good_for_groups

bool

Place accommodates groups.

good_for_watching_sports

bool

Place is suitable for watching sports.

accessibility_options

AccessibilityOptions

Information about the accessibility options a place offers.

pure_service_area_business

bool

Indicates whether the place is a pure service area business. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses may not have a physical address or location on Google Maps.

AccessibilityOptions

Information about the accessibility options a place offers.

Поля
wheelchair_accessible_parking

bool

Place offers wheelchair accessible parking.

wheelchair_accessible_entrance

bool

Places has wheelchair accessible entrance.

wheelchair_accessible_restroom

bool

Place has wheelchair accessible restroom.

wheelchair_accessible_seating

bool

Place has wheelchair accessible seating.

АдресКомпонент

The structured components that form the formatted address, if this information is available.

Поля
long_text

string

The full text description or name of the address component. For example, an address component for the country Australia may have a long_name of "Australia".

short_text

string

An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short_name of "AU".

types[]

string

An array indicating the type(s) of the address component.

language_code

string

The language used to format this components, in CLDR notation.

Атрибуция

Information about data providers of this place.

Поля
provider

string

Name of the Place's data provider.

provider_uri

string

URI to the Place's data provider.

BusinessStatus

Business status for the place.

Enums
BUSINESS_STATUS_UNSPECIFIED Значение по умолчанию. Это значение не используется.
OPERATIONAL The establishment is operational, not necessarily open now.
CLOSED_TEMPORARILY The establishment is temporarily closed.
CLOSED_PERMANENTLY The establishment is permanently closed.

ConsumerAlert

The consumer alert message for the place when we detect suspicious review activity on a business or a business violates our policies.

Поля
overview

string

The overview of the consumer alert message.

details

Details

The details of the consumer alert message.

language_code

string

The language code of the consumer alert message. This is a BCP 47 language code.

Подробности

The details of the consumer alert message.

Поля
title

string

The title to show together with the description.

description

string

The description of the consumer alert message.

ContainingPlace

Info about the place in which this place is located.

Поля
name

string

The resource name of the place in which this place is located.

id

string

The place id of the place in which this place is located.

EvChargeAmenitySummary

The summary of amenities near the EV charging station. This only applies to places with type electric_vehicle_charging_station . The overview field is guaranteed to be provided while the other fields are optional.

Поля
overview

ContentBlock

An overview of the available amenities. This is guaranteed to be provided.

coffee

ContentBlock

A summary of the nearby coffee options.

restaurant

ContentBlock

A summary of the nearby restaurants.

store

ContentBlock

A summary of the nearby stores.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

GenerativeSummary

AI-generated summary of the place.

Поля
overview

LocalizedText

The overview of the place.

overview_flag_content_uri

string

A link where users can flag a problem with the overview summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

NeighborhoodSummary

A summary of points of interest near the place.

Поля
overview

ContentBlock

An overview summary of the neighborhood.

description

ContentBlock

A detailed description of the neighborhood.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

OpeningHours

Information about business hour of the place.

Поля
periods[]

Period

The periods that this place is open during the week. The periods are in chronological order, in the place-local timezone. An empty (but not absent) value indicates a place that is never open, eg because it is closed temporarily for renovations.

The starting day of periods is NOT fixed and should not be assumed to be Sunday. The API determines the start day based on a variety of factors. For example, for a 24/7 business, the first period may begin on the day of the request. For other businesses, it might be the first day of the week that they are open.

NOTE: The ordering of the periods array is independent of the ordering of the weekday_descriptions array. Do not assume they will begin on the same day.

weekday_descriptions[]

string

Localized strings describing the opening hours of this place, one string for each day of the week.

NOTE: The order of the days and the start of the week is determined by the locale (language and region). The ordering of the periods array is independent of the ordering of the weekday_descriptions array. Do not assume they will begin on the same day.

Will be empty if the hours are unknown or could not be converted to localized text. Example: "Sun: 18:00–06:00"

secondary_hours_type

SecondaryHoursType

A type string used to identify the type of secondary hours.

special_days[]

SpecialDay

Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, eg Christmas day. Set for current_opening_hours and current_secondary_opening_hours if there are exceptional hours.

next_open_time

Timestamp

The next time the current opening hours period starts up to 7 days in the future. This field is only populated if the opening hours period is not active at the time of serving the request.

next_close_time

Timestamp

The next time the current opening hours period ends up to 7 days in the future. This field is only populated if the opening hours period is active at the time of serving the request.

open_now

bool

Whether the opening hours period is currently active. For regular opening hours and current opening hours, this field means whether the place is open. For secondary opening hours and current secondary opening hours, this field means whether the secondary hours of this place is active.

Период

A period the place remains in open_now status.

Поля
open

Point

The time that the place starts to be open.

close

Point

The time that the place starts to be closed.

Точка

Status changing points.

Поля
date

Date

Date in the local timezone for the place.

truncated

bool

Whether or not this endpoint was truncated. Truncation occurs when the real hours are outside the times we are willing to return hours between, so we truncate the hours back to these boundaries. This ensures that at most 24 * 7 hours from midnight of the day of the request are returned.

day

int32

A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is Monday, etc.

hour

int32

The hour in 24 hour format. Ranges from 0 to 23.

minute

int32

The minute. Ranges from 0 to 59.

SecondaryHoursType

A type used to identify the type of secondary hours.

Enums
SECONDARY_HOURS_TYPE_UNSPECIFIED Default value when secondary hour type is not specified.
DRIVE_THROUGH The drive-through hour for banks, restaurants, or pharmacies.
HAPPY_HOUR The happy hour.
DELIVERY The delivery hour.
TAKEOUT The takeout hour.
KITCHEN The kitchen hour.
BREAKFAST The breakfast hour.
LUNCH The lunch hour.
DINNER The dinner hour.
BRUNCH The brunch hour.
PICKUP The pickup hour.
ACCESS The access hours for storage places.
SENIOR_HOURS The special hours for seniors.
ONLINE_SERVICE_HOURS The online service hours.

SpecialDay

Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, eg Christmas day.

Поля
date

Date

The date of this special day.

ParkingOptions

Information about parking options for the place. A parking lot could support more than one option at the same time.

Поля
free_parking_lot

bool

Place offers free parking lots.

paid_parking_lot

bool

Place offers paid parking lots.

free_street_parking

bool

Place offers free street parking.

paid_street_parking

bool

Place offers paid street parking.

valet_parking

bool

Place offers valet parking.

free_garage_parking

bool

Place offers free garage parking.

paid_garage_parking

bool

Place offers paid garage parking.

PaymentOptions

Payment options the place accepts.

Поля
accepts_credit_cards

bool

Place accepts credit cards as payment.

accepts_debit_cards

bool

Place accepts debit cards as payment.

accepts_cash_only

bool

Place accepts cash only as payment. Places with this attribute may still accept other payment methods.

accepts_nfc

bool

Place accepts NFC payments.

PlusCode

Plus code ( http://plus.codes ) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.

Поля
global_code

string

Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).

compound_code

string

Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity.

ReviewSummary

AI-generated summary of the place using user reviews.

Поля
text

LocalizedText

The summary of user reviews.

flag_content_uri

string

A link where users can flag a problem with the summary.

disclosure_text

LocalizedText

The AI disclosure message "Summarized with Gemini" (and its localized variants). This will be in the language specified in the request if available.

reviews_uri

string

A link to show reviews of this place on Google Maps.

SubDestination

Sub-destinations are specific places associated with a main place. These provide more specific destinations for users who are searching within a large or complex place, like an airport, national park, university, or stadium. For example, sub-destinations at an airport might include associated terminals and parking lots. Sub-destinations return the place ID and place resource name, which can be used in subsequent Place Details (New) requests to fetch richer details, including the sub-destination's display name and location.

Поля
name

string

The resource name of the sub-destination.

id

string

The place id of the sub-destination.

Полилиния

A route polyline. Only supports an encoded polyline , which can be passed as a string and includes compression with minimal lossiness. This is the Routes API default output.

Поля
Union field polyline_type . Encapsulates the type of polyline. Routes API output defaults to encoded_polyline . polyline_type can be only one of the following:
encoded_polyline

string

An encoded polyline , as returned by the Routes API by default . See the encoder and decoder tools.

PriceLevel

Price level of the place.

Enums
PRICE_LEVEL_UNSPECIFIED Place price level is unspecified or unknown.
PRICE_LEVEL_FREE Place provides free services.
PRICE_LEVEL_INEXPENSIVE Place provides inexpensive services.
PRICE_LEVEL_MODERATE Place provides moderately priced services.
PRICE_LEVEL_EXPENSIVE Place provides expensive services.
PRICE_LEVEL_VERY_EXPENSIVE Place provides very expensive services.

Диапазон цен

The price range associated with a Place. end_price could be unset, which indicates a range without upper bound (eg "More than $100").

Поля
start_price

Money

The low end of the price range (inclusive). Price should be at or above this amount.

end_price

Money

The high end of the price range (exclusive). Price should be lower than this amount.

Обзор

Information about a review of a place.

Поля
name

string

A reference representing this place review which may be used to look up this place review again (also called the API "resource" name: places/{place_id}/reviews/{review} ).

relative_publish_time_description

string

A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.

text

LocalizedText

The localized text of the review.

original_text

LocalizedText

The review text in its original language.

rating

double

A number between 1.0 and 5.0, also called the number of stars.

author_attribution

AuthorAttribution

This review's author.

publish_time

Timestamp

Timestamp for the review.

flag_content_uri

string

A link where users can flag a problem with the review.

google_maps_uri

string

A link to show the review on Google Maps.

visit_date

Date

The date when the author visited the place. This is truncated to the year and month of the visit.

RouteModifiers

Encapsulates a set of optional conditions to satisfy when calculating the routes.

Поля
avoid_tolls

bool

Optional. When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_highways

bool

Optional. When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_ferries

bool

Optional. When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the DRIVE and TWO_WHEELER TravelMode .

avoid_indoor

bool

Optional. When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the WALK TravelMode .

RoutingParameters

Parameters to configure the routing calculations to the places in the response, both along a route (where result ranking will be influenced) and for calculating travel times on results.

Поля
origin

LatLng

Optional. An explicit routing origin that overrides the origin defined in the polyline. By default, the polyline origin is used.

travel_mode

TravelMode

Optional. The travel mode.

route_modifiers

RouteModifiers

Optional. The route modifiers.

routing_preference

RoutingPreference

Optional. Specifies how to compute the routing summaries. The server attempts to use the selected routing preference to compute the route. The traffic aware routing preference is only available for the DRIVE or TWO_WHEELER travelMode .

RoutingPreference

A set of values that specify factors to take into consideration when calculating the route.

Enums
ROUTING_PREFERENCE_UNSPECIFIED No routing preference specified. Default to TRAFFIC_UNAWARE .
TRAFFIC_UNAWARE Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For TravelMode DRIVE and TWO_WHEELER , the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.
TRAFFIC_AWARE Calculates routes taking live traffic conditions into consideration. In contrast to TRAFFIC_AWARE_OPTIMAL , some optimizations are applied to significantly reduce latency.
TRAFFIC_AWARE_OPTIMAL Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.

RoutingSummary

The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding routingSummaries in the field mask without also including either the routingParameters.origin parameter or the searchAlongRouteParameters.polyline.encodedPolyline parameter in the request causes an error.

Поля
legs[]

Leg

The legs of the trip.

When you calculate travel duration and distance from a set origin, legs contains a single leg containing the duration and distance from the origin to the destination. When you do a search along route, legs contains two legs: one from the origin to place, and one from the place to the destination.

directions_uri

string

A link to show directions on Google Maps using the waypoints from the given routing summary. The route generated by this link is not guaranteed to be the same as the route used to generate the routing summary. The link uses information provided in the request, from fields including routingParameters and searchAlongRouteParameters when applicable, to generate the directions link.

Нога

A leg is a single portion of a journey from one location to another.

Поля
duration

Duration

The time it takes to complete this leg of the trip.

distance_meters

int32

The distance of this leg of the trip.

SearchNearbyRequest

Request proto for Search Nearby.

Поля
language_code

string

Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.

Current list of supported languages: https://developers.google.com/maps/faq#languagesupport .

region_code

string

The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.

For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html .

Note that 3-digit region codes are not currently supported.

included_types[]

string

Included Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If there are any conflicting types, ie a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

excluded_types[]

string

Excluded Place type (eg, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If the client provides both included_types (eg restaurant) and excluded_types (eg cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types.

If there are any conflicting types, ie a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

included_primary_types[]

string

Included primary Place type (eg "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types . A place can only have a single primary type from the supported types table associated with it.

Up to 50 types from Table A may be specified.

If there are any conflicting primary types, ie a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

excluded_primary_types[]

string

Excluded primary Place type (eg "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types .

Up to 50 types from Table A may be specified.

If there are any conflicting primary types, ie a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.

If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned places provide "restaurant" related services but do not operate primarily as "restaurants".

max_result_count

int32

Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.

location_restriction

LocationRestriction

Required. The region to search.

rank_preference

RankPreference

How results will be ranked in the response.

routing_parameters

RoutingParameters

Optional. Parameters that affect the routing to the search results.

LocationRestriction

The region to search.

Поля

Union field type .

type can be only one of the following:

circle

Circle

A circle defined by center point and radius.

RankPreference

How results will be ranked in the response.

Enums
RANK_PREFERENCE_UNSPECIFIED RankPreference value not set. Will use rank by POPULARITY by default.
DISTANCE Ranks results by distance.
POPULARITY Ranks results by popularity.

SearchNearbyResponse

Response proto for Search Nearby.

Поля
places[]

Place

A list of places that meets user's requirements like places types, number of places and specific location restriction.

routing_summaries[]

RoutingSummary

A list of routing summaries where each entry associates to the corresponding place in the same index in the places field. If the routing summary is not available for one of the places, it will contain an empty entry. This list should have as many entries as the list of places if requested.

SearchTextRequest

Request proto for SearchText.

Поля
text_query

string

Required. The text query for textual search.

language_code

string

Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist.

Current list of supported languages: https://developers.google.com/maps/faq#languagesupport .

region_code

string

The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law.

For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html .

Note that 3-digit region codes are not currently supported.

rank_preference

RankPreference

How results will be ranked in the response.

included_type

string

The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types . Only support one included type.

open_now

bool

Used to restrict the search to places that are currently open. The default is false.

min_rating

double

Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence ie [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating.

max_result_count
(deprecated)

int32

Deprecated: Use page_size instead.

The maximum number of results per page that can be returned. If the number of available results is larger than max_result_count , a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be coerced to 20. Negative values will return an INVALID_ARGUMENT error.

If both max_result_count and page_size are specified, max_result_count will be ignored.

page_size

int32

Optional. The maximum number of results per page that can be returned. If the number of available results is larger than page_size , a next_page_token is returned which can be passed to page_token to get the next page of results in subsequent requests. If 0 or no value is provided, a default of 20 is used. The maximum value is 20; values above 20 will be set to 20. Negative values will return an INVALID_ARGUMENT error.

If both max_result_count and page_size are specified, max_result_count will be ignored.

page_token

string

Optional. A page token, received from a previous TextSearch call. Provide this to retrieve the subsequent page.

When paginating, all parameters other than page_token , page_size , and max_result_count provided to TextSearch must match the initial call that provided the page token. Otherwise an INVALID_ARGUMENT error is returned.

price_levels[]

PriceLevel

Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels.

strict_type_filtering

bool

Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false.

location_bias

LocationBias

The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction.

location_restriction

LocationRestriction

The region to search. This location serves as a restriction which means results outside given location will not be returned. Cannot be set along with location_bias.

ev_options

EVOptions

Optional. Set the searchable EV options of a place search request.

routing_parameters

RoutingParameters

Optional. Additional parameters for routing to results.

search_along_route_parameters

SearchAlongRouteParameters

Optional. Additional parameters proto for searching along a route.

include_pure_service_area_businesses

bool

Optional. Include pure service area businesses if the field is set to true. Pure service area business is a business that visits or delivers to customers directly but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses do not have a physical address or location on Google Maps. Places will not return fields including location , plus_code , and other location related fields for these businesses.

EVOptions

Searchable EV options of a place search request.

Поля
minimum_charging_rate_kw

double

Optional. Minimum required charging rate in kilowatts. A place with a charging rate less than the specified rate is filtered out.

connector_types[]

EVConnectorType

Optional. The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out.

LocationBias

The region to search. This location serves as a bias which means results around given location might be returned.

Поля

Union field type .

type can be only one of the following:

rectangle

Viewport

A rectangle box defined by northeast and southwest corner. rectangle.high() must be the northeast point of the rectangle viewport. rectangle.low() must be the southwest point of the rectangle viewport. rectangle.low().latitude() cannot be greater than rectangle.high().latitude() . This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.

circle

Circle

A circle defined by center point and radius.

LocationRestriction

The region to search. This location serves as a restriction which means results outside given location will not be returned.

Поля

Union field type .

type can be only one of the following:

rectangle

Viewport

A rectangle box defined by northeast and southwest corner. rectangle.high() must be the northeast point of the rectangle viewport. rectangle.low() must be the southwest point of the rectangle viewport. rectangle.low().latitude() cannot be greater than rectangle.high().latitude() . This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.

RankPreference

How results will be ranked in the response.

Enums
RANK_PREFERENCE_UNSPECIFIED For a categorical query such as "Restaurants in New York City", RELEVANCE is the default. For non-categorical queries such as "Mountain View, CA" we recommend that you leave rankPreference unset.
DISTANCE Ranks results by distance.
RELEVANCE Ranks results by relevance. Sort order determined by normal ranking stack.

SearchAlongRouteParameters

Specifies a precalculated polyline from the Routes API defining the route to search. Searching along a route is similar to using the locationBias or locationRestriction request option to bias the search results. However, while the locationBias and locationRestriction options let you specify a region to bias the search results, this option lets you bias the results along a trip route.

Results are not guaranteed to be along the route provided, but rather are ranked within the search area defined by the polyline and, optionally, by the locationBias or locationRestriction based on minimal detour times from origin to destination. The results might be along an alternate route, especially if the provided polyline does not define an optimal route from origin to destination.

Поля
polyline

Polyline

Required. The route polyline.

SearchTextResponse

Response proto for SearchText.

Поля
places[]

Place

A list of places that meet the user's text search criteria.

routing_summaries[]

RoutingSummary

A list of routing summaries where each entry associates to the corresponding place in the same index in the places field. If the routing summary is not available for one of the places, it will contain an empty entry. This list will have as many entries as the list of places if requested.

contextual_contents[]

ContextualContent

Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details.

A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the text_query in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list will have as many entries as the list of places if requested.

next_page_token

string

A token that can be sent as page_token to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.

search_uri

string

A link allows the user to search with the same text query as specified in the request on Google Maps.

TravelMode

Travel mode options. These options map to what Routes API offers .

Enums
TRAVEL_MODE_UNSPECIFIED No travel mode specified. Defaults to DRIVE .
DRIVE Travel by passenger car.
BICYCLE Travel by bicycle. Not supported with search_along_route_parameters .
WALK Travel by walking. Not supported with search_along_route_parameters .
TWO_WHEELER Motorized two wheeled vehicles of all kinds such as scooters and motorcycles. Note that this is distinct from the BICYCLE travel mode which covers human-powered transport. Not supported with search_along_route_parameters . Only supported in those countries listed at Countries and regions supported for two-wheeled vehicles .