API
Spitcast has an open API. This means anyone can write their own program to present Spitcast Forecast data in new and different ways.
Drop me a note if you plan to use the Spitcast API.
Examples
GreenRoom iPhone App
Chuck Mortimore from theOddBit.com developed GreenRoom, which gives you quick access to Spitcast surf forecasts on your iPhone. When you're on the move and you're wondering where to surf, GreenRoom gives you the info you need. We at Spitcast are thrilled by how Chuck has leveraged the Spitcast API to create a very useful iPhone App. Learn more at theOddBit.com.
Endless Bummer NY Widget
Todd Stewart's blog Endless Bummer chronicles the life of a surfer living without surf in New York City. Todd's Scoreboard Widget displays the current surf report at top California surf spots, and as joke displays the surf in Manhattan as always Flat. You can read his blog at endlessbummerny.blogspot.com.
The Fine Print
Public distribution of Spitcast API content must acknowledge Spitcast as the content source, and provide a link to Spitcast.com.
The Spitcast API is available for non-commercial use. Commercial use is possible by prior arrangement.
The Spitcast API is available for low request volume use. High volume use is possible by prior arrangement.
The Spitcast API is experimental and is currently offered on an ad hoc basis with no guarantee of uptime or availability of continued service. We reserve the right to disable access to external applications at any time.
If you have any questions, please contact me.
Methods
Version 3 is the most recent release of the Spitcast API. It is Plain Old XML over HTTP (POX/HTTP). The following methods are currently available, and more are on the way:
County.GetSpotSummaries()
http://www.spitcast.com/3/api_county.php?type=spots&lval=Santa%20Cruz&dcat=day
County.GetTides()
http://www.spitcast.com/3/api_county.php?type=tide&lval=Santa%20Cruz&dcat=day
County.GetWaterTemp()
http://www.spitcast.com/3/api_county.php?type=wtemp&lval=Santa%20Cruz
Spot.GetForecast()
http://www.spitcast.com/3/api.php?lval=2&dcat=day
Parameters
var type
For 'County' methods, the 'type' designates what specific forecast data you are requesting for the specified region. Currently the options are 'spots' which returns a list of spots in that region along with summary forecast data, 'tide' which returns the hourly tides, and 'wtemp' which returns the latest recorded water temperature. 'Type' is not currently used with 'Spot' methods.
var lval
This is the location value. For 'County', the location value is the name of the county, such 'Santa Cruz' or 'Orange County'. For 'Spot', the location value is the spot's id, such as '2' for Steamer Lane. You can find out each spot's id by calling the County.GetSpotSummaries() method.
var dcat
This is the date category such as 'day', 'weekend' or 'week'. This defines the duration of the resulting data set.
var dval
For use when dcat = 'day', the date value allows you to pick a specific date in the coming week. The syntax is 'YYYYMMDD' or for example '20080906'.
