## Autocomplete a partial address `AutocompleteResult geocode().autocomplete(GeocodeAutocompleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **get** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `GeocodeAutocompleteParams params` - `String q` Partial address query - `Optional countryCode` ISO 3166-1 alpha-2 country code filter - `Optional lang` Language code for localized names (e.g. en, de, fr) - `Optional lat` Focus latitude - `Optional layer` Filter by layer: address, poi, or admin - `Optional limit` Maximum results (default 10, max 20) - `Optional lng` Focus longitude ### Returns - `class AutocompleteResult:` GeoJSON FeatureCollection of autocomplete suggestions - `List features` - `GeoJsonGeometry geometry` - `Coordinates coordinates` GeoJSON coordinates array (nesting depth varies by geometry type) - `List` - `List>` - `List>>` - `List>>>` - `Type type` - `POINT("Point")` - `LINE_STRING("LineString")` - `POLYGON("Polygon")` - `MULTI_POINT("MultiPoint")` - `MULTI_LINE_STRING("MultiLineString")` - `MULTI_POLYGON("MultiPolygon")` - `Properties properties` - `Optional countryCode` ISO 3166-1 alpha-2 country code - `Optional displayName` Formatted address or place name - `Optional distanceM` Distance in meters - `Optional osmId` OpenStreetMap ID - `Optional osmType` OSM element type - `Optional score` Match confidence score - `Optional source` Result source (address, place, interpolation) - `Type type` - `FEATURE("Feature")` - `Type type` - `FEATURE_COLLECTION("FeatureCollection")` ### Example ```java package com.plazafyi.example; import com.plazafyi.client.PlazaClient; import com.plazafyi.client.okhttp.PlazaOkHttpClient; import com.plazafyi.models.geocode.AutocompleteResult; import com.plazafyi.models.geocode.GeocodeAutocompleteParams; public final class Main { private Main() {} public static void main(String[] args) { PlazaClient client = PlazaOkHttpClient.fromEnv(); GeocodeAutocompleteParams params = GeocodeAutocompleteParams.builder() .q("q") .build(); AutocompleteResult autocompleteResult = client.geocode().autocomplete(params); } } ```