Marine forecast and sea windows
$0.004 per callUSDC via x402
GET /api/marine-forecastMarine forecast, 1-7 days: daily wave and swell height, Douglas sea state, sea temperature and wind in knots, plus safe-to-sail windows inside your wave and wind limits.
Details
Not for navigation. ?lat=43.65&lon=7.3. Weather data by Open-Meteo.com (CC BY 4.0). Wave data from Meteo-France (E.U. Copernicus Marine Service Information), ECMWF, NOAA NCEP and DWD. Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | number | no | Latitude, -90 to 90 (with lon; wins over place) The example sends 43.65. |
lon | number | no | Longitude, -180 to 180 (with lat) The example sends 7.3. |
place | string | no | A city, town or region name instead of lat/lon, for example "Paris" or "Austin, TX" (not a street address); the answer echoes the place it resolved to Up to 100 characters. |
days | number | no | Forecast days, 1-7 (default 5) The example sends 5. |
maxWaveM | number | no | Highest significant wave height allowed in a window, meters (default 1.5) The example sends 2.5. |
maxWindKt | number | no | Highest wind speed allowed in a window, knots (default 18) The example sends 20. |
maxGustKt | number | no | Highest gust allowed in a window, knots (no limit by default) |
minHours | number | no | Shortest window to report, 1-24 hours (default 3) |
daylightOnly | boolean | no | Only daylight hours count toward a window (default true) |
Example request
curl -i "https://agent402.tools/api/marine-forecast?lat=43.65&lon=7.3&days=5&maxWaveM=2.5&maxWindKt=20"
Watch a call get paid
Request
GET /api/marine-forecast402
$0.004 USDCSign
PAYMENT-SIGNATURESettle
on 14 chainsAnswer
200 OKReceipt
Agent402-ReceiptEd25519Example response
{
"lat": 43.65,
"lon": 7.3,
"seaCell": {
"lat": 43.63,
"lon": 7.29
},
"timezone": "Europe/Paris",
"days": 5,
"limits": {
"maxWaveM": 2.5,
"maxWindKt": 20,
"maxGustKt": null,
"minHours": 3,
"daylightOnly": true
},
"units": {
"wave": "m",
"period": "s",
"seaTemperature": "°C",
"wind": "kn"
},
"daily": [
{
"date": "2026-12-03",
"waveMaxM": 0.16,
"swellMaxM": 0.16,
"periodMaxS": 4,
"seaState": 2,
"seaStateLabel": "smooth",
"seaTemperatureC": 17.6,
"windMaxKt": 4.9,
"gustMaxKt": 6,
"hoursInsideLimits": 9
}
],
"found": true,
"count": 5,
"windows": [
{
"start": "2026-12-03T08:00",
"end": "2026-12-03T16:00",
"hours": 9,
"waveMaxM": 0.12,
"windMaxKt": 4.5,
"gustMaxKt": 5.6
}
],
"hoursSearched": 111,
"hoursInsideLimits": 39,
"caveat": "Model output at the nearest sea grid cell, for planning only: accuracy is limited near the coast, and it is not for navigation and does not replace official marine forecasts or warnings.",
"source": "computed from Open-Meteo marine and forecast data, marine-api.open-meteo.com and api.open-meteo.com (CC BY 4.0)",
"credit": "Wave data from Meteo-France MFWAM, SMOC and sea surface temperature (generated using E.U. Copernicus Marine Service Information), ECMWF WAM, NOAA NCEP GFS Wave and DWD EWAM and GWAM. Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.",
"attributionText": "Weather data by Open-Meteo.com (CC BY 4.0).",
"sourceUrl": "https://open-meteo.com/",
"licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}| Field | Type | Always present | In the example |
|---|---|---|---|
lat | number | yes | 43.65 |
lon | number | yes | 7.3 |
seaCell | object | yes | 2 fields: lat, lon |
timezone | string | yes | Europe/Paris |
days | number | yes | 5 |
limits | object | yes | 5 fields: maxWaveM, maxWindKt, maxGustKt, minHours and 1 more |
units | object | yes | 4 fields: wave, period, seaTemperature, wind |
daily | array of objects | yes | 1 item in the example |
found | boolean | yes | true |
count | number | yes | 5 |
windows | array of objects | yes | 1 item in the example |
hoursSearched | number | yes | 111 |
hoursInsideLimits | number | yes | 39 |
caveat | string | yes | Model output at the nearest sea grid cell, for planning only: accuracy is lim... |
source | string | yes | computed from Open-Meteo marine and forecast data, marine-api.open-meteo.com ... |
credit | string | yes | Wave data from Meteo-France MFWAM, SMOC and sea surface temperature (generate... |
attributionText | string | yes | Weather data by Open-Meteo.com (CC BY 4.0). |
sourceUrl | string | yes | https://open-meteo.com/ |
licenseUrl | string | yes | https://creativecommons.org/licenses/by/4.0/ |
From an MCP client
catalog.call {
"slug": "marine-forecast",
"params": {
"lat": 43.65,
"lon": 7.3,
"days": 5,
"maxWaveM": 2.5,
"maxWindKt": 20
}
}Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.19.2): pays from a wallet or AGENT402_CREDITS_KEY.
Errors and behavior
- Pay $0.004 per call over x402 or MPP. Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key (
Authorization: Bearer a402_...) also pays it. - Every field is optional; a rejected input answers 4xx with
error,tool,expected,requiredandexample. - On this route, a call ending in any status of 400 or above is not charged over x402, MPP or a credits key. A Tempo push credential pays before the call; a failure is a refund owed.
- A
POSTwith a JSON body is served as this GET. - An
Idempotency-Keyreplays the first 200 uncharged (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.004" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/marine-forecast?lat=43.65&lon=7.3&days=5&maxWaveM=2.5&maxWindKt=20");Get a wallet or run npx -y agent402-mcp@0.19.2 wallet new.
The quote (Python)
import base64, json, urllib.error, urllib.request
req = urllib.request.Request("https://agent402.tools/api/marine-forecast?lat=43.65&lon=7.3&days=5&maxWaveM=2.5&maxWindKt=20", method="GET", headers={})
try:
urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]]) # the price, per chain, in base units