API Documentation

Complete reference for the TideCheck API. All endpoints require an API key passed via the X-API-Key header.

Authentication Tide Predictions Station Search Nearest Stations Geocoding Quick Start Errors & Limits Datums
Authentication

Every API request must include your API key in the X-API-Key header. Create and manage keys from the API Keys page.

curl -H "X-API-Key: tc_your_key_here" \
  https://tidecheck.com/api/station/9414290/tides
Base URL: https://tidecheck.com
Format: All responses are JSON with Content-Type: application/json
Timestamps: All times are ISO 8601 UTC (e.g. 2026-03-09T14:30:00.000Z). Each extreme also includes a localDate field (e.g. 2026-03-09) in the station's local timezone for easy day grouping. Use the timezone field in the station object to convert UTC times to local display times.
Tide Predictions
GET /api/station/:id/tides

Returns tide predictions (extremes + continuous time series), sun/moon conditions, and daily forecasts for a given station.

Parameters
ParamTypeDefaultDescription
:idstringStation ID (path parameter, e.g. 9414290)
datumstringLATVertical datum: LAT, MLLW, or MSL
daysinteger9Number of days to predict (1–37)
startstringtodayStart date in YYYY-MM-DD format
Example Request
curl -H "X-API-Key: tc_your_key_here" \
  "https://tidecheck.com/api/station/9414290/tides?datum=MLLW&days=7"
Response Structure
{
  "station": {
    "id": "9414290",
    "name": "San Francisco",
    "region": "California",
    "country": "United States",
    "lat": 37.8063,
    "lng": -122.4659,
    "type": "reference",
    "timezone": "America/Los_Angeles"
  },
  "datum": "MLLW",
  "extremes": [
    { "time": "2026-03-09T03:24:00.000Z", "localDate": "2026-03-08", "height": 1.842, "type": "high" },
    { "time": "2026-03-09T09:12:00.000Z", "localDate": "2026-03-09", "height": 0.156, "type": "low" }
  ],
  "timeSeries": [
    { "time": "2026-03-09T00:00:00.000Z", "height": 1.234 },
    { "time": "2026-03-09T00:15:00.000Z", "height": 1.301 }
  ],
  "conditions": {
    "sunrise": "2026-03-09T14:29:00.000Z",
    "sunset": "2026-03-10T02:12:00.000Z",
    "moonPhase": "Waxing Gibbous",
    "moonPhaseValue": 0.352,
    "moonIllumination": 68,
    "tidalStrength": "Moderate",
    "tidalStrengthValue": 0.55,
    "springNeap": "Neap",
    "moonCalendar": [
      { "type": "full", "name": "Full Moon", "date": "2026-03-12T..." }
    ]
  },
  "dailyConditions": [
    {
      "date": "2026-03-09",
      "sunrise": "2026-03-09T14:29:00.000Z",
      "sunset": "2026-03-10T02:12:00.000Z",
      "moonPhase": "Waxing Gibbous",
      "moonPhaseValue": 0.352,
      "moonIllumination": 68,
      "solunarRating": 3,
      "solunarLabel": "Good",
      "springNeap": "Neap"
    }
  ]
}
Notes:
  • station.type — either reference (direct harmonic prediction) or subordinate (corrections applied to a reference station)
  • station.refStation — (subordinate only) name of the reference station used for corrections
  • extremeshigh and low tide events with heights in meters. Each includes a localDate (YYYY-MM-DD in station timezone) for easy day grouping.
  • timeSeries — continuous water level at 15-minute intervals (useful for charts)
  • dailyConditions — per-day sun, moon, fishing, and tidal info for each day in the range
  • Heights are in meters relative to the requested datum
Nearest Stations
GET /api/stations/nearest

Find the 5 nearest stations to a latitude/longitude coordinate. Includes distance in kilometers.

ParamTypeDescription
latnumberLatitude (e.g. 37.8063)
lngnumberLongitude (e.g. -122.466)
curl -H "X-API-Key: tc_your_key_here" \
  "https://tidecheck.com/api/stations/nearest?lat=37.8063&lng=-122.466"
Response
[
  {
    "id": "9414290",
    "slug": "san-francisco",
    "name": "San Francisco",
    "region": "California",
    "country": "United States",
    "lat": 37.8063,
    "lng": -122.4659,
    "label": "San Francisco, California, United States",
    "distanceKm": 0
  }
]
Geocoding
GET /api/geocode

Geocode a place name to coordinates. Useful for finding the nearest station to a location by name.

ParamTypeDescription
qstringPlace name (e.g. Bali, Sydney Opera House)
curl -H "X-API-Key: tc_your_key_here" \
  "https://tidecheck.com/api/geocode?q=Bali"
Response
[
  {
    "name": "Bali, Kabupaten Bangli, Bali, Indonesia",
    "lat": -8.4095,
    "lng": 115.1889,
    "type": "administrative"
  }
]
Quick Start: Get Tides for Any Location

Combine endpoints to get tide predictions for any place name in 2 API calls:

# Step 1: Find the nearest station to a location
curl -H "X-API-Key: tc_your_key_here" \
  "https://tidecheck.com/api/stations/nearest?lat=-8.41&lng=115.19"

# Step 2: Get tide predictions using the station ID
curl -H "X-API-Key: tc_your_key_here" \
  "https://tidecheck.com/api/station/STATION_ID/tides?days=7"
JavaScript Example
const API_KEY = "tc_your_key_here";
const headers = { "X-API-Key": API_KEY };

// Find nearest station
const nearby = await fetch(
  "https://tidecheck.com/api/stations/nearest?lat=37.81&lng=-122.47",
  { headers }
).then(r => r.json());

const stationId = nearby[0].id;

// Get 7-day tide predictions
const tides = await fetch(
  `https://tidecheck.com/api/station/${stationId}/tides?days=7`,
  { headers }
).then(r => r.json());

// Next high tide
const nextHigh = tides.extremes.find(e =>
  e.type === "high" && new Date(e.time) > new Date()
);
console.log(`Next high: ${nextHigh.height}m at ${nextHigh.time}`);
Python Example
import requests

API_KEY = "tc_your_key_here"
headers = {"X-API-Key": API_KEY}

# Search for a station
stations = requests.get(
    "https://tidecheck.com/api/stations/search",
    params={"q": "san francisco"},
    headers=headers
).json()

# Get tide predictions
tides = requests.get(
    f"https://tidecheck.com/api/station/{stations[0]['id']}/tides",
    params={"datum": "MLLW", "days": 7},
    headers=headers
).json()

for extreme in tides["extremes"][:5]:
    kind = "High" if extreme["type"] == "high" else "Low"
    print(f"{kind}: {extreme['height']}m at {extreme['time']}")
Errors & Rate Limits
HTTP Status Codes
CodeMeaning
200Success
400Bad request (missing or invalid parameters)
401Missing or invalid API key
404Station not found
429Rate limit exceeded
Rate Limits by Plan
PlanDaily LimitMonthly Limit
Free50
Starter1,00025,000
Pro10,000250,000
Business50,0001,000,000
Response Headers
HeaderDescription
X-RateLimit-LimitYour daily request limit
X-RateLimit-RemainingRequests remaining today
X-RateLimit-ResetUTC timestamp when the limit resets (midnight UTC)
X-TideCheck-TierYour current subscription tier

Need higher limits? Contact us or upgrade your plan.

Datum Reference

Heights are returned relative to the requested vertical datum. Choose based on your use case:

DatumDescriptionBest For
LATLowest Astronomical Tide (IHO standard)International use, chart depths
MLLWMean Lower Low Water (US standard)US tidal applications, NOAA compatibility
MSLMean Sea LevelRelative water level comparisons
Get Free API Key Back to Overview

Covering 6,670+ stations across 178 countries