Eutrophication Watch

Eutrophication Watch API

Time-series chlorophyll-a trends, composited tiles, CEP classes, and PDF report export — powered by Google Earth Engine.

Base URL: https://api.eutrophicationwatch.org
All endpoints under: /api/

Authentication

JWT Bearer Token

Required for all /api/timeseries/ endpoints. Obtain a token via your login endpoint and pass it as:

Authorization: Bearer <access_token>

Access tokens are valid for 24 hours. Refresh tokens are valid for 7 days.

Client Credentials

For /api/regional_cep/client/. Pass your client ID and secret as headers:

X-Client-Id: <your-client-id>
X-Client-Secret: <your-client-secret>

Endpoints

GET /api/timeseries/ JWT

Point-based annual maximum chlorophyll-a time series with Mann-Kendall trend and CEP classification.

Query paramTypeNotes
latitudefloatRequired.
longitudefloatRequired.
start_yearintRequired.
end_yearintRequired.
satellite_sensorstringRequired. See sensor list below.
data_assetstringCustom GEE asset path (use with userAsset).
thresholdintCutoff level. Default: 5.
timeseries_onlyboolSkip tile generation. Default: false.
curl "https://api.eutrophicationwatch.org/api/timeseries/?latitude=35.6&longitude=140.1&start_year=2018&end_year=2024&satellite_sensor=SGLI/GCOM-C" \
  -H "Authorization: Bearer <token>"
POST /api/timeseries/file/ JWT

Regional analysis using an uploaded boundary file or a raw GeoJSON string. Returns time series, tile URLs, CEP pixel distribution, and optionally a merged GeoTIFF.

FieldTypeNotes
shape_filefileKML, GeoJSON/JSON, or .zip shapefile. Required unless geojson_string is provided.
geojson_string NEW string Raw GeoJSON string (FeatureCollection or Feature). Alternative to uploading a file. Must be valid JSON. Example: {"type":"FeatureCollection","features":[...]}
latitudefloatRequired. Anchor point inside the region.
longitudefloatRequired.
start_yearintRequired.
end_yearintRequired.
satellite_sensorstringRequired. See sensor list below.
geotiff_downloadboolIf true, merges tiles into a downloadable GeoTIFF. Not available with custom assets.
data_assetstringCustom GEE asset path.
timeseries_onlyboolSkip tile and file generation. Default: false.
threshold (query)intCutoff level. Default: 5.
monthly_avg (query)boolReturn monthly averages across all shapes. Expensive for large regions.

Example — file upload:

curl -X POST "https://api.eutrophicationwatch.org/api/timeseries/file/" \
  -H "Authorization: Bearer <token>" \
  -F "latitude=35.6" -F "longitude=140.1" \
  -F "start_year=2018" -F "end_year=2024" \
  -F "satellite_sensor=SGLI/GCOM-C" \
  -F "geotiff_download=true" \
  -F "shape_file=@region.zip"

Example — GeoJSON string (no file upload):

curl -X POST "https://api.eutrophicationwatch.org/api/timeseries/file/" \
  -H "Authorization: Bearer <token>" \
  -F "latitude=35.6" -F "longitude=140.1" \
  -F "start_year=2018" -F "end_year=2024" \
  -F "satellite_sensor=SGLI/GCOM-C" \
  -F "geotiff_download=true" \
  -F 'geojson_string={"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[139.5,35.2],[140.5,35.2],[140.5,36.0],[139.5,36.0],[139.5,35.2]]]},"properties":{}}]}'

Response:

{
  "average_values": [
    {"date": "2018", "chlor_a": 1.82, "trend": 0.04},
    {"date": "2019", "chlor_a": 2.10, "trend": 0.04},
    ...
  ],
  "monthly_average_values": [],
  "composit_tile": "https://earthengine.googleapis.com/.../tiles/{z}/{x}/{y}",
  "trend_tile":    "https://earthengine.googleapis.com/.../tiles/{z}/{x}/{y}",
  "cep_tile":      "https://earthengine.googleapis.com/.../tiles/{z}/{x}/{y}",
  "point_status":  "HI",
  "mcep_value":    6,
  "download_link": "media/SGLI_GCOM-C_2018_202420250319120000.tif",
  "pixel_count": [
    {"class": 1, "count": 12},
    {"class": 2, "count": 340},
    {"class": 3, "count": 187},
    {"class": 4, "count": 5},
    {"class": 5, "count": 1331},
    {"class": 6, "count": 2928}
  ],
  "split_percentage": 100.0,
  "status": "completed"
}

Response field notes:

FieldDescription
average_valuesAnnual max Chl-a and Sen's slope trend per year.
monthly_average_valuesMonthly averages across all shapes (only when monthly_avg=true).
composit_tile / trend_tile / cep_tileXYZ tile URLs for use in web maps (Leaflet, Mapbox GL, etc.).
point_statusCEP class label at the anchor point: LD, LN, LI, HD, HN, or HI.
mcep_valueNumeric CEP class (1–6) at the anchor point.
download_linkRelative path to the merged GeoTIFF (when geotiff_download=true). null otherwise.
pixel_countArray of {class, count} objects for classes 1–6 in the exported GeoTIFF.
split_percentagePercentage of region tiles successfully downloaded (0–100). -1 if no tiles were attempted.
status "completed" — all shape splits downloaded successfully (split_percentage = 100%).
"incomplete" — some splits failed; GeoTIFF may have gaps.
"failed" — no tiles were downloaded.
POST /api/timeseries/file/export/pdf/ JWT NEW

Runs the same regional analysis as /api/timeseries/file/ and generates a Chesapeake Bay Report Card–style PDF (SDG 14.1.1a Assessment Report). Returns all the standard JSON fields plus a pdf_download_link.

FieldTypeNotes
All fields from /api/timeseries/file/ are accepted, plus:
region_namestringHuman-readable region label shown in the report header. Default: "Selected Region".
ai_summarystringUser-edited AI insight text embedded in the report. Auto-generated if omitted.

Example:

curl -X POST "https://api.eutrophicationwatch.org/api/timeseries/file/export/pdf/" \
  -H "Authorization: Bearer <token>" \
  -F "latitude=38.9" -F "longitude=-76.4" \
  -F "start_year=2018" -F "end_year=2024" \
  -F "satellite_sensor=SGLI/GCOM-C" \
  -F "geotiff_download=true" \
  -F "region_name=Chesapeake Bay" \
  -F "ai_summary=Eutrophication levels remain elevated in the northern bay..." \
  -F "shape_file=@chesapeake.geojson"

Response (JSON + pdf link):

{
  "average_values": [...],
  "point_status": "HI",
  "mcep_value": 6,
  "pixel_count": [...],
  "download_link": "media/SGLI_GCOM-C_2018_2024_....tif",
  "pdf_download_link": "media/SDG14_1_1a_Chesapeake_Bay_2018_2024_20260319120000.pdf",
  "status": "completed",
  "split_percentage": 100.0
}

The PDF includes: header with region/date, KPI cards (HI Ratio, Health Status, CEP Class), class distribution table with pie chart, CEP map, 10-year trend chart, AI insight box, and footer with NPEC/JAXA logos and methodology citation.

POST /api/regional_cep/client/ Client headers

Same as /api/timeseries/file/ but authenticated via X-Client-Id / X-Client-Secret headers instead of JWT. Accepts both shape_file and geojson_string.


Reference

Satellite Sensors

ValueDescriptionAvailable from
MODIS/AquaMODIS Aqua chlorophyll-a2003
SGLI/GCOM-CJAXA GCOM-C SGLI2018
SeaWiFSSeaWiFS ocean colour1998
YOC (Blended CHL Dataset)Blended multi-sensor dataset
YOC+SGLIYOC blended + SGLI
esa_cciESA CCI Ocean Colour1998
userAssetCustom GEE asset (requires data_asset)

CEP Classes

ClassLabelMeaningColour
1LDLow Decreasing■ #9B30FF
2LNLow No-trend■ #0A0FA0
3LILow Increasing■ #7EC8D8
4HDHigh Decreasing■ #F5C400
5HNHigh No-trend■ #F5A882
6HIHigh Increasing — highest eutrophication concern■ #A80000

Notes

  • When status is "completed", the GeoTIFF and pixel_count cover the full region (all shape splits succeeded). When "incomplete", some tiles failed and the output may have gaps.
  • Large regions are automatically split into tiles for GEE processing. split_percentage reflects how many tiles were successfully retrieved.
  • Methodology: Maúre et al. (2021) Nature Communicationsdoi:10.1038/s41467-021-21921-3