Skip to content

Tides

NOAA CO-OPS tide and current stations, predictions and observations for marine analysis

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/tides/index.md to help me query Tides with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Find tide prediction stations in New York

Example output Β· captured
Connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name
Result Β· first 5 rows
station_id name latitude longitude
8518995 ALBANY 42.65 -73.7467
8515864 Amityville 40.655 -73.4183
8515421 Babylon 40.685 -73.315
8516501 Baldwin, Parsonage Cove, Hempstead Bay 40.6333 -73.6167
8517394 Barren Island, Rockaway Inlet 40.5783 -73.8883

Quick start

Choose where to run Tides, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'tides' AS tides (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-tides'
);

3. Run a query

query.sql
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name
More example queries β†’
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'tides' AS tides (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

NOAA CO-OPS tide and current stations, tide predictions, observed water levels, and predicted and observed tidal currents as SQL tables, with heights in metres on a chosen datum and speeds in m/s. No API key needed.

Catalog

Everything tides exposes once attached β€” read straight from the worker's released build.

tides 1 schema
main 1 table Β· 6 functions

NOAA CO-OPS tide and current station directory, tide predictions, observed water levels, tidal currents and a product unit reference.

Schema examples (10)
Examples (10)

Find tide prediction stations in New York

SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name;
Result Β· first 5 rows
station_id name latitude longitude
8518995 ALBANY 42.65 -73.7467
8515864 Amityville 40.655 -73.4183
8515421 Babylon 40.685 -73.315
8516501 Baldwin, Parsonage Cove, Hempstead Bay 40.6333 -73.6167
8517394 Barren Island, Rockaway Inlet 40.5783 -73.8883

Inspect tide predictions in UTC

SELECT time, height_m
FROM tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-02')
ORDER BY time;

Compare each predicted high tide at The Battery on 1–3 January 2026 with the highest observed water level within an hour of it; surge_m is observed peak minus predicted height

SELECT p.time AS predicted_high, p.height_m AS predicted_m,
  max(o.height_m) AS observed_peak_m,
  round(max(o.height_m) - p.height_m, 3) AS surge_m
FROM tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-03') AS p
JOIN tides.main.water_levels('8518750', '2026-01-01', '2026-01-03') AS o ON o.time BETWEEN p.time - INTERVAL 1 HOUR AND p.time + INTERVAL 1 HOUR
WHERE p.event_type = 'H'
GROUP BY p.time, p.height_m
ORDER BY p.time;

Inspect observed water levels in UTC

SELECT time, height_m
FROM tides.main.water_levels('8518750', '2026-01-01', '2026-01-02')
ORDER BY time;
6 more examples

Daily range of the storm-surge residual (observed minus predicted water level, metres) at The Battery for 1–7 January 2026, joining six-minute observations to six-minute tide predictions on time; days follow the session time zone (set UTC)

SELECT CAST(o.time AS DATE) AS obs_day,
  round(max(o.height_m - p.height_m), 3) AS max_residual_m,
  round(min(o.height_m - p.height_m), 3) AS min_residual_m,
  count(o.height_m) AS samples
FROM tides.main.water_levels('8518750', '2026-01-01', '2026-01-07') AS o
JOIN tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-07', step := '6') AS p USING (time)
GROUP BY obs_day
ORDER BY obs_day;

Inspect tidal current predictions in UTC

SELECT time, velocity_major_mps
FROM tides.main.current_predictions('ACT0956', '2026-01-01', '2026-01-02')
ORDER BY time;

Check each predicted slack, maximum flood and maximum ebb at the Chesapeake Bay entrance (cb0102, bin 4) on 1 January 2026 against the mean observed speed within 15 minutes of the event

SELECT p.time, p.event_type,
  round(abs(p.velocity_major_mps), 2) AS predicted_speed_mps,
  round(avg(o.speed_mps), 2) AS observed_speed_mps,
  count(o.speed_mps) AS observations
FROM tides.main.current_predictions('cb0102', '2026-01-01', '2026-01-01', bin := 4) AS p
JOIN tides.main.currents('cb0102', '2026-01-01', '2026-01-01', bin := 4) AS o ON o.time BETWEEN p.time - INTERVAL 15 MINUTE AND p.time + INTERVAL 15 MINUTE
GROUP BY p.time, p.event_type, p.velocity_major_mps
ORDER BY p.time;

Inspect observed currents in UTC

SELECT time, speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-02')
ORDER BY time;

Mean and peak observed current speed by sensor depth at Cape Henry (cb0102) on 1 January 2026, joining all-bin observations to the current-meter bin depths

SELECT b.bin, b.depth_m, round(avg(c.speed_mps), 3) AS mean_speed_mps,
  round(max(c.speed_mps), 3) AS max_speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-01') AS c
JOIN tides.main.current_bins('cb0102') AS b USING (bin)
GROUP BY b.bin, b.depth_m
ORDER BY b.bin;

Inspect the observation depths at Cape Henry

SELECT bin, depth_m FROM tides.main.current_bins('cb0102') ORDER BY bin;
Tables
products 1 example3 cols

Supported CO-OPS products and the units returned by this worker

Columns
sql_functionnot null VARCHAR
Worker function to call.
noaa_productnot null VARCHAR
NOAA product or metadata resource.
output_unitsnot null VARCHAR
Primary measurement units returned by the worker.
ConstraintsPRIMARY KEY (sql_function)
Example

Supported CO-OPS products and the units returned by this worker

SELECT sql_function, output_units
FROM tides.main.products
WHERE output_units = 'm/s'
ORDER BY sql_function;
Link
Table functions
current_bins (station_id VARCHAR) 2 examples

Read NOAA current-meter bin depths and deployment metadata

Arguments
station_id VARCHAR
Current observation station ID from stations(station_kind := 'currents').
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
bin INTEGER
Current-meter depth-bin identifier.
depth_m DOUBLE
Bin depth in metres as supplied by NOAA; deployment-dependent.
qc_flag INTEGER
NOAA bin quality-control flag.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Examples (2)

Inspect the observation depths at Cape Henry

SELECT bin, depth_m FROM tides.main.current_bins('cb0102') ORDER BY bin;

Mean and peak observed current speed by sensor depth at Cape Henry (cb0102) on 1 January 2026, joining all-bin observations to the current-meter bin depths

SELECT b.bin, b.depth_m, round(avg(c.speed_mps), 3) AS mean_speed_mps,
  round(max(c.speed_mps), 3) AS max_speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-01') AS c
JOIN tides.main.current_bins('cb0102') AS b USING (bin)
GROUP BY b.bin, b.depth_m
ORDER BY b.bin;
Link
current_predictions (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, bin := BIGINT, step := VARCHAR) 2 examples

Read predicted slack, flood and ebb events or interval major-axis currents

Positional arguments
station_id VARCHAR
NOAA station identifier from the matching stations collection; preserve any leading zeroes.
start_date VARCHAR
First UTC day, inclusive, formatted YYYY-MM-DD.
end_date VARCHAR
Last UTC day, inclusive, formatted YYYY-MM-DD; must be on or after start_date.
Named arguments
bin := BIGINT
Prediction depth-bin identifier, default 1; availability is station-specific. Β· default 1
step := VARCHAR
Prediction interval: max_slack (default), h, or 1/6/10/30/60 minutes. Subordinate stations require max_slack. Β· default "max_slack"
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
time TIMESTAMPTZ
UTC timestamp of the current prediction.
velocity_major_mps DOUBLE
Signed velocity along the major axis in m/s: positive flood, negative ebb; NOAA cm/s divided by 100.
event_type VARCHAR
NOAA event type, typically flood, ebb, or slack for max_slack; NULL for interval samples.
flood_direction_deg DOUBLE
Mean flood direction in degrees from true north; not an instantaneous bearing.
ebb_direction_deg DOUBLE
Mean ebb direction in degrees from true north; not an instantaneous bearing.
bin INTEGER
Depth-bin identifier supplied by NOAA.
depth_m DOUBLE
NOAA prediction-bin depth in metres.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Examples (2)

Inspect tidal current predictions in UTC

SELECT time, velocity_major_mps
FROM tides.main.current_predictions('ACT0956', '2026-01-01', '2026-01-02')
ORDER BY time;

Check each predicted slack, maximum flood and maximum ebb at the Chesapeake Bay entrance (cb0102, bin 4) on 1 January 2026 against the mean observed speed within 15 minutes of the event

SELECT p.time, p.event_type,
  round(abs(p.velocity_major_mps), 2) AS predicted_speed_mps,
  round(avg(o.speed_mps), 2) AS observed_speed_mps,
  count(o.speed_mps) AS observations
FROM tides.main.current_predictions('cb0102', '2026-01-01', '2026-01-01', bin := 4) AS p
JOIN tides.main.currents('cb0102', '2026-01-01', '2026-01-01', bin := 4) AS o ON o.time BETWEEN p.time - INTERVAL 15 MINUTE AND p.time + INTERVAL 15 MINUTE
GROUP BY p.time, p.event_type, p.velocity_major_mps
ORDER BY p.time;
Link
currents (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, bin := BIGINT) 2 examples

Read current speed and direction from NOAA current-meter stations

Positional arguments
station_id VARCHAR
NOAA station identifier from the matching stations collection; preserve any leading zeroes.
start_date VARCHAR
First UTC day, inclusive, formatted YYYY-MM-DD.
end_date VARCHAR
Last UTC day, inclusive, formatted YYYY-MM-DD; must be on or after start_date.
Named arguments
bin := BIGINT
Depth-bin identifier; 0 (default) requests all observation bins. Β· default 0
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
time TIMESTAMPTZ
UTC timestamp of the current observation.
speed_mps DOUBLE
Observed current speed in m/s, converted from NOAA cm/s.
direction_deg DOUBLE
Direction toward which the current flows, degrees from true north.
bin INTEGER
Observed depth-bin identifier; use current_bins for deployed sensor depths.
flags VARCHAR
Unmodified NOAA quality flags, when available.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Examples (2)

Inspect observed currents in UTC

SELECT time, speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-02')
ORDER BY time;

Mean and peak observed current speed by sensor depth at Cape Henry (cb0102) on 1 January 2026, joining all-bin observations to the current-meter bin depths

SELECT b.bin, b.depth_m, round(avg(c.speed_mps), 3) AS mean_speed_mps,
  round(max(c.speed_mps), 3) AS max_speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-01') AS c
JOIN tides.main.current_bins('cb0102') AS b USING (bin)
GROUP BY b.bin, b.depth_m
ORDER BY b.bin;
Link
stations (station_kind := VARCHAR) 1 example

Discover NOAA stations by observation or prediction capability

Named arguments
station_kind := VARCHAR
NOAA collection: tidepredictions (default), waterlevels, currentpredictions, or currents. Β· default "tidepredictions"
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
name VARCHAR
Station name supplied by NOAA.
latitude DOUBLE
Latitude in decimal degrees, north positive.
longitude DOUBLE
Longitude in decimal degrees, east positive.
state VARCHAR
US state or territory abbreviation when supplied.
station_kind VARCHAR
Requested collection: waterlevels, tidepredictions, currents, or currentpredictions.
station_type VARCHAR
NOAA station type code, when supplied; subordinate stations have restricted prediction intervals.
bin INTEGER
Current-prediction depth bin (pass as current_predictions bin); currentpredictions lists one row per bin. NULL for other collections.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Example

Find tide prediction stations in New York

SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name;
Result Β· first 5 rows
station_id name latitude longitude
8518995 ALBANY 42.65 -73.7467
8515864 Amityville 40.655 -73.4183
8515421 Babylon 40.685 -73.315
8516501 Baldwin, Parsonage Cove, Hempstead Bay 40.6333 -73.6167
8517394 Barren Island, Rockaway Inlet 40.5783 -73.8883
Link
tide_predictions (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, datum := VARCHAR, step := VARCHAR) 2 examples

Read predicted high/low tides or interval water levels from NOAA

Positional arguments
station_id VARCHAR
NOAA station identifier from the matching stations collection; preserve any leading zeroes.
start_date VARCHAR
First UTC day, inclusive, formatted YYYY-MM-DD.
end_date VARCHAR
Last UTC day, inclusive, formatted YYYY-MM-DD; must be on or after start_date.
Named arguments
datum := VARCHAR
Vertical datum; default MLLW. Subordinate predictions require MLLW. Supported datums vary by station. Β· default "MLLW"
step := VARCHAR
Prediction interval: hilo (default), h, or 1/5/6/10/15/30/60 minutes. Subordinate stations require hilo. Β· default "hilo"
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
time TIMESTAMPTZ
UTC timestamp of the predicted tide or observed water level.
height_m DOUBLE
Water level in metres relative to the datum column; NULL for a missing value.
datum VARCHAR
Requested vertical reference, such as MLLW; compare heights only on compatible datums.
event_type VARCHAR
H for high tide, L for low tide; NULL for interval samples or observations.
sigma_m DOUBLE
Standard deviation in metres for observed water levels; NULL for predictions.
quality VARCHAR
NOAA observation quality code: p preliminary or v verified; NULL for predictions.
flags VARCHAR
Unmodified NOAA comma-separated observation quality flags; NULL when absent.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Examples (2)

Inspect tide predictions in UTC

SELECT time, height_m
FROM tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-02')
ORDER BY time;

Compare each predicted high tide at The Battery on 1–3 January 2026 with the highest observed water level within an hour of it; surge_m is observed peak minus predicted height

SELECT p.time AS predicted_high, p.height_m AS predicted_m,
  max(o.height_m) AS observed_peak_m,
  round(max(o.height_m) - p.height_m, 3) AS surge_m
FROM tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-03') AS p
JOIN tides.main.water_levels('8518750', '2026-01-01', '2026-01-03') AS o ON o.time BETWEEN p.time - INTERVAL 1 HOUR AND p.time + INTERVAL 1 HOUR
WHERE p.event_type = 'H'
GROUP BY p.time, p.height_m
ORDER BY p.time;
Link
water_levels (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, datum := VARCHAR) 2 examples

Read preliminary or verified six-minute water levels with NOAA quality flags

Positional arguments
station_id VARCHAR
NOAA station identifier from the matching stations collection; preserve any leading zeroes.
start_date VARCHAR
First UTC day, inclusive, formatted YYYY-MM-DD.
end_date VARCHAR
Last UTC day, inclusive, formatted YYYY-MM-DD; must be on or after start_date.
Named arguments
datum := VARCHAR
Vertical datum; default MLLW. Subordinate predictions require MLLW. Supported datums vary by station. Β· default "MLLW"
Returns columns
station_id VARCHAR
NOAA station identifier; retain as text, including leading zeroes.
time TIMESTAMPTZ
UTC timestamp of the predicted tide or observed water level.
height_m DOUBLE
Water level in metres relative to the datum column; NULL for a missing value.
datum VARCHAR
Requested vertical reference, such as MLLW; compare heights only on compatible datums.
event_type VARCHAR
H for high tide, L for low tide; NULL for interval samples or observations.
sigma_m DOUBLE
Standard deviation in metres for observed water levels; NULL for predictions.
quality VARCHAR
NOAA observation quality code: p preliminary or v verified; NULL for predictions.
flags VARCHAR
Unmodified NOAA comma-separated observation quality flags; NULL when absent.
source_url VARCHAR
Exact NOAA request URL; identifies the data product and request parameters.
fetched_at TIMESTAMPTZ
UTC time the NOAA response was retrieved; not the observation time.
Examples (2)

Inspect observed water levels in UTC

SELECT time, height_m
FROM tides.main.water_levels('8518750', '2026-01-01', '2026-01-02')
ORDER BY time;

Daily range of the storm-surge residual (observed minus predicted water level, metres) at The Battery for 1–7 January 2026, joining six-minute observations to six-minute tide predictions on time; days follow the session time zone (set UTC)

SELECT CAST(o.time AS DATE) AS obs_day,
  round(max(o.height_m - p.height_m), 3) AS max_residual_m,
  round(min(o.height_m - p.height_m), 3) AS min_residual_m,
  count(o.height_m) AS samples
FROM tides.main.water_levels('8518750', '2026-01-01', '2026-01-07') AS o
JOIN tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-07', step := '6') AS p USING (time)
GROUP BY obs_day
ORDER BY obs_day;
Link

Try these queries

Inspect tide predictions in UTC

SELECT time, height_m
FROM tides.main.tide_predictions('8518750', '2026-01-01', '2026-01-02')
ORDER BY time

Uses tide_predictions

Inspect observed water levels in UTC

SELECT time, height_m
FROM tides.main.water_levels('8518750', '2026-01-01', '2026-01-02')
ORDER BY time

Uses water_levels

Inspect tidal current predictions in UTC

SELECT time, velocity_major_mps
FROM tides.main.current_predictions('ACT0956', '2026-01-01', '2026-01-02')
ORDER BY time

Uses current_predictions

Inspect observed currents in UTC

SELECT time, speed_mps
FROM tides.main.currents('cb0102', '2026-01-01', '2026-01-02')
ORDER BY time

Uses currents

Inspect the observation depths at Cape Henry

SELECT bin, depth_m FROM tides.main.current_bins('cb0102') ORDER BY bin

Uses current_bins

Supported CO-OPS products and the units returned by this worker

SELECT sql_function, output_units
FROM tides.main.products
WHERE output_units = 'm/s'
ORDER BY sql_function

Uses products

4 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • List sql_function and output_units for products measured in m/s, ordered by sql_function.
  • Using tides.main.stations, list the first five station IDs and names ordered by station ID.
  • Using tides.main.tide_predictions, show time and height_m for station 8518750 for January 1–2, 2026, ordered by time.
  • Using tides.main.water_levels, show time and height_m for station 8518750 for January 1–2, 2026, ordered by time.
  • Using tides.main.current_predictions, show time and velocity_major_mps for station ACT0956 for January 1–2, 2026, ordered by time.
  • Using tides.main.currents, show time and speed_mps for station cb0102 for January 1–2, 2026, ordered by time.

Tides is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.