Divesites.com API v1

Divesites.com has an open API to access the content hosted on this site. We just ask that you mention Divesites.com in your app or website.

Access the api at http://api.divesites.com. With no parameters passed, the API will determine the location using Geo IP location and return sites in a radius from that point.

The API supports both POST and GET methods and also accepts JSON payloads via AJAX requests. The API returns everything in minified JSON. Check the "result" on each request (if true, request was successful).

Examples

The following URL will return dive sites in a 25nm radius from the lat and lng given (Seattle, WA)
http://api.divesites.com/?mode=sites&lat=47.6031537682643&lng=-122.336164712906&dist=25

The following URL will return a dive site detail
http://api.divesites.com/?mode=detail&siteid=17559

Supported Modes

Modes are functions/methods of the API. The default mode is 'sites', all currently supported modes along with parameters are listed below.

sites

The default mode, returns dive sites in a radius from a given location. If lat and lng is not passed, the api will use Geo IP location to set the location.

search

Simple dive site name search containing given string (i.e. "dav" will return "les davis", "davey crocker", etc) will return results ordered by distance from lat and lng (point of orgin).

detail

Returns a site detail