Every berth, every tide.

One call returns the tide table for any berth in the harbor: the times, the heights and the window your keel clears.

1,000 calls a month freeHeights to the chart datum
$npm i @example/harbor-tides

Node.js 22 or later

One call returns

The whole tide, per berth.

High and low water

Times and heights for 14 days, at the berth itself.

Keel clearance

The hours a given draft clears, from the charted depth.

Datum named

Every height names its chart datum.

GET/v1/berths/{berth}/tidesOne berth, 14 days
Request
curl https://api.harbor-tides.example/v1/berths/pier-4/tides?days=1
Response200 OK
{
  "berth": "pier-4",
  "datum": "chart datum",
  "tides": [
    { "at": "04:12", "type": "low", "m": 0.6 },
    { "at": "10:31", "type": "high", "m": 4.1 },
    { "at": "16:40", "type": "low", "m": 0.8 },
    { "at": "22:58", "type": "high", "m": 3.9 }
  ]
}

The API

Four routes, one shape.

  • GET/v1/berths

    Every berth in a harbor, with its charted depth

  • GET/v1/berths/{berth}/tides

    High and low water for one berth

  • GET/v1/berths/{berth}/window

    The hours a given draft clears

  • POST/v1/alerts

    A webhook before a window closes

For the bridge

Plan the passage, not the math.

  • Windows, not tables

    Ask for a draft and get the hours it clears.

  • Alerts before the turn

    A webhook fires an hour before a window closes.

  • One source per berth

    Each answer names its station and its datum.

A 3.2 m draft at pier 4
{ "draft": 3.2, "opens": "08:05", "closes": "12:50" }

Where it runs

In the tools a crew opens.

In a script

One package, typed.

window.ts
const w = await tides.window('pier-4', 3.2);

In an agent

One prompt, one berth.

Ask an agent

Fetch the tide window for a 3.2 m draft at pier 4 today.

On a chart plotter

Through the Chartplot integration.

POST/v1/alerts
Requestapplication/json
{ "berth": "pier-4", "draft": 3.2 }
Response201 Created
{ "id": "al_42" }

Against station tables

The berth, not the nearest station.

Station tables

  • Heights at the station
  • One PDF per month
  • Datum in the small print
  • Math done by hand

Harbor tides

  • Heights at the berth
  • Fourteen days per call
  • Datum on every height
  • The window computed

How it works

From berth to window.

  1. 01Name the berth
  2. 02Give the draft
  3. 03Read the window
  4. 04Set an alert before it closes

Where the numbers come from

Charted, measured, named.

Charted depth

Each berth carries the depth from the latest harbor survey.

Measured tide

Predictions are corrected every 6 minutes from the harbor gauge.

Named datum

Every height says which datum it stands on.

Paste into your agent

Install @example/harbor-tides from npm.

Fetch the tide window for a 3.2 m draft at pier 4 today.

Print when it opens and when it closes.

Free to start

Ask for your berth.

A harbor master adds any berth in the harbor within one working day.