# Tide Station Data
GET/v1/sensordata/tides/{station}
Latest observed water level at a NOAA CO-OPS station in metres above MLLW (milli), with the next predicted high and low and whether the tide is rising or falling. Refreshes every 6 minutes.
Price
$0.005/ callEdge cache
180s
Uptime 24h
100.00%
p95
244ms
MCP tool
sensordata_tides-station
The Environmental sensors feed provides real-time data from open environmental networks, including tide station data. The /tides/{station} endpoint returns the latest observed water level at a NOAA CO-OPS station, along with the next predicted high and low, and whether the tide is rising or falling. Data refreshes every 6 minutes. The endpoint is available for $0.005 per request.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| station* | path | string |
Code
curl
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/sensordata/tides/8518750"
# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/sensordata/tides/8518750" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"TypeScript · @x402/fetch
// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/sensordata/tides/8518750")).json();
console.log(data);Python · x402
# pip install "x402[requests,evm]==2.27.0" eth-account
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import register_exact_evm_client
client = x402ClientSync()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
session = x402_requests(client)
print(session.get("https://api.realtimeapi.ai/v1/sensordata/tides/8518750").json())With an API key
curl "https://api.realtimeapi.ai/v1/sensordata/tides/8518750" -H "X-API-Key: $RTAPI_KEY"Frequently asked questions
What is the price of the endpoint?
$0.005 per request
How often is the data refreshed?
Every 6 minutes
What parameters are required for the endpoint?
Station