Examples4Wings Reports
Generate report with total fishing hours per vessel using existing regions (MPA Dorsal de Nasca) in JSON format
Example 4Wings report of total fishing hours per vessel in the Dorsal de Nasca MPA, as JSON.
To get details of existing regions, check Regions in the Reference data section
GET
Query parameters
| Parameter | Value | Description |
|---|---|---|
spatial-resolution | LOW | Low spatial resolution |
temporal-resolution | ENTIRE | Aggregate over the entire date range |
spatial-aggregation | true | Aggregate over the whole region (no lat/lon) |
group-by | VESSEL_ID | Group results by vessel |
datasets[0] | public-global-fishing-effort:latest | AIS apparent fishing activity dataset |
date-range | 2022-05-01,2022-12-01 | Filter to this time period |
format | JSON | Response format |
region-id | 555745302 | MPA Dorsal de Nasca region id |
region-dataset | public-mpa-all | Existing region dataset |
Request
# Make sure to replace [TOKEN] with your API Access Token.
curl --location -g --request GET 'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=ENTIRE&spatial-aggregation=true&group-by=VESSEL_ID&datasets[0]=public-global-fishing-effort:latest&date-range=2022-05-01,2022-12-01&format=JSON®ion-id=555745302®ion-dataset=public-mpa-all'\
--header 'Authorization: Bearer [TOKEN]' \
--header 'Content-Type: application/json' \
--output 'report-grouped.json'result = await gfw_client.fourwings.create_report(
datasets=["public-global-fishing-effort:latest"],
spatial_resolution="LOW",
temporal_resolution="ENTIRE",
spatial_aggregation=True,
group_by="VESSEL_ID",
start_date="2022-05-01",
end_date="2022-12-01",
region={"dataset": "public-mpa-all", "id": 555745302},
)// Make sure to replace [TOKEN] with your API Access Token.
const res = await fetch(
'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=ENTIRE&spatial-aggregation=true&group-by=VESSEL_ID&datasets[0]=public-global-fishing-effort:latest&date-range=2022-05-01,2022-12-01&format=JSON®ion-id=555745302®ion-dataset=public-mpa-all',
{ headers: { Authorization: 'Bearer [TOKEN]' } }
)
const data = await res.blob()POST
Query parameters
| Parameter | Value | Description |
|---|---|---|
spatial-resolution | LOW | Low spatial resolution |
temporal-resolution | ENTIRE | Aggregate over the entire date range |
spatial-aggregation | true | Aggregate over the whole region (no lat/lon) |
group-by | VESSEL_ID | Group results by vessel |
datasets[0] | public-global-fishing-effort:latest | AIS apparent fishing activity dataset |
date-range | 2022-05-01,2022-12-01 | Filter to this time period |
format | JSON | Response format |
Request body
| Field | Value | Description |
|---|---|---|
region.dataset | public-mpa-all | Existing region dataset |
region.id | 555745302 | MPA Dorsal de Nasca region id |
Request
# Make sure to replace [TOKEN] with your API Access Token.
curl --location -g --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=ENTIRE&spatial-aggregation=true&group-by=VESSEL_ID&datasets[0]=public-global-fishing-effort:latest&date-range=2022-05-01,2022-12-01&format=JSON'\
--header 'Authorization: Bearer [TOKEN]' \
--header 'Content-Type: application/json' \
--output 'report-grouped.json' \
--data-raw '{
"region": {
"dataset": "public-mpa-all",
"id": 555745302
}
}'result = await gfw_client.fourwings.create_report(
datasets=["public-global-fishing-effort:latest"],
spatial_resolution="LOW",
temporal_resolution="ENTIRE",
spatial_aggregation=True,
group_by="VESSEL_ID",
start_date="2022-05-01",
end_date="2022-12-01",
region={"dataset": "public-mpa-all", "id": 555745302},
)// Make sure to replace [TOKEN] with your API Access Token.
const res = await fetch(
'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=ENTIRE&spatial-aggregation=true&group-by=VESSEL_ID&datasets[0]=public-global-fishing-effort:latest&date-range=2022-05-01,2022-12-01&format=JSON',
{
method: 'POST',
headers: {
Authorization: 'Bearer [TOKEN]',
'Content-Type': 'application/json',
},
body: JSON.stringify({
region: { dataset: 'public-mpa-all', id: 555745302 },
}),
}
)
const data = await res.blob()Response
Abridged to the first two vessels.
{
"total": 1,
"limit": null,
"offset": null,
"nextOffset": null,
"metadata": {},
"entries": [
{
"public-global-fishing-effort:v5.0": [
{
"callsign": "UBVW3",
"dataset": "public-global-vessel-identity:v5.0",
"date": "2022-05-01,2022-12-01",
"entryTimestamp": "2022-10-31T12:00:00Z",
"exitTimestamp": "2022-11-13T04:00:00Z",
"firstTransmissionDate": "2021-12-27T14:28:49Z",
"flag": "RUS",
"geartype": "TRAWLERS",
"hours": 1.6005555555555557,
"imo": "9139610",
"lastTransmissionDate": "2026-11-01T23:27:42Z",
"mmsi": "273299680",
"shipName": "KOMANDOR",
"vesselId": "add950d75-564c-5ba7-bb0c-50bff028cca6",
"vesselType": "FISHING"
},
{
"callsign": "UBAW",
"dataset": "public-global-vessel-identity:v5.0",
"date": "2022-05-01,2022-12-01",
"entryTimestamp": "2022-11-17T03:00:00Z",
"exitTimestamp": "2022-11-23T04:00:00Z",
"firstTransmissionDate": "2012-01-13T17:28:36Z",
"flag": "RUS",
"geartype": "TRAWLERS",
"hours": 3.353888888888889,
"imo": "8607165",
"lastTransmissionDate": "2026-11-01T23:59:45Z",
"mmsi": "273524300",
"shipName": "ADMIRAL SHABALIN",
"vesselId": "1f8f0c096-63f0-cbdc-4d05-7643c9ffc330",
"vesselType": "FISHING"
}
]
}
]
}Generate fishing activity report grouped by gear type, using existing regions (Russian EEZ) in CSV format
Example 4Wings report for apparent fishing activity in the Russian EEZ, grouped by gear type, as CSV.
Generate report with total fishing hours per vessel using existing regions (MPA Dorsal de Nasca) in JSON format and buffer of 4 nautical miles
Example 4Wings report of total fishing hours per vessel in the Dorsal de Nasca MPA with a 4 nautical mile buffer, as JSON.