This API returns the times and heights of high and low tides
pn is the number of the place for which tides are requested.
unit is the required height units, and must be m, f, or ft.
start is the starting date in the form YYYYMMDD, with leading zeros where necessary. Tides are supplied starting at 00:00 on this date, local time for the place.
days is the number of consecutive days of data is to be returned.
A typical request URL might look like this:
https://tidespy.com/api/tideturns?pn=1341&unit=m&start=20140509&days=2&key=...
https://tidespy.com/api/tideturns?pn=1341&unit=m&start=20150505&days=2&key=...
Tide heights response:
{
ReqPlace: "1341", // The number of the place requested.
Ok: true, // If the request was successful.
ReqUnit: "m", // Height units requested.
ReqStart: "20110509", // yyyymmdd starting date requested.
ReqDays: "2", // Number of days requested.
Name: "South Fork", // Name of the place.
TimeZone: "EDT", // Time zone of the place.
PlaceUnit: "ft", // The 'normal' height units used for this place.
Turns: [ // An array of tide turn structures.
{
HorL: "L", // Whether the tide turn is a high (H) or a low (L).
Date: "20110505", // The date (yyyymmdd) of this turn.
Minute: 314, // The minute of this turn, 0-1439.
Height: "0.17", // The height above datum in the requested units.
DLS: true // Whether daylight saving time offset has been applied.
},
{ HorL: "H", Date: "20110505", Minute: 657, Height: "1.98", DLS: true },
{ HorL: "L", Date: "20110505", Minute: 1030, Height: "0.14", DLS: true },
{ HorL: "H", Date: "20110505", Minute: 1394, Height: "2.36", DLS: true },
{ HorL: "L", Date: "20110506", Minute: 352, Height: "0.20", DLS: true },
{ HorL: "H", Date: "20110506", Minute: 697, Height: "1.95", DLS: true },
{ HorL: "L", Date: "20110506", Minute: 1069, Height: "0.17", DLS: true }
{ HorL: "H" Date: "20110506" Minute: 1435 Height: "2.36" DLS: true }
]
}
A typical response is shown above on the right. Note that the Turns elements may not be in time sequence, due to the way they are computed. Values are as follows:
ReqPlace echoes the number of the place requested.
Ok is true or false. If false, a Message element will be present which describes the problem.
ReqUnit echoes the requested height units.
ReqStart echoes the requested date.
ReqDays echoes the requested number of days.
Name is the name of the requested place, as a confirmation that the number is correct.
TimeZone The name of the standard time zone of the place.
PlaceUnit (m or ft) is the "normal" height units for the place, or in other words, ft for the USA and m for the rest of the world.
Turns is an array of Tide Turn objects, each with the following elements:
HorL is L for a low tide or H for a high tide.
Date is the date (YYYYMMDD) on which this turn occurs, in the local time of the place.
Minute is the minute of the day this turn occurs, 0-1439.
Height is the height above datum in the requested unit (ReqUnit).
DLS is true if a daylight saving time offset has been applied to this time.