{
  "openapi": "3.1.0",
  "info": {
    "title": "Tides API",
    "version": "1.0.0",
    "description": "NOAA tide predictions for 3,499 US stations with nearest-station lookup, straight from CO-OPS.\n\nTide predictions for the entire US coastline, straight from NOAA. A searchable directory of all 3,499 NOAA CO-OPS tide prediction stations (1,256 harmonic reference stations + subordinates) across every US coastal state and territory, with nearest-station lookup by coordinates (lat/lng → the Santa Monica Municipal Pier station, 0.9 km away). Predictions are fetched live from NOAA's official CO-OPS engine and edge-cached, so they are always exactly what NOAA publishes: high/low tide times and heights (interval=hilo) for any date up to 7 days per call, or continuous hourly/6-minute series on reference stations, in feet or meters, against your choice of datum (MLLW default, MSL, NAVD...), in local station time. Subordinate stations are correctly limited to high/low mode with a pointer to their reference station. Bonus: latest observed water temperature from stations with sensors (75.2°F at The Battery right now). Surf and fishing apps, sailing tools, coastal photography planners, beach-safety products — the same data WorldTides and Tide-Forecast sell, from the primary source. US + territories only (NOAA's coverage).",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/tides.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/tides"
  },
  "servers": [
    {
      "url": "https://api-tides.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Tides API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "sources": [
                    {
                      "slug": "noaa-coops",
                      "name": "NOAA CO-OPS tide prediction stations",
                      "publisher": "NOAA National Ocean Service",
                      "licence": "US government work (public domain)",
                      "source_url": "https://tidesandcurrents.noaa.gov/",
                      "file_url": "https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations.json?type=tidepredictions",
                      "cadence": "stations change rarely; predictions fetched live",
                      "record_count": 3499,
                      "retrieved_at": "2026-09-06"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/tides/nearest": {
      "get": {
        "operationId": "nearestStations",
        "summary": "Nearest Stations",
        "description": "Nearest Stations endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/nearest-stations"
        },
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "34.01"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "5"
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "-118.49"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "query": {
                    "lat": 34.01,
                    "lng": -118.49
                  },
                  "stations": [
                    {
                      "id": "9410840",
                      "name": "Santa Monica, Municipal Pier",
                      "state": "CA",
                      "lat": 34.0083,
                      "lng": -118.5,
                      "type": "reference",
                      "reference_id": null,
                      "tz_offset": -8,
                      "distance_km": 0.9
                    },
                    {
                      "id": "9410777",
                      "name": "El Segundo, Santa Monica Bay",
                      "state": "CA",
                      "lat": 33.9083,
                      "lng": -118.433,
                      "type": "subordinate",
                      "reference_id": "9410660",
                      "tz_offset": -8,
                      "distance_km": 12.5
                    },
                    {
                      "id": "9410738",
                      "name": "King Harbor, Santa Monica Bay",
                      "state": "CA",
                      "lat": 33.8467,
                      "lng": -118.398,
                      "type": "subordinate",
                      "reference_id": "9410660",
                      "tz_offset": -8,
                      "distance_km": 20
                    },
                    {
                      "id": "TWC0439",
                      "name": "Los Angeles Harbor, Mormon Island",
                      "state": null,
                      "lat": 33.75,
                      "lng": -118.26667,
                      "type": "subordinate",
                      "reference_id": "9410660",
                      "tz_offset": -8,
                      "distance_km": 35.5
                    },
                    {
                      "id": "9410686",
                      "name": "Long Beach, Inner Harbor",
                      "state": "CA",
                      "lat": 33.7717,
                      "lng": -118.21,
                      "type": "subordinate",
                      "reference_id": "9410660",
                      "tz_offset": -8,
                      "distance_km": 37
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/tides/stations": {
      "get": {
        "operationId": "searchStations",
        "summary": "Search Stations",
        "description": "Search Stations endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/search-stations"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "battery"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "page": 1,
                  "limit": 25,
                  "total": 2,
                  "total_pages": 1,
                  "stations": [
                    {
                      "id": "8668092",
                      "name": "Battery Creek, 4 mi. above entrance",
                      "state": "SC",
                      "lat": 32.4133,
                      "lng": -80.7,
                      "type": "subordinate",
                      "reference_id": "8670870",
                      "tz_offset": -5
                    },
                    {
                      "id": "8518750",
                      "name": "NEW YORK (The Battery)",
                      "state": "NY",
                      "lat": 40.70055,
                      "lng": -74.01417,
                      "type": "reference",
                      "reference_id": null,
                      "tz_offset": -5
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/tides/stations/{id}": {
      "get": {
        "operationId": "stationDetail",
        "summary": "Station Detail",
        "description": "Station Detail endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/station-detail"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "9447130"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "station": {
                    "id": "9447130",
                    "name": "SEATTLE (Madison St.), Elliott Bay",
                    "state": "WA",
                    "lat": 47.60264,
                    "lng": -122.33931,
                    "type": "reference",
                    "reference_id": null,
                    "tz_offset": -8
                  },
                  "tides": {
                    "date": "2026-09-13",
                    "days": 2,
                    "units": "feet",
                    "datum": "MLLW",
                    "predictions": [
                      {
                        "time": "2026-09-13 00:52",
                        "height": 1.25,
                        "type": "low"
                      },
                      {
                        "time": "2026-09-13 07:05",
                        "height": 10.336,
                        "type": "high"
                      },
                      {
                        "time": "2026-09-13 12:56",
                        "height": 2.977,
                        "type": "low"
                      },
                      {
                        "time": "2026-09-13 18:56",
                        "height": 11.304,
                        "type": "high"
                      },
                      {
                        "time": "2026-09-14 01:28",
                        "height": 0.584,
                        "type": "low"
                      },
                      {
                        "time": "2026-09-14 07:58",
                        "height": 10.225,
                        "type": "high"
                      },
                      {
                        "time": "2026-09-14 13:38",
                        "height": 4.341,
                        "type": "low"
                      },
                      {
                        "time": "2026-09-14 19:25",
                        "height": 10.918,
                        "type": "high"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/tides/predictions": {
      "get": {
        "operationId": "tidePredictions",
        "summary": "Tide Predictions",
        "description": "Tide Predictions endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/tide-predictions"
        },
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datum",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "MLLW"
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "hilo"
          },
          {
            "name": "station",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "8518750"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "english"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "station": {
                    "id": "8518750",
                    "name": "NEW YORK (The Battery)",
                    "state": "NY",
                    "lat": 40.70055,
                    "lng": -74.01417,
                    "type": "reference",
                    "reference_id": null,
                    "tz_offset": -5
                  },
                  "date": "2026-09-13",
                  "days": 2,
                  "interval": "hilo",
                  "units": "feet",
                  "datum": "MLLW",
                  "timezone": "local station time (lst_ldt)",
                  "predictions": [
                    {
                      "time": "2026-09-13 04:23",
                      "height": -0.096,
                      "type": "low"
                    },
                    {
                      "time": "2026-09-13 10:25",
                      "height": 5.652,
                      "type": "high"
                    },
                    {
                      "time": "2026-09-13 16:46",
                      "height": 0.206,
                      "type": "low"
                    },
                    {
                      "time": "2026-09-13 22:41",
                      "height": 5.115,
                      "type": "high"
                    },
                    {
                      "time": "2026-09-14 05:01",
                      "height": 0.201,
                      "type": "low"
                    },
                    {
                      "time": "2026-09-14 11:09",
                      "height": 5.474,
                      "type": "high"
                    },
                    {
                      "time": "2026-09-14 17:29",
                      "height": 0.462,
                      "type": "low"
                    },
                    {
                      "time": "2026-09-14 23:28",
                      "height": 4.756,
                      "type": "high"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/tides/water": {
      "get": {
        "operationId": "waterTemperature",
        "summary": "Water Temperature",
        "description": "Water Temperature endpoint of the Tides API. Costs 2 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/tides/water-temperature"
        },
        "parameters": [
          {
            "name": "station",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "8518750"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "station": "8518750",
                  "station_name": "The Battery",
                  "time": "2026-09-13 03:12",
                  "water_temperature": 74.3,
                  "units": "F"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 2 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}