Global Fishing Watch API
API v3Events

Statistics on events

Get events statistics worldwide or for a specific region.

Get events statistics worldwide or for a specific region. The available events to get stats are:

  • Fishing events

  • Encounter events

  • Loitering events

  • AIS Off events (aka GAPs)

  • Port visits

Events Stats POST examples

These examples are available:

  1. Example 1 (POST) - Get Encounters Stats
  2. Example 2 (POST) - Get Fishing Events Stats in a Custom Region
  3. Example 3 (POST) - Get Port Visits Stats in a Region ID (Senegal)

Events Stats POST - Specifications

POST
/api/v3/events/stats

Authorization

ApiKeyAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

buffer-operation?string

Operation to apply to the region after the buffer. Only works together with buffer-value and buffer-unit query param. If not send, the default operation is dissolve

Value in

  • "DIFFERENCE"
  • "DISSOLVE"
buffer-unit?string

Distance to draw the buffer (negative values are allowed)

Value in

  • "MILES"
  • "NAUTICALMILES"
  • "KILOMETERS"
  • "RADIANS"
  • "DEGREES"
buffer-value?number

Distance to draw the buffer (negative values are allowed)

confidences?array<string>

This param applies only to port visits events, check data caveats to understand the different levels. Values go from 2 to 4, where 2 is low confidence, 3 is medium and 4 is high confidence. Values are separated by comma. Possible values: 2, 3, 4

confidencesOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

datasets*array<string>

Specify the datasets that will be used to search the vessel. You can learn more about which are the possible datasets here.

duration?number

Min duration, in minutes, of the event

encounter-types?array<string>

Possible values: FISHING-BUNKER, BUNKER-FISHING, FISHING-TANKER, TANKER-FISHING, CARRIER-BUNKER, BUNKER-CARRIER, SUPPORT-BUNKER, BUNKER-SUPPORT, FISHING-NON_FISHING, FISHING-RESEARCH, FISHING-, NON_FISHING-FISHING, NON_FISHING-NON_FISHING, NON_FISHING-SUPPORT, NON_FISHING-CARRIER, NON_FISHING-RESEARCH, NON_FISHING-, SUPPORT-NON_FISHING, SUPPORT-RESEARCH, SUPPORT-, CARRIER-NON_FISHING, CARRIER-CARRIER, CARRIER-RESEARCH, CARRIER-, RESEARCH-FISHING, RESEARCH-NON_FISHING, RESEARCH-SUPPORT, RESEARCH-CARRIER, RESEARCH-RESEARCH, RESEARCH-, -FISHING, -NON_FISHING, -SUPPORT, -CARRIER, -RESEARCH, -, FISHING-FISHING, FISHING-SUPPORT, FISHING-CARRIER, SUPPORT-FISHING, SUPPORT-SUPPORT, SUPPORT-CARRIER, CARRIER-FISHING, CARRIER-SUPPORT

encounterTypesOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

end-date?string

End date in format YYYY-MM-DD of the end date of the event (exclusive)

flags?array<string>

Flags in format ISO3.

flagsOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

gap-intentional-disabling?boolean

Flag to specify if you want to get those gaps that were intentional or not true means that the gap was intentional, false means that the gap was not intentional. If the flag is not present, then the response contains all gaps.

geometry?

Geojson of the region to filter

groupBy?string

Group data by. Options FLAG,GEARTYPE,REGION_EEZ,REGION_EEZ12NM,REGION_FAO,REGION_HIGH_SEAS,REGION_MAJOR_FAO,REGION_MPA,REGION_MPA_NO_TAKE,REGION_MPA_NO_TAKE_PARTIAL,REGION_RFMO,NEXT_PORT_ID

Value in

  • "FLAG"
  • "GEARTYPE"
  • "REGION_EEZ"
  • "REGION_EEZ12NM"
  • "REGION_FAO"
  • "REGION_HIGH_SEAS"
  • "REGION_MAJOR_FAO"
  • "REGION_MPA"
  • "REGION_MPA_NO_TAKE"
  • "REGION_MPA_NO_TAKE_PARTIAL"
  • "REGION_RFMO"
  • "NEXT_PORT_ID"
includes?array<>

Data ton include in the response. Options TOTAL_COUNT,TIME_SERIES,EVENTS_GROUPED

is-closed?array<boolean>

If the gap event is closed

maxDuration?number

Max duration in hours (exclusive)

minDuration?number

Min duration in hours (inclusive)

nextPortIds?array<string>

Next port id

nextPortIdsOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

portIds?array<string>

Port ids to filter by

portIdsOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

region?

Geojson of the region to filter

regionDatasets?array<string>

Dataset of regions to filter by

regionIds?array<string>

Dataset ids of regions to filter by

regions?array<>

Region info to filter

start-date?string

Start date in format YYYY-MM-DD of the start date of the event (inclusive)

timeFilterMode?string

Time filter mode

Default"OVERLAP"
timeseriesInterval*string

Time series granularity. Options HOUR,DAY,MONTH,YEAR

Value in

  • "HOUR"
  • "DAY"
  • "MONTH"
  • "YEAR"
types?array<string>

Event types. Possible values: ENCOUNTER,FISHING,LOITERING,GAP_START,GAP,PORT_VISIT

typesOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

vesselGroups?array<string>

Ids of vessel-groups

vesselTypes?array<string>

Vessel types. Possible values: BUNKER,CARGO,DISCREPANCY,CARRIER,FISHING,GEAR,OTHER,PASSENGER,SEISMIC_VESSEL,SUPPORT,NON_FISHING,RESEARCH,

vesselTypesOperator?string

Operators to apply for the filter: [INCLUDE, EXCLUDE]

vessels?array<string>

List of vessel ids separated by comma. You can get this information using the search endpoints

curl -X POST "https://example.com/api/v3/events/stats" \  -H "Content-Type: application/json" \  -d '{    "datasets": [      "public-global-fishing-events:latest",      "public-global-encounter-events:latest"    ],    "timeseriesInterval": "DAY"  }'
{  "flags": [    "ESP"  ],  "groups": [    {      "flag": "",      "label": "",      "name": "",      "value": 2    }  ],  "numEvents": 20,  "numFlags": 2,  "numVessels": 10,  "timeseries": [    {      "date": "",      "value": 2    }  ]}

Events Stats Response fields

NameTypeRequiredRestrictionsDescription
flags[string]truenoneDistinct flags
numEventsnumbertruenoneNumber of events
numFlagsnumbertruenoneNumber of distinct vessel flags
numVesselsnumbertruenoneNumber of distinct vessels
timeseries[See Timeseries definition below]truenoneTimeseries
Properties Events Stats Response Timeseries
NameTypeRequiredRestrictionsDescription
datestring(date-time)truenoneDate
valuenumbertruenoneNumber of events

On this page