Package google.maps.places.v1

Индекс

Места

Определение сервиса для Places API. Примечание: каждый запрос (кроме запросов 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
ПоискТекст

rpc SearchText( SearchTextRequest ) returns ( SearchTextResponse )

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

Области полномочий

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

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

AddressDescriptor

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

Поля
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

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

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

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

  • Используйте токены сессии для всех вызовов функции автозаполнения.
  • Для каждой сессии генерируйте новый токен. Рекомендуется использовать UUID версии 4.
  • Убедитесь, что учетные данные, используемые для всех запросов автозаполнения места, сведений о месте и проверки адреса в рамках одной сессии, относятся к одному и тому же проекту Cloud Console.
  • Обязательно передавайте уникальный токен сессии для каждой новой сессии. Использование одного и того же токена для нескольких сессий приведет к тому, что каждый запрос будет оплачиваться отдельно.
include_pure_service_area_businesses

bool

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

LocationBias

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

Поля

type поля объединения.

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

rectangle

Viewport

Видовое окно, ограниченное северо-восточным и юго-западным углами.

circle

Circle

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

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

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

Поля

type поля объединения.

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

rectangle

Viewport

Видовое окно, ограниченное северо-восточным и юго-западным углами.

circle

Circle

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

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

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

Поля
suggestions[]

Suggestion

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

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

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

Поля

kind поля Союза.

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

place_prediction

PlacePrediction

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

query_prediction

QueryPrediction

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

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

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

Поля
text

string

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

matches[]

StringRange

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

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

Прогнозирование местоположения

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

Поля
place

string

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

place_id

string

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

text

FormattableText

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

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

Этот текст может отличаться от display_name возвращаемого функцией GetPlace.

Возможно, будет доступно на разных языках, если input запроса и language_code указаны на разных языках или если для объекта Place отсутствует перевод с местного языка на 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 указано. Некоторые прогнозы, такие как маршруты, могут не заполнять это поле.

QueryPrediction

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

Поля
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

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

Круг

Окружность с центром в виде широты и долготы и радиусом.

Поля
center

LatLng

Обязательно. Координаты центра: широта и долгота.

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

radius

double

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

ContentBlock

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

Поля
content

LocalizedText

Материалы, относящиеся к данной теме.

referenced_places[]

string

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

Контекстный контент

Экспериментальная функция: подробности см. на странице 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

Информация о зарядной станции для электромобилей, расположенной в этом районе. Терминология приведена по ссылке: 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.

Варианты топлива

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

Поля
fuel_prices[]

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

Запрос на получение объекта Place на основе его имени ресурса, которое представляет собой строку в формате 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

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

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

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

  • Используйте токены сессии для всех вызовов функции автозаполнения.
  • Для каждой сессии генерируйте новый токен. Рекомендуется использовать UUID версии 4.
  • Убедитесь, что учетные данные, используемые для всех запросов автозаполнения места, сведений о месте и проверки адреса в рамках одной сессии, относятся к одному и тому же проекту 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», «Пирмонт» и т. д.

types[]

string

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

primary_type

string

Основной тип полученного результата. Этот тип должен быть одним из типов, поддерживаемых API Places. Например, "ресторан", "кафе", "аэропорт" и т. д. Место может иметь только один основной тип. Полный список возможных значений см. в таблицах 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 . Основной тип может отсутствовать, если основной тип места не является поддерживаемым типом.

google_maps_type_label

LocalizedText

Тип местоположения на Google Maps, локализованный, если применимо, под язык запроса, например, «Ресторан», «Кафе», «Аэропорт» и т. д. Тип местоположения может отличаться от основного отображаемого имени типа и может не являться поддерживаемым типом в таблице типов мест Places API .

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

Обычное время работы. Обратите внимание, что если заведение открыто круглосуточно (24 часа в сутки), поле 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.

AddressComponent

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 Default value. This value is unused.
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.

Polyline

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.

PriceRange

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 .