(GET) Sensor Data | Sofar API
Query Parameters
| Name | Type | Description |
|---|---|---|
spotterId |
string | The Spotter ID of the device you wish to retrieve information from. |
startDate |
string | Default: 24 hours ago. ISO 8601-formatted timestamp indicating the start date for data inclusion. e.g., 2021-01-01T07:00:00Z |
endDate |
string | Default: now(). ISO 8601-formatted timestamp indicating the end date for data inclusion. e.g., 2021-01-02T07:00:00Z |
includeSoundPressureReadings |
boolean | Default: false. Set true to return sound pressure level (SPL) readings from Spotters with hydrophones transmitting via cellular*. |
*Spotters with hydrophones transmitting via satellite will only return aggregated SPL samples.
Response Description
The response body consists of a flat (uncategorized) data stream of transmissions by the Spotter’s Smart Mooring sensors during the specified time window, ordered by timestamp. These timestamps, while ordered, are not necessarily unique. It is possible for two or more sensors to send different values at the same time, resulting in identical timestamps.
If the Spotter is configured to send multiple samples in a single transmission (e.g., to save on data telemetry costs), multiple samples in the response will have the same location data. To review a Spotter's (read-only) subsurface data transmission settings, open the Spotter Dashboard, find its Spotter card in the Map View, click the Gear icon to open the Settings tab, and scroll down to the Subsurface data transmission section.
For more information about Smart Mooring sensors and data, please refer to the Smart Mooring Sensors guide.
| Name | Type | Description |
|---|---|---|
latitude |
number | The Spotter's latitude when the report was encoded and transmitted. |
longitude |
number | The Spotter's longitude when the report was encoded and transmitted. |
timestamp |
string | ISO 8601-formatted timestamp indicating the end of a sample collection period. |
sensorPosition |
integer | The sensor's physical position in the Smart Mooring relative to the Spotter, with 1 being closest to the Spotter. |
units |
string | The units of measurement. e.g., °C |
value |
object, string or number | The measured value. |
unit_type |
string | A contextual description of what is being measured. e.g., temperature |
data_type_name |
string | The type of information being sent by a sensor, as ingested by the API. |
configuration_checksum |
string | A unique identifier for the Smart Mooring configuration. Can be cross-referenced with the configurations returned by the Configuration History endpoint. |
Examples
Example Request
curl "https://api.sofarocean.com/api/sensor-data?spotterId=SPOT-0222&startDate=2021-12-01T00:00:00Z&endDate=2021-12-02T00:00:00Z" -H 'token: YOUR_API_TOKEN'
Example Responses
Sensor data:
{ "status": "success", "spotterId": "SPOT-31082C", "data": [ { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "hex", "value": "84011a69b1f40f821901c8186ca2051901c811186c", "unit_type": "binary", "data_type_name": "binary_hex_encoded", "configuration_checksum": "0x03696310" }, { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "unitless", "value": 0, "unit_type": "spectral_entropy", "data_type_name": "bm_borealis_entropy_8bits", "configuration_checksum": "0x03696310" }, { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "dB re µPa²", "value": 0.75, "unit_type": "interquartile_range", "data_type_name": "bm_borealis_max_iqr_8bits", "configuration_checksum": "0x03696310" }, { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "unitless", "value": 16, "unit_type": "index", "data_type_name": "bm_borealis_max_iqr_band_number_6bits", "configuration_checksum": "0x03696310" }, { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "dB re µPa²", "value": {"mean": [94.892,94.142,93.392],"frequency": [40,50,63],"band_number": [16,17,18],"25th_percentile": [93.392,92.642,91.892],"50th_percentile": [94.142,93.392,91.892],"75th_percentile": [94.892,94.142,92.642]}, "unit_type": "borealis_sound_pressure_level_stats", "data_type_name": "bm_borealis_spl_band_stats", "configuration_checksum": "0x03696310" }, { "latitude": 37.78845, "longitude": -122.38695, "timestamp": "2026-03-11T23:14:01.000Z", "sensorPosition": 1, "units": "dB re µPa²", "value": 102.392, "unit_type": "sound_pressure_level", "data_type_name": "bm_borealis_spl_broadband_8bits", "configuration_checksum": "0x03696310" } ] }
No sensor data:
{ "status": "success", "spotterId": "SPOT-30973C", "data": [] }
Incorrect token:
{ "message": "Authentication Failed" }
Missing token:
{ "message": "No token provided" }