interface PlaceAutocompleteResult {
    description: string;
    distance_meters?: number;
    matched_substrings: PredictionSubstring[];
    place_id: string;
    structured_formatting: StructuredFormatting;
    terms: PredictionTerm[];
    types: AddressType[];
}

Properties

description: string

contains the human-readable name for the returned result. For establishment results, this is usually the business name.

distance_meters?: number

contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. This field is only returned when the origin point is specified in the request. This field is not returned in predictions of type route.

matched_substrings: PredictionSubstring[]

contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired.

place_id: string

is a textual identifier that uniquely identifies a place. To retrieve information about the place, pass this identifier in the placeId field of a Places API request.

structured_formatting: StructuredFormatting

contains details on the prediction.

contains an array of terms identifying each section of the returned description (a section of the description is generally terminated with a comma).

types: AddressType[]

contains an array of types that apply to this place. For example: [ "political", "locality" ] or [ "establishment", "geocode" ].