## Autocomplete a partial address `client.geocode.autocomplete(GeocodeAutocompleteParamsquery, RequestOptionsoptions?): AutocompleteResult` **get** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `query: GeocodeAutocompleteParams` - `q: string` Partial address query - `country_code?: string` ISO 3166-1 alpha-2 country code filter - `lang?: string` Language code for localized names (e.g. en, de, fr) - `lat?: number` Focus latitude - `layer?: string` Filter by layer: address, poi, or admin - `limit?: number` Maximum results (default 10, max 20) - `lng?: number` Focus longitude ### Returns - `AutocompleteResult` GeoJSON FeatureCollection of autocomplete suggestions - `features: Array` - `geometry: GeoJsonGeometry` - `coordinates: Array | Array> | Array>> | Array>>>` GeoJSON coordinates array (nesting depth varies by geometry type) - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` - `country_code?: string | null` ISO 3166-1 alpha-2 country code - `display_name?: string` Formatted address or place name - `distance_m?: number | null` Distance in meters - `osm_id?: number | null` OpenStreetMap ID - `osm_type?: string | null` OSM element type - `score?: number | null` Match confidence score - `source?: string | null` Result source (address, place, interpolation) - `type: "Feature"` - `"Feature"` - `type: "FeatureCollection"` - `"FeatureCollection"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const autocompleteResult = await client.geocode.autocomplete({ q: 'q' }); console.log(autocompleteResult.features); ```