Charter Boats API
Locations

Search Locations

Typeahead search for marinas, anchorages, and bays

Endpoint

GET /locations/search

Description

Fast typeahead search for locations (marinas, anchorages, bays). Uses normalized matching that handles special characters -- for example, searching "dalbora" matches "d'Albora Marina".

Returns a lightweight response suitable for autocomplete UIs.

Authentication

No authentication required. This is a public endpoint.

Query Parameters

ParameterTypeRequiredDescription
qstringYesSearch query (minimum 2 characters)
limitnumberNoMax results (default: 10, max: 20)

Example Request

curl "https://charter.boats/api/locations/search?q=lefkas&limit=5"

Example Response

[
  {
    "id": 4521,
    "osm_id": 123456789,
    "name": "D-Marin Lefkas",
    "lat": 38.8335,
    "lon": 20.7068,
    "city": "Lefkada",
    "state": "Western Greece",
    "country": "Greece",
    "harbour_category": "marina"
  },
  {
    "id": 4523,
    "name": "Lefkas Town Quay",
    "lat": 38.8329,
    "lon": 20.7102,
    "city": "Lefkada",
    "state": "Western Greece",
    "country": "Greece",
    "harbour_category": "harbour"
  }
]

Response Fields

FieldTypeDescription
idnumberLocation ID
osm_idnumber|nullOpenStreetMap node ID
namestringLocation name
latnumberLatitude
lonnumberLongitude
citystring|nullCity name
statestring|nullState or region
countrystring|nullCountry name
harbour_categorystring|nullType of harbour (e.g. marina, harbour, anchorage)

Notes

  • Returns an empty array if q is missing or shorter than 2 characters.
  • Results are ranked by search relevance.

On this page