Global Fishing Watch API
API v3Events

Get All Events

Get several events in one request apparent fishing, encounters between vessel types, loitering, port visits and AIS gaps.

You can get all events using the GET or the POST verbs

Events GET examples

These examples are available:

  1. Example 1 (GET) - Get Apparent Fishing Events
  2. Example 2 (GET) - Get Encounter Events
  3. Example 3 (GET) - Get Loitering Events
  4. Example 4 (GET) - Get Port Visits

Events POST examples

These examples are available:

  1. Example 1 (POST) - Get Fishing Events
  2. Example 2 (POST) - Get Encounter Events
  3. Example 3 (POST) - Get Loitering Events
  4. Example 4 (POST) - Get Port Visits
  5. Example 5 (POST) - Get Fishing Events Within Senegal EEZ

Events GET - Specifications

GET
/api/v3/events

Authorization

ApiKeyAuth
AuthorizationBearer <token>

In: header

Query Parameters

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]

flags?array<string>

Flags in format ISO3.

flagsOperator?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

vesselGroups?array<string>

Ids of vessel-groups

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]

start-date?string

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

end-date?string

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

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]

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]

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.

includes?array<string>

Specify the properties that you want to obtain. If it's empty, the response will contains all data.

portIds?array<string>

Port ids to filter by

portIdsOperator?string

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

timeFilterMode?string

Time filter mode

Default"OVERLAP"
regionDatasets?array<string>

Dataset of regions to filter by

regionIds?array<string>

Dataset ids of regions to filter by

buffer-value?number

Distance to draw the buffer (negative values are allowed)

buffer-unit?string

Distance to draw the buffer (negative values are allowed)

Value in

  • "MILES"
  • "NAUTICALMILES"
  • "KILOMETERS"
  • "RADIANS"
  • "DEGREES"
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"
minDuration?number

Min duration in hours (inclusive)

maxDuration?number

Max duration in hours (exclusive)

nextPortIds?array<string>

Next port id

nextPortIdsOperator?string

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

is-closed?array<boolean>

If the gap event is closed

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.

ids?array<string>

Events ids.

include-regions?boolean

Flag to specify if the matching with regions should be executed or not. Check our data caveats for details on how the region is matching. Default value is True.

summary?boolean
offset*number

Offset into the search results, used for pagination. It starts at 0. It is used in combination with the param “limit”. For example, you send limit = 5 and you get in the response total vessels =10. So, If you send offset =0, you will get the first 5 results (first page). Therefore, in order to get the second page, you need to send offset = 5 which is the position of the first element you want from the second page.

Range0 <= value
limit*number

Amount of search results to return.

Range1 <= value
curl -X GET "https://example.com/api/v3/events?datasets=public-global-fishing-events%3Alatest&datasets=public-global-encounter-events%3Alatest&offset=0&limit=1"
{  "entries": [    {      "boundingBox": [        "-26.6544916667",        "-27.4231866667",        "-58.2073683333",        "-58.7976633333"      ],      "distances": {        "endDistanceFromPortKm": "0.0",        "endDistanceFromShoreKm": "0.0",        "startDistanceFromPortKm": "0.0",        "startDistanceFromShoreKm": "0.0"      },      "end": "2015-01-04T02:20:00.000Z",      "id": "a6e00481737d3e2c9903e1f565c51143",      "position": {        "lat": "125.2089",        "lon": "12.14587"      },      "regions": {        "eez": [],        "eez12Nm": [],        "fao": [],        "highSeas": [],        "majorFao": [],        "mpa": [],        "mpaNoTake": [],        "mpaNoTakePartial": [],        "rfmo": []      },      "start": "2015-01-02T23:50:00.000Z",      "type": "loitering",      "vessel": {        "flag": "ESP",        "id": "a6e00481737d3e2c9903e1f565c51143",        "name": "Don tito",        "nextPort": {},        "publicAuthorizations": "12345789",        "ssvid": "12345789",        "type": "FSIHING"      }    }  ],  "limit": 10,  "metadata": {},  "nextOffset": 10,  "offset": 0,  "total": 152}

Events POST - Specifications

POST
/api/v3/events

Authorization

ApiKeyAuth
AuthorizationBearer <token>

In: header

Query Parameters

offset*number

Offset into the search results, used for pagination. It starts at 0. It is used in combination with the param “limit”. For example, you send limit = 5 and you get in the response total vessels =10. So, If you send offset =0, you will get the first 5 results (first page). Therefore, in order to get the second page, you need to send offset = 5 which is the position of the first element you want from the second page.

Range0 <= value
limit*number

Amount of search results to return.

Range1 <= value

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

encounterTypes?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]

endDate?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]

gapIntentionalDisabling?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

ids?array<string>

Events ids.

includes?array<string>

Specify the properties that you want to obtain. If it's empty, the response will contains all data.

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?

Region info to filter

regionDatasets?array<string>

Dataset of regions to filter by

regionIds?array<string>

Dataset ids of regions to filter by

regions?array<>

Regions info to filter

startDate?string

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

timeFilterMode?string

Time filter mode

Default"OVERLAP"
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?offset=0&limit=1" \  -H "Content-Type: application/json" \  -d '{    "datasets": [      "public-global-fishing-events:latest",      "public-global-encounter-events:latest"    ]  }'
{  "entries": [    {      "boundingBox": [        "-26.6544916667",        "-27.4231866667",        "-58.2073683333",        "-58.7976633333"      ],      "distances": {        "endDistanceFromPortKm": "0.0",        "endDistanceFromShoreKm": "0.0",        "startDistanceFromPortKm": "0.0",        "startDistanceFromShoreKm": "0.0"      },      "end": "2015-01-04T02:20:00.000Z",      "id": "a6e00481737d3e2c9903e1f565c51143",      "position": {        "lat": "125.2089",        "lon": "12.14587"      },      "regions": {        "eez": [],        "eez12Nm": [],        "fao": [],        "highSeas": [],        "majorFao": [],        "mpa": [],        "mpaNoTake": [],        "mpaNoTakePartial": [],        "rfmo": []      },      "start": "2015-01-02T23:50:00.000Z",      "type": "loitering",      "vessel": {        "flag": "ESP",        "id": "a6e00481737d3e2c9903e1f565c51143",        "name": "Don tito",        "nextPort": {},        "publicAuthorizations": "12345789",        "ssvid": "12345789",        "type": "FSIHING"      }    }  ],  "limit": 10,  "metadata": {},  "nextOffset": 10,  "offset": 0,  "total": 152}

On this page