Tides
https://data.api.xweather.com/tides/
The tides endpoint provides access to the predicted tidal information for US locations.
Max Limits:
plimit: 75
Requests
Every request to the endpoint must include one of the supported actions in the url.
https://data.api.xweather.com/tides/{action}?client_id={client_id}&client_secret={client_secret}&{params}
Supported Actions
The following actions are supported with the /tides endpoint:
Action | Description |
---|---|
:id | Type: stringTypically used for passing a geographical location name or identifier such as city name, lat/long, or even US and Canadian postal codes. Learn more. |
closest | Type: stringBased on a location search, the results will be returned in order from closest to farthest. Learn more. |
within | Type: stringUses a circle or polygon, define an area to search for results. Learn more. |
search | Type: stringA generalized action that is determined with the endpoints query parameters. Learn more. |
Response
The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.
Properties
id (string)
loc (object)
The location of the record.
loc.long (number)
The place or nearest place to the record.
loc.lat (number)
The latitude coordinate of the record.
place (object)
Object containing information about the place or nearest place to the record.
place.name (string)
The place or nearest place to the record.
place.state (string)
The state abbreviation in which the response is located. This may be null
or an empty string depending on the country.
place.country (string)
The 2 letter ISO-3166 country abbreviation in which the response is located.
periods (array)
Array of objects that contain the tidal information, where each object is for a specific tidal period. (high, low etc).
periods.#.timestamp (number)
UNIX timestamp for the tidal information.
periods.#.dateTimeISO (string)
The ISO-8601 date of the tidal information.
periods.#.type (string)
The tide type:
- h = high
- l (lower case L) = low
periods.#.heightFT (number)
The height of the tide in feet.
periods.#.heightM (number)
The height of the tide in meters.
profile (object)
Object containing information about the location or event.
profile.tz (string)
Timezone name of the location, such as America/New_York
.
relativeTo (object)
Object containing information about the location used for the request compared to the record"s actual location.
relativeTo.lat (number)
Latitude coordinate of the location used for the request. This may be different than the record"s loc.lat value if there was no record exactly at the request location.
relativeTo.long (number)
Longitude coordinate of the location used for the request. This may be different than the record"s loc.long value if there was no record exactly at the request location.
relativeTo.bearing (number)
Bearing in degrees of the record"s location relative to the location used for the request.
relativeTo.bearingENG (string)
Cardinal direction of the record relative to the location used for the request.
relativeTo.distanceKM (number)
Distance, in kilometers, from the requested location to the record"s actual location.
relativeTo.distanceMI (number)
Distance, in miles, from the requested location to the record"s actual location.
[
{
"id": "8723165",
"loc": {
"long": -80.185,
"lat": 25.7783
},
"place": {
"name": "miami miamarina, biscayne bay",
"state": "fl",
"country": "us"
},
"periods": [
{
"timestamp": 1702632060,
"dateTimeISO": "2023-12-15T04:21:00-05:00",
"type": "l",
"heightFT": -0.205,
"heightM": -0.0625
},
{
"timestamp": 1702655160,
"dateTimeISO": "2023-12-15T10:46:00-05:00",
"type": "h",
"heightFT": 2.554,
"heightM": 0.7785
},
{
"timestamp": 1702677120,
"dateTimeISO": "2023-12-15T16:52:00-05:00",
"type": "l",
"heightFT": 0.203,
"heightM": 0.0619
},
{
"timestamp": 1702698780,
"dateTimeISO": "2023-12-15T22:53:00-05:00",
"type": "h",
"heightFT": 2.352,
"heightM": 0.7169
}
],
"profile": {
"tz": "America/New_York"
},
"relativeTo": {
"lat": 25.77427,
"long": -80.19366,
"bearing": 63,
"bearingENG": "ENE",
"distanceKM": 0.976,
"distanceMI": 0.606
}
}
]