Tides
NOAA CO-OPS tide and current stations, predictions and observations for marine analysis
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available Β· $10/month organization minimum
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
| 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.
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;
INSTALL vgi FROM community;
LOAD vgi;
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'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'tides' AS tides (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-tides:0.2.0'
);
3. Run a query
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connectorβs deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'tides' AS tides
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name
Query Farm operates Tides for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use tides as the catalog alias for the query below.
4. Run a query
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name
Technical details
- Verified connector release
- v0.2.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
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]'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'tides' AS tides (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-tides:0.2.0'
);
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.
NOAA CO-OPS tide and current stations, predictions and observations in SQL. Table functions return typed Arrow columns with UTC timestamps, source URLs and retrieval times. No API key is needed. Missing measurements become NULL; invalid arguments and unexpected upstream responses fail explicitly. Data is retrieved when a query executes. Use SQL to filter, aggregate and join stations to measurements. Water levels are metres relative to the returned datum, default MLLW. Current velocities are converted from cm/s to m/s. Time-series dates are inclusive UTC days, at most 366 days; requests are automatically chunked. Tide predictions are astronomical and current slack is a separate product.
Data access
Use the main schema to discover stations and retrieve observations. Each response preserves its source URL and UTC retrieval time. Missing sensor values remain NULL.
Sources and references
- NOAA Tides & Currents (CO-OPS): the upstream station network, predictions and observations.
- CO-OPS Data Retrieval API: the data getter used for predictions, water levels and currents.
- CO-OPS Metadata API: the station directory used by stations().
- Tidal datums: what MLLW, MSL, NAVD88 and the other datum choices mean.
Catalog
Everything tides exposes once attached β read straight from the worker's
released build.
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)
Find tide prediction stations in New York
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name;
| 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;
products
Supported CO-OPS products and the units returned by this worker
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;
current_bins (station_id VARCHAR)
Read NOAA current-meter bin depths and deployment metadata
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;
current_predictions (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, bin := BIGINT, step := VARCHAR)
Read predicted slack, flood and ebb events or interval major-axis currents
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;
currents (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, bin := BIGINT)
Read current speed and direction from NOAA current-meter stations
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;
stations (station_kind := VARCHAR)
Discover NOAA stations by observation or prediction capability
Find tide prediction stations in New York
SELECT station_id, name, latitude, longitude
FROM tides.main.stations()
WHERE state = 'NY'
ORDER BY name;
| 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 |
tide_predictions (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, datum := VARCHAR, step := VARCHAR)
Read predicted high/low tides or interval water levels from NOAA
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;
water_levels (station_id VARCHAR, start_date VARCHAR, end_date VARCHAR, datum := VARCHAR)
Read preliminary or verified six-minute water levels with NOAA quality flags
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;
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.
Related workers
Buoys
Weather, ocean & earth
NOAA NDBC buoy stations, latest observations and recent station histories for marine analysis
NWS
Weather, ocean & earth
Explore US weather alerts, observations, forecast grids, bulletins, and river conditions
Open-Meteo
Weather, ocean & earth
Open-Meteo weather β forecasts, history, air quality, marine, flood and climate data