The API is a fairly straightforward http interface which returns JSON-formatted data.
To get an API key you can sign up on TideSpy here, or you can email us so we can set you up with an API account - api@tidespy.com
Note: These APIs won't get you a full list of places and we don't generally give this information out since it's rather a lot of work to accumulate.
Paste any of the URIs below into a browser (with your key) to see the response. Most responses are self-explanatory. Note that dates in URIs on this page will go out of date, so you will need to adjust them before trying them.
There's information about the place and tide API here: https://tidespy.com/client/RawApi.php but it's fairly brief.
A JSON formatting add-on for your web browser is a worthwhile addition.
All APIs and pages on tidespy.com should be accessed using SSL - use https, not http.
Tides are available for certain places, and cannot be computed for some arbitrary lat-long position. The next best thing is to find the places within a given radius of a position, and there is an API for this. Supply lat and long in decimal degrees, negative for South or West, radius in Km, max 100 Km, something like the following:
https://tidespy.com/api/place?lat=-43.5&lng=172.6&radius=10&key=...
For information about a tide place, call the API with a place number. In the URI, 'pn' is the place number - you can manually find an online list of these by searching http://tidespy.com/alphaPlaceIndex.php and get the place number from the URL, or use one of the other APIs to get a place number.
https://tidespy.com/api/place?pn=1341&key=...
Use the Tide turns API to get tide high and low info. Unit is m or f, date is yyyymmdd, and "days" is how many days of data are to be returned:
https://tidespy.com/api/tideturns?pn=1234&unit=m&start=20140505&days=2&key=...
There is a gotcha to look out for - finding a place based purely on location can be very misleading; tides can vary greatly over small distances. A good solution is to offer users a list of nearby places (even if there's only one) and let them choose one, so they are clear about which tide place they are looking at. A disclaimer is also a good idea - there are safety issues in relation to tide data.
Tides should also include a provider's attribution and copyright notice for some countries - in particular Australia. Please ask for details if you are showing Australian tides [As of 2022, the Australian Bureau of Meteorology have clamped down on cost-free knowledge about what the sea is doing. We no longer have tide data for Australian-supplied places].
Access is free until your traffic becomes heavier (consistently > 360 requests / hour) when we reserve the right to charge a reasonable (read small) amount.