GoogleMapsPlacesV1AutocompletePlacesRequest
import type { GoogleMapsPlacesV1AutocompletePlacesRequest } from "https://googleapis.deno.dev/v1/places:v1.ts";
Request proto for AutocompletePlaces.
§Properties
Optional. Included primary Place type (for example, "restaurant" or "gas_station") from https://developers.google.com/maps/documentation/places/web-service/place-types. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.
Optional. Only include results in the specified regions, specified as up
to 15 CLDR two-character region codes. An empty set will not restrict the
results. If both location_restriction
and included_region_codes
are
set, the results will be located in the area of intersection.
Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.
Optional. A zero-based Unicode character offset of input
indicating the
cursor position in input
. The cursor position may influence what
predictions are returned. If empty, defaults to the length of input
.
Optional. The language in which to return results. Defaults to en-US. The
results may be in mixed languages if the language used in input
is
different from language_code
or if the returned Place does not have a
translation from the local language to language_code
.
Optional. Bias results to a specified location. At most one of
location_bias
or location_restriction
should be set. If neither are
set, the results will be biased by IP address, meaning the IP address will
be mapped to an imprecise location and used as a biasing signal.
Optional. Restrict results to a specified location. At most one of
location_bias
or location_restriction
should be set. If neither are
set, the results will be biased by IP address, meaning the IP address will
be mapped to an imprecise location and used as a biasing signal.
Optional. The origin point from which to calculate geodesic distance to
the destination (returned as distance_meters
). If this value is omitted,
geodesic distance will not be returned.
Optional. The region code, specified as a CLDR two-character region code.
This affects address formatting, result ranking, and may influence what
results are returned. This does not restrict results to the specified
region. To restrict results to a region, use region_code_restriction
.
Optional. A string which identifies an Autocomplete session for billing
purposes. Must be a URL and filename safe base64 string with at most 36
ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
returned. The session begins when the user starts typing a query, and
concludes when they select a place and a call to Place Details or Address
Validation is made. Each session can have multiple queries, followed by one
Place Details or Address Validation request. The credentials used for each
request within a session must belong to the same Google Cloud Console
project. Once a session has concluded, the token is no longer valid; your
app must generate a fresh token for each session. If the session_token
parameter is omitted, or if you reuse a session token, the session is
charged as if no session token was provided (each request is billed
separately). We recommend the following guidelines: * Use session tokens
for all Place Autocomplete calls. * Generate a fresh token for each
session. Using a version 4 UUID is recommended. * Ensure that the
credentials used for all Place Autocomplete, Place Details, and Address
Validation requests within a session belong to the same Cloud Console
project. * Be sure to pass a unique session token for each new session.
Using the same token for more than one session will result in each request
being billed individually.