## Autocomplete a partial address `$client->geocode->autocompletePost(string q, ?string countryCode, ?string format, ?string lang, ?float lat, ?string layer, ?int limit, ?float lng): AutocompleteResult` **post** `/api/v1/geocode/autocomplete` Autocomplete a partial address ### Parameters - `q: string` Partial address query - `countryCode?:optional string` ISO 3166-1 alpha-2 country code filter - `format?:optional string` Response format: json (default), geojson, csv, ndjson - `lang?:optional string` Language code for localized names (e.g. en, de, fr) - `lat?:optional float` Focus latitude - `layer?:optional string` Filter by layer: address, poi, or admin - `limit?:optional int` Maximum results (default 10, max 20) - `lng?:optional float` Focus longitude ### Returns - `AutocompleteResult` - `list features` Autocomplete suggestions ordered by relevance - `Type type` ### Example ```php geocode->autocompletePost( q: 'q', countryCode: 'country_code', format: 'format', lang: 'lang', lat: 0, layer: 'layer', limit: 0, lng: 0, ); var_dump($autocompleteResult); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "display_name": "221B Baker Street, London, NW1 6XE, United Kingdom", "category": "restaurant", "city": "London", "confidence": 0, "country": "United Kingdom", "country_code": "GB", "distance_m": 0, "full_address": "221B Baker Street, London, NW1 6XE, United Kingdom", "house_number": "221B", "interpolated": true, "name": "Eiffel Tower", "osm_id": 21154906, "osm_type": "node", "postcode": "NW1 6XE", "score": 0, "source": "structured", "state": "England", "street": "Baker Street", "subcategory": "italian", "tags": { "foo": "string" }, "wikipedia": "en:Eiffel Tower" }, "type": "Feature" } ], "type": "FeatureCollection" } ```