Charter Boats
Charter Boats API
Passages

Passages by Location

Get all passages departing from or arriving at a specific location

Endpoint

GET /passages/by-location/:id

Description

Retrieve all sailing passages that either depart from or arrive at a specific location. Useful for showing "Sail from here" options on a location detail page.

Results are sorted by distance (shortest passages first).

Authentication

No authentication required for server-side requests — this is a public read endpoint. (A key is only needed for cross-origin calls made from a browser on another domain; see Authentication.)

Path Parameters

ParameterTypeDescription
idnumberLocation ID

Query Parameters

ParameterTypeRequiredDescription
limitnumberNoMax results (default: 20, max: 50)

Example Request

curl "https://charter.boats/api/passages/by-location/2058?limit=5"

Example Response

[
  {
    "id": "ca6df91f-0984-4ce1-a43a-c2bb82d5cc52",
    "from_location_id": 2058,
    "to_location_id": 20010,
    "slug": "sivota-to-bay-svoyrna",
    "title": "Sivota to Bay Svoyrna",
    "description": null,
    "distance_nm": 3.3,
    "typical_duration_hours": null,
    "difficulty": null,
    "rating": null,
    "rating_count": 0,
    "variant_count": 1,
    "geojson": {
      "type": "Feature",
      "geometry": { "type": "LineString", "coordinates": [[20.6837, 38.6219], [20.65, 38.61]] },
      "properties": { "distance_nm": 3.3 }
    },
    "created_at": "2026-02-13T11:30:03.869677+00:00",
    "updated_at": "2026-02-13T11:30:04.002968+00:00",
    "from_location": {
      "id": 2058,
      "name": "Sivota",
      "country_code": "gr"
    },
    "to_location": {
      "id": 20010,
      "name": "Bay Svoyrna",
      "country_code": "gr"
    }
  }
]

Response Fields

FieldTypeDescription
idstringRoute ID (UUID)
from_location_id / to_location_idnumberDeparture / arrival location IDs
slugstringURL slug
titlestringRoute title
descriptionstring|nullRoute description
distance_nmnumber|nullDistance in nautical miles
difficultystring|nullDifficulty level
typical_duration_hoursnumber|nullEstimated sailing time
ratingnumber|nullAverage rating
rating_countnumberNumber of ratings
variant_countnumber|nullNumber of route variants
geojsonobject|nullRoute geometry as a GeoJSON Feature (geometry + properties)
created_at / updated_atstringRow timestamps
from_locationobjectDeparture location — brief shape: only id, name, country_code
to_locationobjectArrival location (same brief shape)

Notes

  • Returns passages where the given location is either the departure or arrival point.
  • Results are sorted by distance ascending (shortest passages first).
  • Includes geojson route geometry. Use Get Passage for full details including variants and POIs.

On this page