Global Fishing Watch API
ExamplesEvents

Get encounter events statistics filtered by flag and duration (POST)

Example events statistics request for carrier-fishing encounters, filtered by vessel type and date range.

Request body

FieldValueDescription
datasets["public-global-encounters-events:latest"]Encounter events dataset
encounterTypes["CARRIER-FISHING", "FISHING-CARRIER"]Encounter types to include
vesselTypes["CARRIER"]Vessel types to include
startDate2018-01-01Start of the date range
endDate2023-01-31End of the date range
timeseriesIntervalYEARTimeseries aggregation interval
flags["RUS"]Filter by vessel flag
duration60Minimum event duration in minutes

Request

# Make sure to replace [TOKEN] with your API Access Token.
curl --location --request POST 'https://gateway.api.globalfishingwatch.org/v3/events/stats' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
--header 'Content-Type: application/json' \
--data-raw '{
    "datasets": [ "public-global-encounters-events:latest"],
    "encounterTypes": ["CARRIER-FISHING", "FISHING-CARRIER"],
    "vesselTypes": ["CARRIER"],
    "startDate": "2018-01-01",
    "endDate": "2023-01-31",
    "timeseriesInterval": "YEAR",
    "flags": ["RUS"],
    "duration": 60
}
'

Response

{
  "numEvents": 23300,
  "numFlags": 1,
  "numVessels": 202,
  "flags": ["RUS"],
  "timeseries": [
    {
      "date": "2018-01-01T00:00:00.000Z",
      "value": 4486
    },
    {
      "date": "2019-01-01T00:00:00.000Z",
      "value": 4234
    },
    {
      "date": "2020-01-01T00:00:00.000Z",
      "value": 4656
    },
    {
      "date": "2021-01-01T00:00:00.000Z",
      "value": 4807
    },
    {
      "date": "2022-01-01T00:00:00.000Z",
      "value": 4701
    },
    {
      "date": "2023-01-01T00:00:00.000Z",
      "value": 416
    }
  ]
}