ExamplesInsights
Get insights for a vessel related to being listed in IUU list
Example Insights request returning IUU list indicators for one vessel over a date range.
Request body
| Field | Value | Description |
|---|---|---|
includes | ["VESSEL-IDENTITY-IUU-VESSEL-LIST"] | Insight type to include: presence on an RFMO IUU vessel list |
confidences | [] | Confidence levels to filter by |
startDate | 2020-01-01 | Start of the period to analyze |
endDate | 2024-04-10 | End of the period to analyze |
vessels[0].datasetId | public-global-vessel-identity:latest | Vessel identity dataset |
vessels[0].vesselId | 2d26aa452-2d4f-4cae-2ec4-377f85e88dcb | Vessel 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": [ "VESSEL-IDENTITY-IUU-VESSEL-LIST"],
"confidences": [],
"startDate": "2020-01-01",
"endDate": "2024-04-10",
"vessels": [
{"datasetId":"public-global-vessel-identity:latest","vesselId":"2d26aa452-2d4f-4cae-2ec4-377f85e88dcb"}
]
}'result = await gfw_client.insights.get_vessel_insights(
includes=["VESSEL-IDENTITY-IUU-VESSEL-LIST"],
start_date="2020-01-01",
end_date="2024-04-10",
vessels=[
{
"datasetId": "public-global-vessel-identity:latest",
"vesselId": "2d26aa452-2d4f-4cae-2ec4-377f85e88dcb",
}
],
)// Make sure to replace [TOKEN] with your API Access Token.
const res = await fetch('https://gateway.api.globalfishingwatch.org/v3/insights/vessels', {
method: 'POST',
headers: {
Authorization: 'Bearer [TOKEN]',
'Content-Type': 'application/json',
},
body: JSON.stringify({
includes: ['VESSEL-IDENTITY-IUU-VESSEL-LIST'],
confidences: [],
startDate: '2020-01-01',
endDate: '2024-04-10',
vessels: [
{
datasetId: 'public-global-vessel-identity:latest',
vesselId: '2d26aa452-2d4f-4cae-2ec4-377f85e88dcb',
},
],
}),
})
const data = await res.json()Response
{
"period": {
"startDate": "2020-01-01",
"endDate": "2024-04-10"
},
"vesselIdentity": {
"datasets": ["public-global-vessel-identity:v3.0"],
"iuuVesselList": {
"valuesInThePeriod": [
{
"from": "2020-01-01T00:00:00Z",
"to": "2024-03-01T00:00:00Z"
}
],
"totalTimesListed": 1,
"totalTimesListedInThePeriod": 1
}
}
}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.
Generate SAR fixed infrastructure report for Argentina EEZ with filter by label = 'oil' and structure_start_date
Example bulk report request for SAR fixed infrastructure in the Argentina EEZ, filtered by label oil and structure start date, as CSV.