Global Fishing Watch API
ExamplesInsights

Get insights for a vessel related to AIS off events

Example Insights request returning AIS off (gap) indicators for one vessel over a date range.

Request body

FieldValueDescription
includes["GAP"]Insight type to include: AIS off events
confidences[]Confidence levels to filter AIS off events by
startDate2022-07-11Start of the period to analyze
endDate2023-07-11End of the period to analyze
vessels[0].datasetIdpublic-global-vessel-identity:latestVessel identity dataset
vessels[0].vesselId2339c52c3-3a84-1603-f968-d8890f23e1edVessel id to get insights for

Request

# Make sure to replace [TOKEN] with your API Access Token.
curl --location --request POST 'https://gateway.api.globalfishingwatch.org/v3/insights/vessels' \
--header 'Authorization: Bearer [TOKEN]' \
--header 'Content-Type: application/json' \
--data-raw '{
    "includes": [ "GAP"],
    "confidences": [],
    "startDate": "2022-07-11",
    "endDate": "2023-07-11",
    "vessels": [
    {"datasetId":"public-global-vessel-identity:latest","vesselId":"2339c52c3-3a84-1603-f968-d8890f23e1ed"}
    ]
}'

Response

{
  "period": {
    "startDate": "2022-07-11",
    "endDate": "2023-07-11"
  },
  "gap": {
    "datasets": ["public-global-gaps-events:v3.0"],
    "historicalCounters": {
      "events": 1,
      "eventsGapOff": 1
    },
    "periodSelectedCounters": {
      "events": 1,
      "eventsGapOff": 1
    },
    "aisOff": ["9ce75aa2a483a06f41155132b83dc744"]
  }
}