> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Locations

> This endpoint returns cities or departments matching the given criteria.

### Query parameters

<ParamField query="query" type="string" placeholder="paris">
  Query term to perform search.
</ParamField>

<ParamField query="excludedCitiesIds[]" type="array">
  Exclude cities using their IRI.
</ParamField>

<ParamField query="excludedDepartmentsIds[]" type="array">
  Exclude departments using their IRI.
</ParamField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location -g --request GET 'https://api.notif.immo/public/location-autocomplete?q=paris' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api_key>'
  ```
</RequestExample>

<ResponseExample>
  ```json Example Response theme={null}
  {
    "hydra:member": [
      {
        "@id": "/cities/37087",
        "@type": "City",
        "code": "string",
        "displayName": "Lille (toute la ville)",
        "groupedCityNames": [
          "Capinghem",
          "Euralille",
          "Hellemmes lille",
          "Lezennes",
          "Lille",
          "Lomme"
        ],
        "groupedCityZipcodes": [
          "59000",
          "59160",
          "59260",
          "59777",
          "59800"
        ],
        "id": "37087",
        "insee": "59350",
        "libelle": "Lille",
        "location": {
          "lat": 50.629059,
          "lon": 3.06038
        },
        "name": "Lille",
        "zipcode": "59000"
      }
    ]
  }
  ```
</ResponseExample>
