# Suggest Street > The Suggest Street endpoint provides predictive autocomplete for street search. The Suggest Street endpoint provides predictive autocomplete for **street search**. The `restrict_id` parameter (city ID) is required. ## Endpoint `POST https://api.egon.com/v4/suggest/street` Egon ecommerce API ## Headers | Field | Type | Required | Description | | --- | --- | --- | --- | | `Authorization` | String | Yes | Bearer token authentication | ## Request City context (`restrict_id`), street query, and output options. | Field | Type | Required | Description | | --- | --- | --- | --- | | `par` | Object | Yes | Processing parameters, candidate limits, and country context | | `par.iso3` | String | Yes | Country code, ISO 3166-1 alpha-3. | | `par.max_candidates` | Number | No | Maximum number of candidates to extract. Default value: `10` | | `data` | Object | Yes | Search container with mandatory parent territorial identifier | | `data.query` | String | Yes | Query string | | `data.restrict_id` | Number | Yes | ID of the city. Used for filtering the research by a certain territorial level | ### Example request ```bash curl -X POST "https://api.egon.com/v4/suggest/street" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"par":{"iso3":"ITA"},"data":{"query":"Via Pac","restrict_id":38000004730}}' ``` ## Response Matching street candidates, street codes, and system status. | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object | No | | | `data.results` | Array | No | Array of candidate matches returned by the suggestion engine | | `data.results.lngout` | String | No | Language code ISO 3166-1 numeric | | `data.results.state` | String | No | State name | | `data.results.state_code` | String | No | State code | | `data.results.state_id` | Number | No | ID of the state | | `data.results.region` | String | No | Region name | | `data.results.region_code` | String | No | Region code | | `data.results.region_id` | Number | No | ID of the region | | `data.results.province` | String | No | Province name | | `data.results.province_code` | String | No | Province code | | `data.results.province_id` | Number | No | ID of the province | | `data.results.city` | String | No | City name | | `data.results.city_id` | Number | No | ID of the city | | `data.results.district1` | String | No | First-level district name | | `data.results.district1_id` | Number | No | ID of the first-level district | | `data.results.zipcode` | String | No | Postal code | | `data.results.street` | String | No | Street name | | `data.results.street_id` | Number | No | ID of the street | | `system` | Object | No | System error and execution status | | `system.ret_code` | Number | No | Code: 0 no blocking error, <> 0 blocking error code | | `system.des_ret_code` | String | No | Description | ### Example responses **HTTP 200: Valid response** Matching street candidates, street codes, and system status. ```json { "data": { "results": [ { "lngout": "380", "region": "Veneto", "region_id": 38000000006, "province": "Verona", "province_code": "VR", "province_id": 38000000115, "city": "Verona", "city_id": 38000004730, "zipcode": "37135", "street": "Via Antonio Pacinotti", "street_id": 38000073526 }, { "lngout": "380", "region": "Veneto", "region_id": 38000000006, "province": "Verona", "province_code": "VR", "province_id": 38000000115, "city": "Verona", "city_id": 38000004730, "zipcode": "37124", "street": "Via della Pace", "street_id": 38000073960 } ] }, "system": { "ret_code": 0, "des_ret_code": "Ok" } } ``` **HTTP 400: Invalid token** The provided token is not valid or expired. ```json { "error": { "code": 400, "message": "Unauthenticated." } } ``` **HTTP 401: Missing token** Provide the required authentication token in the Authorization request header. ```json { "error": { "code": 401, "message": "You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer {token}'). See [Egon Api documentation](https://docs.egon.com) for details." } } ``` **HTTP 422: Missing data** The request is missing the required data object. ```json { "error": { "code": 422, "message": "The data field is required. (and 1 more error)", "details": { "data": [ "The data field is required." ], "data.query": [ "The data.query field is required." ] } } } ``` **HTTP 422: Missing par or iso3** The request is missing the required par object or ISO 3166-1 alpha-3 country code. ```json { "error": { "code": 422, "message": "The par field is required. (and 1 more error)", "details": { "par": [ "The par field is required." ], "par.iso3": [ "The par.iso3 field is required." ] } } } ``` **HTTP 422: Invalid iso3** The specified ISO 3166-1 alpha-3 country code is not enabled. ```json { "error": { "code": 422, "message": "Country not enabled.", "details": { "par.iso3": [ "Country not enabled." ] } } } ``` **HTTP 422: Missing query** The request is missing the required query string. ```json { "error": { "code": 422, "message": "The data.query field is required.", "details": { "data.query": [ "The data.query field is required." ] } } } ``` **HTTP 422: Missing restrict ID** The data.restrict_id field is required. ```json { "error": { "code": 422, "message": "The data.restrict id field is required.", "details": { "data.restrict_id": [ "The data.restrict id field is required." ] } } } ```