I'm trying to write some code that, given a latitude and longitude, will report which ocean (if any) this point is in.
Is there a public resource available that defines the borders of the oceans as a set of lat/long points that I can download?
ESRI's Ocean Basemap might be useful for your task:
Ocean polygons available here:
Different resolutions. You can open the shapefiles in QGis and save as any format you want [assuming you're writing a browser based app].