## Forward geocode an address `$client->geocode->forwardPost(string q, ?string bbox, ?string countryCode, ?string format, ?string lang, ?float lat, ?string layer, ?int limit, ?float lng): GeocodeResult` **post** `/api/v1/geocode` Forward geocode an address ### Parameters - `q: string` Address or place name - `bbox?:optional string` Bounding box filter: south,west,north,east - `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 20, max 100) - `lng?:optional float` Focus longitude ### Returns - `GeocodeResult` - `list features` Geocoding results ordered by relevance score - `Type type` ### Example ```php geocode->forwardPost( q: 'q', bbox: 'bbox', countryCode: 'country_code', format: 'format', lang: 'lang', lat: 0, layer: 'layer', limit: 0, lng: 0, ); var_dump($geocodeResult); ``` #### 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" } ```