Usage Examples


Getting the waterbody ID

Many requests are based around a waterbody of interest, however requests must be made with the waterbody ID. So the first step is usually to search for a waterbody via the waterbody search request, which performs a fuzzy search on provided keywords and returns a list of waterbodies in order of best match.

Or, to get a list of all waterbodies, leave the search parameter empty.

Waterbody information

Using a waterbody ID, either gathered from the previous section or elsewhere, one can make requests for waterbody information. At currently, only the name and geometry are retrievable for a waterbody. Note that the geometry is buffered for analysis purposes, and does not represent the exact shoreline.

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

Get the information of a waterbody with the waterbody ID (wid).

Waterbody geometries can be retrieved as either GeoJSON or KML. The below shows the route for access the KML data.

# GET: /waterbody/{wid}/kml

Get the geometry of a waterbody with the waterbody ID (wid). Geometry is returned in KML format.

Waterbody statistics

The core data in the FHAB tool is waterbody-wide statistics derived from the cyano index and chlorophyll rasters. This data may be pulled from either the 10-day, 7-day, or 1-day pixel-maximum composites, or the single day mosaics, with the data covering a singular date or a date range, if a date span is provided.

The valuetype for the data returned must be specified. Values may be reported in the modified cyano index (ci_modified) as given in the FHAB Web Map, the regular cyano index (ci), or raw pixel values (raw).

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

Get the zonal waterbody statistics for given product, composite, waterbody, and date(s). Specify a single date to request only the statistics for the data, or specify a date span to request statistics for all dates within the span.

Downloading rasters

Rasters are given as GeoTiffs with an 8-bit pixel depth. As such, pixel values are 0-255 and map to cyano index values as indicated in the pixel values table. Note that for single-day mosaics, a zip file may be returned if there is covered from both Sentinel-3A and Sentinel-3B on the same day.

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

Get the raster for given product, composite, and date.

Currently only the tiff format is supported. If requesting mosaic data and both Sentinel-3A and Sentinel-3B imagery exist for the given date, the API will return a zipfile of both images.

More routes

Many other types of routes are built into this API. For the full list, see the reference documentation.




© San Francisco Estuary Institute 2026