API Reference


Waterbody requests:

# Waterbody info

GET: /waterbody/{wid}/format

GET: /waterbody/{wid}/info/format

POST: /waterbody/info

Get the information of a waterbody.

Parameters:

namedescription
widThe waterbody ID.
formatOptional. The format to return data. Default is json, but csv is also supported.

Return:

nametypedescription
widnumberThe waterbody ID.
namestringWaterbody name.
waterboardregionnumberThe water board region.
typestringWaterbody type classification.
usetypestringUse type/suitability classification.
watertypestringSecondary waterbody type classification.

If no waterbody is found for the given waterbody ID, response will be of 404 status with not found message.

Example:

GET: https://fhab-api.sfei.org/waterbody/53/info

Get the information of the waterbody with ID=53.

Results:

{
  "wid": 53,
  "name": "Echo Lake, Upper and Lower", 
  "waterboardregion": 6, 
  "type": "Lake Perennial", 
  "usetype": "Limited", 
  "watertype": "Lake"
}

# Waterbody name

GET: /waterbody/{wid}/name/format

POST: /waterbody/name

Rerouted to waterbody info request. Deprecated but left in for backwards compatibility.

# Waterbody geometry

GET: /waterbody/{wid}/{format}

POST: /waterbody/{format}

Get the geometry of a waterbody. For it to be recognized as a geometry request, the format must be one of: geom, geometry, geojson, or kml.

Parameters:

namedescription
widThe waterbody ID.
formatThe format of the geometry. Must be one of: geom, geometry, geojson, or kml. All but kml returns as GeoJSON.

Return:

Depending on the request format, returns GeoJSON formatted data or a KML file. If in GeoJSON format, of which some, but not necessarily all, of the main properties are listed below.

nametypedescription
typestringThe geometry type.
crsobjectThe coordinate reference system.
crs.typestringThe CRS object type.
crs.propertiesobjectThe CRS properties
crs.properties.namestringThe CRS name or EPSG identifier.
coordinatesarrayAn array of coordinates, at the inner-most level consisting of length-two arrays of coordinate pairs. The dimensionality depends on the geometry type. For multipolygons, the value will be in 4D for each feature, polygon, linear-ring, and coordinates.

If no waterbody is found for the given waterbody ID, response will be of 404 status with not found message.

Example:

GET: https://fhab-api.sfei.org/waterbody/53/geojson

Get the geometry (as GeoJSON) for the waterbody with ID=53.

Results:

{
  "type": "MultiPolygon", 
  "crs": {
    "type": "name",
    "properties": {
      "name": "EPSG:32611"
    }
  },
  "coordinates": [[[
    [232502.646463832, 4304753.87],
    [232788.41678906, 4304753.76],
    [232802.646967078, 4304753.82],
    [232807.390391706, 4304753.84],
    /* ... */
  ]]]
}

Waterbody statistics requests:

# Single-date statistics on waterbody

GET: /{product}/{composite}/{wid}/{date}/{valuetype}/{stats}/{format}

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a date-span statistics request, raster request or pixel-value request.

Get the single-date, zonal waterbody statistics for the given product, composite, waterbody, and date.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
widThe waterbody ID.
dateThe date for which to grab statistics. Must be in yyyymmdd or yyyy-mm-dd format.
valuetypeThe units for the returned values. See value type definition.
statsOptional value to limit the reported statistics. See statistics definition. Multiple values may be supplied separated by commas. The default is to return all statistics.
formatOptional. The format to return data. Default is json, but csv is also supported.

Return:

nametypedescription
datestringThe requested date in yyyy-mm-dd format.
pixel_countnumberThe observed pixel count for the given waterbody at the requested date. If mosaic data were requested, this represented the combined pixels observed between all platforms with available imagery.
pixel_countsobjectIf mosaic data were requested, an object representing the platform name (as key) and pixel counts specific to the platform (as value) for the given waterbody at the requested date.
minnumberThe observed minimum for the given waterbody at the requested date.
maxnumberThe observed maximum for the given waterbody at the requested date.
meannumberThe observed mean for the given waterbody at the requested date.
mediannumberThe observed median for the given waterbody at the requested date.
perc90numberThe observed 90th percentile for the given waterbody at the requested date.
Example:

GET: https://fhab-api.sfei.org/chlorophyll/1daymax/33/20210901/chl

Get the single-date statistics for September 1st, 2021 on Clear Lake (wid=33). Values are obtained from the chlorophyll products and 1-day pixel maximum composites and reported in standard chlorophyll units (μg/L).

Results:

{
  "date": "2021-09-01",
  "pixel_count": 1492,
  "min": 16.65,
  "max": 134.6,
  "mean": 95.25,
  "median": 98.49,
  "perc90": 134.6
}

# Date span statistics on waterbody

GET: /{product}/{composite}/{wid}/{datefrom}/{datetill}/{valuetype}/{stats}/format

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a single-date statistics request, raster request or pixel-value request.

Get the multi-date, zonal waterbody statistics for the given product, composite, waterbody, and date span.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.

Note that for mosaic-based requests, the date-span is limited to ten days, due to additional the processing required as values are dynamically analyzed from the raster data.
widThe waterbody ID.
datefromThe start date, inclusive, from which to grab statistics. Must be in yyyymmdd or yyyy-mm-dd format.
datetillThe end date, inclusive, up to which to grab statistics. Must be in yyyymmdd or yyyy-mm-dd format.
valuetypeThe units for the returned values. See value type definition.
statsOptional value to limit the reported statistics. See statistics definition. Multiple values may be supplied separated by commas. The default is to return all statistics.
formatOptional. The format to return data. Default is json, but csv is also supported.

Return:

nametypedescription
[]object[]Array of results, chronologically ordered, with each datum representing the statistics for a single date.
[].datestringThe dates for this datum in yyyy-mm-dd format.
[].pixel_countnumberThe pixel counts for the given waterbody at the date of this datum. If mosaic data were requested, this represented the combined pixels observed between all platforms with available imagery.
[].pixel_countsobjectIf mosaic data were requested, an object representing the platform name (as key) and pixel counts specific to the platform (as value) for the given waterbody at the date of this datum.
[].minnumberThe minimum statistics for the given waterbody at the date of this datum.
[].maxnumberThe maximum statistics for the given waterbody at the date of this datum.
[].meannumberThe mean statistics for the given waterbody at the date of this datum.
[].mediannumberThe median statistics for the given waterbody at the date of this datum.
[].perc90numberThe 90th percentile statistics for the given waterbody at the date of this datum.
Example:

GET: https://fhab-api.sfei.org/cyano/10daymax/33/20210901/20210905/ci_modified

Get the statistics from September 1st to September 5th, 2021 on Clear Lake (wid=33). Values are obtained from the cyano products and 10-day pixel maximum composites and reported in modified cyano index.

Results:

[
  {
    "date": "2021-09-01",
    "pixel_count": 1767,
    "min": 0.9972436372799999,
    "max": 870.9152991480801,
    "mean": 136.66402495666,
    "median": 148.48021460236,
    "perc90": 448.60144272938
  },
  {
    "date": "2021-09-02",
    "pixel_count": 1770,
    "min": 0.9972436372799999,
    "max": 895.3250088022401,
    "mean": 152.64176591190002,
    "median": 148.48021460236,
    "perc90": 448.60144272938
  },
  {
    "date": "2021-09-03",
    "pixel_count": 1771,
    "min": 0.9972436372799999,
    "max": 895.3250088022401,
    "mean": 170.48752109134,
    "median": 152.64176591190002,
    "perc90": 461.17470049708
  },
  {
    "date": "2021-09-04",
    "pixel_count": 1767,
    "min": 0.9972436372799999,
    "max": 895.3250088022401,
    "mean": 170.48752109134,
    "median": 152.64176591190002,
    "perc90": 448.60144272938
  },
  {
    "date": "2021-09-05",
    "pixel_count": 1772,
    "min": 0.9972436372799999,
    "max": 999.9998235943,
    "mean": 175.26588535556,
    "median": 156.91995944984,
    "perc90": 461.17470049708
  }
]

Raster requests:

# Raster information

GET: /{product}/{composite}/{date}/info

POST: /{product}/info

Get information about available raster(s) for given product, composite, and date.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
dateThe date of the requested raster. Must be in yyyymmdd or yyyy-mm-dd format.

Return:

nametypedescription
sensorstringThe name of the sensor, which is limited to either MERIS or OLCI.
platformstring[]An array of the available platforms operational on this date. Does not necessitate that all listed made a flyover or have available imagery for this date.
productstringThe data product type. See product definition.
compositestringThe type of composite. See composite definition.
datestrstringThe date in yyyymmdd format.
rastersstring|string[]The filename(s) of the available raster(s).
Example:

GET: https://fhab-api.sfei.org/cicyano/mosaic/20200609/info

Get information about available raster(s) on the date June 9th, 2020 for the CI cyano product and mosaics.

Results:

{
  "sensor": "OLCI",
  "platform": [
    "sentinel-3a",
    "sentinel-3b"
  ],
  "product": "cicyano",
  "composite": "mosaic",
  "datestr": "20200609",
  "rasters": [
    "sentinel-3a.2020161.0609.L3.CA_mosaic.v950V20193_1_2.CIcyano.tif",
    "sentinel-3b.2020161.0609.L3.CA_mosaic.v950V20193_1_2.CIcyano.tif"
  ]
}

# Single date raster(s)

GET: /{product}/{composite}/{date}/{format}

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a single-date statistics request, date-span statistics request, or pixel-value request.

Get the raster(s) for given product, composite, and date. Currently only the tiff format is supported.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
dateThe date of the requested raster. Must be in yyyymmdd or yyyy-mm-dd format.
formatThe raster format. Currently only tiff (or alternatively spelled tif) is supported. Note that this parameter is also required. If not specified or unrecognized type, the request will be interpreted as a (malformed) single-date statistic request.

Return:

The raster or rasters will be return in the format provided. If multiple rasters are returned, the file will be served as a zip file. Multiple files may result for mosaic products requests if overflights from both Sentinel-3A and Sentinel-3B are present.

Mosaic rasters are provided in the filename format:

[platform].[yyyyjjj].[mmdd].CA_mosiac.[version].[product].tif

Composite rasters are provided in the filename format:

ts.[start:yyyymmdd]_[end:yyyymmdd].L4.CA_mosiac.[product].[compositetype].tif

Composite rasters will have a date span indicating the start and end dates of the composite window (inclusive). The requested date will correspond to the end date of this window.

Rasters are provided with a color table for symbology. Pixel values are 0-255 and map to the values as indicated in the pixel values table.

Example:

GET: https://fhab-api.sfei.org/chlorophyll/1daymax/20220826/tif

Get the raster on the date August 26th, 2022 for the chlorophyll product using the 1-day pixel maximum composite.

Results:

ts.20220826_20220826.L4.CA_mosaic.chl_gil_rhos.MAX_1day.tif

Chlorophyll 1-day pixel maximum raster for 2022-08-26

# Monthly rasters

GET: /{product}/{composite}/{month}/{format}

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a single-date statistics request, date-span statistics request, or pixel-value request.

Get the raster for given product, composite, and date. Currently only the tiff format is supported.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
monthThe month of the requested rasters. Must be in yyyymm or yyyy-mm format.
formatThe raster format. Currently only tiff (or alternatively spelled tif) is supported. Note that this parameter is also required. If not specified or unrecognized type, the request will be interpreted as a (malformed) single-date statistic request.

Return:

Results will be provided as a zipfile with all rasters contained in the format provided. Zipfiles will be in the filename format:

[platform]_[yyyymm]_[compositetype]_[product].zip

Mosaic rasters are provided in the filename format:

[platform].[yyyyjjj].[mmdd].CA_mosiac.[version].[product].tif

Composite rasters are provided in the filename format:

ts.[start:yyyymmdd]_[end:yyyymmdd].L4.CA_mosiac.[product].[compositetype].tif

Rasters are provided with a color table for symbology. Pixel values are 0-255 and map to the values as indicated in the pixel values table.

Example:

GET: https://fhab-api.sfei.org/chlorophyll/1daymax/202208/tif

Get all observations on August 2022 for the chlorophyll product using the 1-day pixel maximum composite.

Results:

OLCI_202208_1DayMax_chl_gil_rhos.zip

# Single date raster(s) clipped to waterbody

GET: /{product}/{composite}/{date}/{wid}/{format}

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a single-date statistics request, date-span statistics request, or pixel-value request.

Get the raster(s) for given product, composite, and date. Currently only the tiff format is supported.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
dateThe date of the requested raster. Must be in yyyymmdd or yyyy-mm-dd format.
widThe waterbody ID for the waterbody to clip the raster to.
formatThe raster format. Currently only tiff (or alternatively spelled tif) is supported. Note that this parameter is also required. If not specified or unrecognized type, the request will be interpreted as a (malformed) single-date statistic request.

Return:

The raster will be return in the format provided. If multiple rasters are returned, the file will be served as a zip file. Multiple files may result for mosaic products requests if overflights from both Sentinel-3A and Sentinel-3B are present.

Mosaic rasters are provided in the filename format:

[platform].[yyyymmdd].L3.[product].mosaic.[waterbody-name].tif

Composite rasters are provided in the filename format:

ts.[start:yyyymmdd]_[end:yyyymmdd].L4.[product].[composite].[waterbody-name].tif

Composite rasters will have a date span indicating the start and end dates of the composite window (inclusive). The requested date will correspond to the end date of this window.

Rasters are provided with a color table for symbology. Pixel values are 0-255 and map to the values as indicated in the pixel values table.


Pixel value requests:

# Pixel value

GET: /{product}/{composite}/{date}/lon/{longitude}/lat/{latitude}/format

GET: /{product}/{composite}/{date}/lat/{latitude}/lon/{longitude}/format

POST: /{product} *

*POST requests to this endpoint will be interpreted based on the parameters supplied. Depending on which, the request may alternatively be interpreted as a single-date statistics request, date-span statistics request, or raster request.

Get pixel value at a specific longitude and latitude for the given product, composite, and date.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
dateThe date from which to grab the pixel values. Must be in yyyymmdd or yyyy-mm-dd format.
longitudeThe longitude (from -180 to 180).
latitudeThe latitude (from -90 to 90).
formatOptional. The format to return data. Default is json, but csv is also supported.

Return:

nametypedescription
[]object[]The returned value will be in an array format in case multiple observations were made for the same date. If no valid observations were made (either due to no flyover or pixel coordinates out of bounds of any flyovers), it will be an empty array.
[].platformstringIf mosaic data were requested, the platform associated with this observation.
[].rawnumberThe raw pixel value for this observation at the given coordinates. Note that if raw pixel values are returned, a no-data pixel value may result. (See pixel values table.)
[].cinumberThe cyano index value for this observation at the given coordinates. Null for no-data.
[].ci_modifiednumberThe modified cyano index value for this observation at the given coordinates. Null for no-data.
[].chlnumberThe estimated chlorophyll-a concentration value (mg/m3) for this observation at the given coordinates. Null for no-data.
[].pixelnumber[]The pixel bounds of the matched pixel in order: x-min, y-min, x-max, y-max.
Example:

GET: https://fhab-api.sfei.org/cyano/mosaic/20230621/lon/-122.8387/lat/39.0555/

Get the pixel value using the cyano products and mosaic imagery (no composite) on June 21st, 2023, at the coordinates given by longitude 39.0555 and latitude -122.8387.

Results:

[
  {
    "platform": "sentinel-3b",
    "raw": 220,
    "ci": 0.027609365,
    "ci_modified": 436.3709835107,
    "pixel": [-122.839181,39.054876,-122.835509,39.057392]
  },
  {
    "platform":"sentinel-3a",
    "raw": 255,
    "ci": null,
    "ci_modified": null,
    "pixel": [-122.839181,39.054876,-122.835509,39.057392]
  }
]

As mosaic data is returned, separate data objects are given for Sentinel-3A and 3B. The above indicates that Sentinel-3B had a flyover of the location in question but Sentinel-3A did not.

# Pixel value histogram

GET: /{product}/{composite}/{wid}/{date}/histogram/{valuetype}/{format}

POST: /{product}/histogram

Get histogram of pixel values for the given product, composite, waterbody, and date.

Parameters:

namedescription
productThe data product type. See product definition.
compositeThe type of composite. See composite definition.
widThe waterbody ID.
dateThe date for which to grab pixel values. Must be in yyyymmdd or yyyy-mm-dd format.
valuetypeThe units for the returned values. See value type definition.
formatOptional. The format to return data. Default is json, but csv is also supported.

Return:

Note that if raw pixel values are returned, high counts for the value 252 may result. This value is the no-data value for land (see pixel values table) and almost always captured as waterbody boundaries are given a two-pixel buffer so as not to potentially exclude any valid pixels. Most of the time, however, it is simply counting pixels in the land mask.

Otherwise (for returns in cyano index, modified cyano index, or chlorophyll), no-data pixels are excluded from the returned data.

nametypedescription
[]object[]The returned value will be in an array format, with each datum representing a bin, in increasing order by bin value.
[].platformstringIf mosaic data were requested, the platform associated with this observation.
[].valueThe bin value. If valuetype was set to raw, no-data pixel values will also be given. (See pixel values table.) Otherwise, no-data values will be excluded from the results.
[].countThe count of pixels with the given bin value.
Example:

GET: https://fhab-api.sfei.org/cyano/10daymax/33/20231108/histogram/raw/

Compute a histogram of pixel values using the cyano products and 10-day pixel maximum composite on November 8th, 2023. Values are to be reported in raw pixel values.

Results:

[
  {
    "value": 0,
    "count": 1112
  },
  /* ... */
  {
    "value": 245,
    "count": 1
  },
  {
    "value": 246,
    "count": 1
  },
  {
    "value": 247,
    "count": 0
  },
  {
    "value": 248,
    "count": 0
  },
  {
    "value": 249,
    "count": 1
  },
  {
    "value": 250,
    "count": 3
  },
  {
    "value": 251,
    "count": 0
  },
  {
    "value": 252,
    "count": 770
  },
  {
    "value": 253,
    "count": 0
  },
  {
    "value": 254,
    "count": 0
  },
  {
    "value": 255,
    "count": 90
  }
]

Note that raw pixel values >250 are no-data values. For more information, see the pixel values table.


Parameter definitions


# Composite

The type of data composite. 1-day and 10-day pixel-max composites are created by compiling all available images over the 1-day and 10-day period and using the maximum observed value at each pixel location in the composite image. Note: 1-day composites have only been processed for the OLCI imagery (those data starting in 2016 onward). It is not currently available for the MERIS datasets.

namedescription
10daymaxA running, 10-day pixel maximum composite.
7daymaxA running, 7-day pixel maximum composite.
1daymaxSingle-day pixel maximum composite.
mosaicThe un-composited mosaic data, which may be duplicated per day if multiple flyovers (from both Sentinel-3A/B) are present.

# Platform

The satellite platform which made the observation. Which platform was available depends on the date of the request being made. Note: There exists a significant data gap between 2012 and 2016, after contact was lost with Envisat and before Sentinel-3A become operational.

namedescription
envisatData captured via MERIS (Medium Resolution Imaging Spectrometer) aboard the Envisat satellite which operated from 2002 to 2012 (when contact was lost).
sentinel-3aData captured via OLCI (Ocean and Land Color Instrument) on Sentinel-3A, the first of the Sentinel-3 satellites, beginning operation in 2016.
sentinel-3bData captured via OLCI on Sentinel-3B, the second of the Sentinel-3 satellites, beginning operation in 2018.
sentinel-3abStarting in 2024, daily imagery from either/both Sentinel-3A and Sentinel-3B were merged. Mosaic data from this platform indicates it was imaged from either of the Sentinel-3 satellites.

# Product

The data product type, which at current is either cyano index or chlorophyll. Note: Chlorophyll products have only been processed for the OLCI imagery (those data starting in 2016 onward). It is not currently available for the MERIS datasets.

namedescription
cicyanoThe cyano index product estimates the abundance of cyanobacteria by quantifying the spectral shape at around 680nm, which is affected by the absorption of pigments such as phycocyanin, an accessory pigment in photosynthesis specific to Microcystis sp.
cyanoAlias for cicyano.
ciAlias for cicyano.
chlorophyllThe Chl-a product estimates the concentration of Chl-a as a proxy for overall biomass based on the RE10 algorithm (Wynne et al., 2022), which examines the ratio of a red-edge band (665nm) to one at near infrared (NIR).
chlAlias for chlorophyll.

# Statistic

The statistical measure. Supported types listed below. In most use cases, multiple types may be provided, separated by commas.

namedescription
maxMaximum value.
minMinimum value.
meanMean value.
medianMedian value.
perc9090th percentile value.

# Value type

The units for the return data. Note that some units are only applicable to a specific product type.

namedescription
rawRaw, unconverted pixel values which are 8-bit, unsigned integers ranging from 0-255. No-data values are included (see pixel values table).
ciPixel values converted to cyano index, which has a range of 0.00006-0.06. Values are unitless by can be related to estimated Microcystis sp. cell concentration (in cells/mL) by a multiplier of 100,000,000.
ci_modifiedPixel values converted to cyano index and a multiplier of 15,805.18, which adjusts the value range to 1-1,000.
chlPixel values converted to estimated Chl-a concentration in micrograms per liter (equivalent to milligrams per cubic meter) and range from 0.05 -134.6 μg/L.


© San Francisco Estuary Institute 2026