### Example response for get bulk report by ID Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/bulk-download/get-bulk-report-id.md Example JSON response showing a completed bulk report with status 'done', dataset 'public-fixed-infrastructure-data:v1.1', and file details. ```shell { "id": "adbb9b62-5c08-4142-82e0-b2b575f3e058", "dataset": "public-fixed-infrastructure-data:v1.1", "name": "sar-vessel-detection-example-1", "filepath": "sar_fixed_infrastructure_202409.csv", "filters": [ "label = 'oil'", "structure_start_date between '2020-01-01' and '2025-01-01' " ], "status": "done", "geom": { "id": 8466, "type": "dataset", "dataset": "public-eez-areas" }, "createdAt": "2025-06-27T06:43:35.571Z", "updatedAt": "2025-06-27T06:43:35.571Z", "ownerId": 509, "ownerType": "user-application", "format": "CSV", "fileSize": 1207 } ``` -------------------------------- ### Get List of RFMOs - JavaScript Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions JavaScript fetch example to retrieve the list of RFMOs. Replace [TOKEN] with your API Access Token. ```javascript // Make sure to replace [TOKEN] with your API Access Token. const res = await fetch( 'https://gateway.api.globalfishingwatch.org/v3/datasets/public-rfmo/context-layers', { headers: { Authorization: 'Bearer [TOKEN]' } } ) const data = await res.json() ``` -------------------------------- ### Quick start: vessel search and encounter events Source: https://globalfishingwatch.org/our-apis/documentation/docs/sdks/gfwr.md Load gfwr and run two example calls: a vessel search by MMSI and an encounter event query for a date range. ```r library(gfwr) # Vessel search by MMSI gfw_vessel_info(query = 224224000, search_type = "search") # Encounter events for a date range gfw_event(event_type = "ENCOUNTER", start_date = "2020-01-01", end_date = "2020-01-02") ``` -------------------------------- ### Get List of MPAs - JavaScript Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions JavaScript fetch example to retrieve the list of MPAs. Replace [TOKEN] with your API Access Token. ```javascript // Make sure to replace [TOKEN] with your API Access Token. const res = await fetch( 'https://gateway.api.globalfishingwatch.org/v3/datasets/public-mpa-all/context-layers', { headers: { Authorization: 'Bearer [TOKEN]' } } ) const data = await res.json() ``` -------------------------------- ### Search vessel by IMO with Python Source: https://globalfishingwatch.org/our-apis/documentation/docs/quick-start.md Python example using the gfw-api-python-client package to search for a vessel by IMO. Requires the package to be installed and the GFW_API_ACCESS_TOKEN environment variable set. The example uses the public-global-vessel-identity:latest dataset. ```python # pip install gfw-api-python-client import os import gfwapiclient as gfw gfw_client = gfw.Client( access_token=os.environ["GFW_API_ACCESS_TOKEN"], ) result = await gfw_client.vessels.search_vessels( query="7831410", datasets=["public-global-vessel-identity:latest"], ) ``` -------------------------------- ### Install gfw-api-python-client with pip Source: https://globalfishingwatch.org/our-apis/documentation/docs/sdks/python-client.md Install the package using pip. Requires Python 3.11 or higher; a virtual environment is recommended. ```shell pip install gfw-api-python-client ``` -------------------------------- ### Get List of RFMOs - Response Example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions Example JSON response from the RFMO list endpoint, showing the structure with label, id, and ID fields. The response is truncated with an ellipsis. ```json [ { "label": "LTA", "id": "LTA", "ID": "LTA" }, { "label": "SEAFDEC", "id": "SEAFDEC", "ID": "SEAFDEC" }, { "label": "IATTC", "id": "IATTC", "ID": "IATTC" }, { "label": "APFIC", "id": "APFIC", "ID": "APFIC" }, { "label": "IPHC", "id": "IPHC", "ID": "IPHC" }, { "label": "ICCAT", "id": "ICCAT", "ID": "ICCAT" }, { "label": "WCPFC", "id": "WCPFC", "ID": "WCPFC" }, { "label": "CCAMLR", "id": "CCAMLR", "ID": "CCAMLR" }, { ... } ] ``` -------------------------------- ### Get List of EEZs - JavaScript Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions JavaScript fetch example to retrieve the list of EEZs. Replace [TOKEN] with your API Access Token. ```javascript // Make sure to replace [TOKEN] with your API Access Token. const res = await fetch( 'https://gateway.api.globalfishingwatch.org/v3/datasets/public-eez-areas/context-layers', { headers: { Authorization: 'Bearer [TOKEN]' } } ) const data = await res.json() ``` -------------------------------- ### Get port visit event by ID - Python Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-one-event.md Python example using the GFW client to fetch an event by ID. Replace the id and dataset with your own values. Requires an authenticated gfw_client. ```python result = await gfw_client.events.get_event_by_id( id="c2f0967e061f99a01793edac065de003", dataset="public-global-port-visits-events:latest", ) ``` -------------------------------- ### Install development version of gfwr from GitHub Source: https://globalfishingwatch.org/our-apis/documentation/docs/sdks/gfwr.md Install the development version of gfwr from GitHub, ensuring the remotes package is available first. ```r if (!require("remotes")) install.packages("remotes") remotes::install_github("GlobalFishingWatch/gfwr", dependencies = TRUE) ``` -------------------------------- ### Report running response example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/4wings/last-report Example response when the last report is still running. Includes the report URI and status 'running'. ```json { "uri": "/v3/4wings/report?format=JSON&datasets%5B0%5D=public-global-fishing-effort%3Av3.0&date-range=2023-12-31T00%3A00%3A00.000Z%2C2024-01-10T00%3A00%3A00.000Z&spatial-aggregation=true&temporal-resolution=ENTIRE®ion-dataset=public-eez-areas&group-by=VESSEL_ID", "status": "running", "lastUpdate": "2024-02-05T13:34:06+0000" } ``` -------------------------------- ### Response: Retrieve list of bulk reports sorted by creation date Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/bulk-download/get-bulk-report-users.md Example JSON response from the GET /v3/bulk-reports endpoint, showing pagination metadata and a sample report entry with fields like id, dataset, status, and fileSize. ```shell { "metadata": {}, "limit": 10, "offset": 5, "nextOffset": null, "total": 10, "entries": [ { "id": "d16d2d2a-b415-4f47-a525-54d60c0db2cd", "dataset": "public-fixed-infrastructure-data:v1.1", "name": "sar-vessel-detection-example-1", "filepath": "sar_fixed_infrastructure_202409.csv", "filters": [ "label = 'oil'", "structure_start_date between '2020-01-01' and '2025-01-01'" ], "status": "done", "geom": { "id": 8466, "type": "dataset", "dataset": "public-eez-areas" }, "createdAt": "2025-06-24T14:21:27.517Z", "updatedAt": "2025-06-24T14:21:27.517Z", "ownerId": 385, "ownerType": "user-application", "format": "CSV", "fileSize": 1207 } ] } ``` -------------------------------- ### Successful response for GET /api/v3/events Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-all-events Example JSON response with a list of events, including bounding box, distances, vessel info, and pagination metadata. ```json { "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 } ``` -------------------------------- ### Search vessel by IMO with R Source: https://globalfishingwatch.org/our-apis/documentation/docs/quick-start.md R example using the gfwr package to search for a vessel by IMO. Requires the gfwr package to be installed. The example uses the search_type = "search" parameter. ```r # install.packages("gfwr") library(gfwr) gfw_vessel_info(query = 7831410, search_type = "search") ``` -------------------------------- ### Success Response (200) for GET /api/v3/bulk-reports Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/bulk-download/get-bulk-report-users Example 200 response body showing the structure of the returned entries, including fields like createdAt, dataset, fileSize, status, and pagination metadata. ```json { "entries": [ { "createdAt": "2019-08-24T14:15:22Z", "dataset": "string", "fileSize": 0, "filepath": "fixed_infrastructure_202407.csv", "filters": [ "type = 'fishing'" ], "format": "", "geom": {}, "id": "", "name": "my-report", "ownerId": 0, "ownerType": "string", "status": "pending", "updatedAt": "2019-08-24T14:15:22Z" } ], "limit": 10, "metadata": {}, "nextOffset": 10, "offset": 0, "total": 152} ``` -------------------------------- ### 200 OK response example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/4wings/report Example of a successful response with report entries, including vessel details and timestamps. ```json { "entries": [ { "callsign": "UBSS9", "dataset": "public-global-vessel-identity:v3.0", "date": "2022-01-13", "detections": 12, "entryTimestamp": "2022-01-14T14:00:00Z", "exitTimestamp": "2022-01-14T16:00:00Z", "firstTransmissionDate": "2019-07-12T12:08:27Z", "flag": "ESP", "geartype": "FISHING", "hours": 26.6, "imo": "8602866", "lastTransmissionDate": "2025-03-01T23:55:50Z", "lat": 49.33, "lon": 141.15, "mmsi": "273453380", "shipName": "ALSEY", "vesselIDs": 3, "vesselId": "e6154b2e7-7762-4889-fb46-976ec72875e1", "vesselType": "FISHING" } ], "limit": 0, "metadata": {}, "nextOffset": 0, "offset": 0, "total": 0 } ``` -------------------------------- ### cURL request to GET /api/v3/events Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-all-events Example cURL command to fetch events with pagination parameters offset=0 and limit=1. ```bash 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" ``` -------------------------------- ### 200 response for get one event Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-one-event Example successful response with event details including bounding box, distances, and vessel information. ```json { "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" }} ``` -------------------------------- ### Response for port visit events request Source: https://globalfishingwatch.org/our-apis/documentation/docs/examples/events/get-example4 Example JSON response from the GET request. It includes metadata, pagination info (limit, offset, nextOffset, total), and an entry with port visit details such as start/end times, position, regions, distances, vessel info, and anchorage details. ```json { "metadata": { "datasets": ["public-global-port-visits-events:v3.0"], "vessels": ["914f83946-6af4-04c6-4974-44a203a87952"], "dateRange": { "from": null, "to": null } }, "limit": 1, "offset": 0, "nextOffset": 1, "total": 74, "entries": [ { "start": "2014-04-15T20:09:21.000Z", "end": "2014-04-28T12:15:34.000Z", "id": "a7b8b2f40b75ea6bec8bc8dbcb56741e", "type": "port_visit", "position": { "lat": 42.2182, "lon": -8.7915 }, "regions": { "mpa": [], "eez": ["5693"], "rfmo": ["NEAFC", "ICES", "NASCO", "ICCAT", "NAMMCO", "IWC", "ACAP"], "fao": ["27.9", "27.9.a", "27"], "majorFao": ["27"], "eez12Nm": [], "highSeas": [], "mpaNoTakePartial": [], "mpaNoTake": [] }, "boundingBox": [-8.7508320328, 42.2291383982, -8.8819075644, 42.2035438605], "distances": { "startDistanceFromShoreKm": 0, "endDistanceFromShoreKm": 2, "startDistanceFromPortKm": 0, "endDistanceFromPortKm": 0 }, "vessel": { "id": "914f83946-6af4-04c6-4974-44a203a87952", "name": "IRENE", "ssvid": "355794000" }, "port_visit": { "visitId": "f5fafee33631a3948c8e2042b5810cdc", "confidence": 3, "durationHrs": 304.1036111111111, "startAnchorage": { "anchorageId": "0d2f61f7", "atDock": true, "distanceFromShoreKm": 0, "flag": "ESP", "id": "esp-vigo", "lat": 42.229138398208576, "lon": -8.750832032773074, "name": "VIGO", "topDestination": "VIGO" }, "intermediateAnchorage": { "anchorageId": "0d2f61f7", "atDock": true, "distanceFromShoreKm": 0, "flag": "ESP", "id": "esp-vigo", "lat": 42.229138398208576, "lon": -8.750832032773074, "name": "VIGO", "topDestination": "VIGO" }, "endAnchorage": { "anchorageId": "0d25f581", "atDock": false, "distanceFromShoreKm": 2, "flag": "ESP", "id": "esp-vigo", "lat": 42.20354386049306, "lon": -8.881907564441319, "name": "VIGO", "topDestination": "VIGO" } } } ] } ``` -------------------------------- ### Example JSON response for Get One Vessel Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/vessels/get-one-vessel Sample response body showing combinedSourcesInfo, registryInfo, registryOwners, registryPublicAuthorizations, and selfReportedInfo fields. ```json { "combinedSourcesInfo": [ { "geartypes": [ { "name": "OTHER", "source": "GFW_OTHER_LIST", "yearFrom": "2012", "yearTo": "2023" }, { "name": "GEAR", "source": "GFW_FISHING_LIST", "yearFrom": "2013", "yearTo": "2023" } ], "inferredVesselClassAgNnet": [ { "source": "AIS_INFERRED_NN_INFO", "value": "TUNA_PURSE_SEINES", "yearFrom": 2012, "yearTo": 2025 } ], "onFishingListSr": [ { "source": "GFW_VESSEL_LIST", "value": true, "yearFrom": 2012, "yearTo": 2025 } ], "prodGeartypeSource": [ { "source": "COMBINATION_OF_REGISTRY_AND_AIS_INFERRED_NN_INFO", "value": "GFW_RESEARCH_VI_SSVID_BEST_VESSEL_CLASS", "yearFrom": 2012, "yearTo": 2025 } ], "registryVesselClass": [ { "source": "REGISTRY", "value": "OTHER_FISHING|PURSE_SEINES", "yearFrom": 2012, "yearTo": 2025 } ], "shiptypes": [ { "name": "OTHER", "source": "GFW_OTHER_LIST", "yearFrom": "2012", "yearTo": "2023" }, { "name": "FISHING", "source": "GFW_FISHING_LIST", "yearFrom": "2013", "yearTo": "2023" } ], "vesselId": "SINAR LAUTAN ABADI" } ], "dataset": "proto-global-vessel-identity:latest", "registryExtraFields": [ {} ], "registryInfo": [ { "callsign": "Y4EO", "extraFields": [ {} ], "flag": "DEU", "geartypes": [ "trawlers" ], "id": "9e075a986-6162-fe6e-b25e-81188438a00c", "imo": null, "latestVesselInfo": true, "lengthM": 26.4, "nShipname": "STERNHAI", "shipname": "STERNHAI", "ssvid": "211307720", "tonnageGt": 121, "transmissionDateFrom": "2012-05-25 15:16:29 UTC", "transmissionDateTo": "2014-06-30 08:51:05 UTC", "vesselInfoReference": "3023ab41b367d8f2d62d2a60c67c711f" } ], "registryInfoTotalRecords": 3, "registryOwners": [ { "dateFrom": "2014-06-30T00:00:00Z", "dateTo": "2015-09-30T00:00:00Z", "flag": "IDN", "name": "SINAR LAUTAN ABADI", "sourceCode": "IDN-1104", "ssvid": "211307720" } ], "registryPublicAuthorizations": [ { "dateFrom": "2012-05-25T00:00:00Z", "dateTo": "2014-06-30T00:00:00Z", "sourceCode": "IDN-1104", "ssvid": "211307720" } ], "selfReportedInfo": { "callsign": "Y4EO", "flag": "DEU", "id": "9e075a986-6162-fe6e-b25e-81188438a00c", "imo": null, "messagesCounter": 1284, "nShipname": "STERNHAI", "positionsCounter": 894, "shipname": "STERNHAI", "sourceCode": [ "AIS" ], "ssvid": "211307720", "transmissionDateFrom": "2012-05-25 15:16:29 UTC", "transmissionDateTo": "2014-06-30 08:51:05 UTC" } } ``` -------------------------------- ### MPA List Response Example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions Example JSON response from the MPA list endpoint, showing label and id fields. ```json [ { "label": "Diamond Reef and Salt Fish Tail Reef - Marine Reserve", "id": "1" }, { "label": "Palaster Reef - Marine Reserve", "id": "2" }, { "label": "Folkstone - Marine Reserve", "id": "27" }, { "label": "Reserva Biológica Atol Das Rocas - Reserva Biológica", "id": "46" }, { "label": "Great Barrier Reef Marine Park", "id": "555394" }, { "label": "Papahānaumokuākea Marine National Monument", "id": "555428" }, { ... } ] ``` -------------------------------- ### EEZ List Response Example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/datasets/regions Example JSON response from the EEZ list endpoint, showing fields like label, id, iso3, isoSov1, isoSov2, isoSov3, and territory1. ```json [ { "label": "Jordanian Exclusive Economic Zone", "id": 8491, "iso3": "JOR", "isoSov1": "JOR", "isoSov2": null, "isoSov3": null, "territory1": "Jordan" }, { "label": "Overlapping claim Kuril Islands: Japan / Russia", "id": 48950, "iso3": null, "isoSov1": "JPN", "isoSov2": "RUS", "isoSov3": null, "territory1": "Kuril Islands" }, { "label": "Joint regime area: Costa Rica / Ecuador (Galapagos)", "id": 48968, "iso3": null, "isoSov1": "CRI", "isoSov2": "ECU", "isoSov3": null, "territory1": "Costa Rica" }, { "label": "Overlapping claim: Colombia / Dominican Republic / Venezuela", "id": 48971, "iso3": null, "isoSov1": "COL", "isoSov2": "DOM", "isoSov3": "VEN", "territory1": "Colombia" }, { "label": "French Exclusive Economic Zone (French Polynesia)", "id": 8440, "iso3": "PYF", "isoSov1": "FRA", "isoSov2": null, "isoSov3": null, "territory1": "French Polynesia" }, { ... } ] ``` -------------------------------- ### Install gfwr from R-universe Source: https://globalfishingwatch.org/our-apis/documentation/docs/sdks/gfwr.md Install the stable version of gfwr from the Global Fishing Watch R-universe repository, which includes CRAN as a fallback. ```r install.packages("gfwr", repos = c("https://globalfishingwatch.r-universe.dev", "https://cran.r-project.org")) ``` -------------------------------- ### 200 Response example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/4wings/stats Example successful response (200) from the stats endpoint, containing an array with activityHours, flags, maxLat, maxLon, minLat, minLon, and vesselIds fields. ```json [ { "activityHours": 0, "flags": 0, "maxLat": 0, "maxLon": 0, "minLat": 0, "minLon": 0, "vesselIds": 0 } ] ``` -------------------------------- ### Successful response for get event by ID Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-one-event.md Example JSON response returned when the request is successful. Contains event details such as start/end times, position, regions, vessel, and port visit information. ```json { "start": "2020-01-26T05:52:47.000Z", "end": "2020-01-29T14:39:33.000Z", "id": "c2f0967e061f99a01793edac065de003", "type": "port_visit", "position": { "lat": 20.8374, "lon": -17.0161 }, "regions": { "mpa": [], "eez": ["8369"], "rfmo": ["IWC", "NAMMCO", "ACAP", "ICCAT", "SRFC"], "fao": ["34.1", "34.1.32", "34.1.3", "34"], "majorFao": ["34"], "eez12Nm": [], "highSeas": [], "mpaNoTakePartial": [], "mpaNoTake": [] }, "boundingBox": [-17.0147743934, 20.7287971969, -17.0301185356, 20.8284907611], "distances": { "startDistanceFromShoreKm": 7, "endDistanceFromShoreKm": 2, "startDistanceFromPortKm": 0, "endDistanceFromPortKm": 0 }, "vessel": { "id": "8c7304226-6c71-edbe-0b63-c246734b3c01", "name": "FRIOFORWIN", "ssvid": "210631000" }, "port_visit": { "visitId": "54a297966f51994d8bad91ba58945f8c", "confidence": 4, "durationHrs": 80.77944444444445, "startAnchorage": { "anchorageId": "0ea1bbe7", "atDock": false, "distanceFromShoreKm": 7, "flag": "MRT", "id": "mrt-cansado", "lat": 20.72879719687954, "lon": -17.014774393446658, "name": "CANSADO", "topDestination": "NOUADHIBOU" }, "intermediateAnchorage": { "anchorageId": "0ea1b6ad", "atDock": false, "distanceFromShoreKm": 4, "flag": "MRT", "id": "mrt-nouadhibou", "lat": 20.885489104200627, "lon": -17.003218026679036, "name": "NOUADHIBOU", "topDestination": "NOUADHIBOU" }, "endAnchorage": { "anchorageId": "0ea1b0c3", "atDock": true, "distanceFromShoreKm": 2, "flag": "MRT", "id": "mrt-cansado", "lat": 20.828490761089796, "lon": -17.030118535609358, "name": "CANSADO", "topDestination": "NOUADHIBOU" } } } ``` -------------------------------- ### Paginated response example Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/general-api-doc/pagination Example of a paginated JSON response from the GFW API, showing metadata, limit, offset, nextOffset, total, and entries array. ```json { "metadata": { "datasets": ["public-global-fishing-events:v3.0"], "vessels": ["9b3e9019d-d67f-005a-9593-b66b997559e5"], "dateRange": { "from": "2017-01-01", "to": "2017-01-31" } }, "limit": 1, "offset": 0, "nextOffset": 1, "total": 10, "entries": [ // ...list of resources ] } ``` -------------------------------- ### GET /v3/bulk-reports/{id}/query Source: https://globalfishingwatch.org/our-apis/documentation/docs/examples/bulk-download/get-json-example1.md Queries a bulk report by its ID and returns the data as JSON. Supports pagination via limit and offset parameters, and sorting via the sort parameter. The example sorts by structure start date descending. ```APIDOC ## GET /v3/bulk-reports/{id}/query ### Description Queries a bulk report by its ID and returns the data as JSON. Supports pagination via limit and offset parameters, and sorting via the sort parameter. The example sorts by structure start date descending. ### Method GET ### Endpoint https://gateway.api.globalfishingwatch.org/v3/bulk-reports/{id}/query ### Parameters #### Path Parameters - **id** (string) - Required - ID of the bulk report to query #### Query Parameters - **limit** (integer) - Optional - Maximum number of records to return - **offset** (integer) - Optional - Number of records to skip - **sort** (string) - Optional - Sort by structure start date, descending (e.g., -structure_start_date) ### Request Example ```shell curl --location 'https://gateway.api.globalfishingwatch.org/v3/bulk-reports/adbb9b62-5c08-4142-82e0-b2b575f3e058/query?limit=2&offset=0&sort=-structure_start_date' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer TOKEN' ``` ### Response #### Success Response (200) - **metadata** (object) - Metadata about the response - **limit** (integer) - The limit used for the query - **offset** (integer) - The offset used for the query - **nextOffset** (integer) - The next offset for pagination - **total** (integer) - Total number of records available - **entries** (array) - List of records - **detection_id** (string) - Unique identifier for the detection - **detection_date** (string) - Date of detection - **structure_id** (string) - Identifier of the structure - **lon** (number) - Longitude coordinate - **lat** (number) - Latitude coordinate - **structure_start_date** (string) - Start date of the structure - **structure_end_date** (string or null) - End date of the structure - **label** (string) - Label of the structure (e.g., oil) - **label_confidence** (string) - Confidence level of the label (e.g., low, high) #### Response Example ```json { "metadata": {}, "limit": 2, "offset": 0, "nextOffset": 2, "total": 43, "entries": [ { "detection_id": "S1AB_AD_MEDIAN_COMP_20240201T000000_20240801T000000_FULL_41_TILE_154;-65.0214080;-42.736182", "detection_date": "2024-05-01", "structure_id": "1054536", "lon": -65.02140773749714, "lat": -42.73618183211688, "structure_start_date": "2024-05-01", "structure_end_date": "2024-05-01", "label": "oil", "label_confidence": "low" }, { "detection_id": "S1AB_AD_MEDIAN_COMP_20240501T000000_20241101T000000_FULL_23_TILE_332;-67.3234300;-53.089715", "detection_date": "2024-08-01", "structure_id": "1051638", "lon": -67.32289149541135, "lat": -53.0895574340617, "structure_start_date": "2024-02-01", "structure_end_date": null, "label": "oil", "label_confidence": "high" } ] } ``` ``` -------------------------------- ### cURL request to get last report Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/4wings/last-report Example cURL command to call the GET /v3/4wings/last-report endpoint. Requires an Authorization header with a Bearer token. ```bash curl -X GET "https://example.com/v3/4wings/last-report" ``` -------------------------------- ### cURL request to get vessels Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/vessels/get-vessels Example cURL command to fetch vessel data using the GET /v3/vessels endpoint. Requires an API key for authorization. ```bash curl -X GET "https://example.com/v3/vessels?datasets=public-global-fishing-vessels%3Alatest&datasets=public-global-carrier-vessels%3Alatest&ids=6583c51e3-3626-5638-866a-f47c3bc7ef7c" ``` -------------------------------- ### GET /api/v3/events Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-all-events.md Retrieves all events using the GET method. Examples are available for apparent fishing events, encounter events, loitering events, and port visits. ```APIDOC ## GET /api/v3/events ### Description Retrieves all events using the GET method. Examples are available for apparent fishing events, encounter events, loitering events, and port visits. ### Method GET ### Endpoint /api/v3/events ### Parameters No parameters are explicitly documented in the source. ### Request Example No request example is provided in the source. ### Response #### Success Response (200) No response fields are explicitly documented in the source. #### Response Example No response example is provided in the source. ``` -------------------------------- ### Sample JSON response from bulk report query Source: https://globalfishingwatch.org/our-apis/documentation/docs/examples/bulk-download/get-json-example1.md Example response returned by the API for the query. It shows the metadata, limit, offset, nextOffset, total, and entries array with detection details. ```shell { "metadata": {}, "limit": 2, "offset": 0, "nextOffset": 2, "total": 43, "entries": [ { "detection_id": "S1AB_AD_MEDIAN_COMP_20240201T000000_20240801T000000_FULL_41_TILE_154;-65.0214080;-42.736182", "detection_date": "2024-05-01", "structure_id": "1054536", "lon": -65.02140773749714, "lat": -42.73618183211688, "structure_start_date": "2024-05-01", "structure_end_date": "2024-05-01", "label": "oil", "label_confidence": "low" }, { "detection_id": "S1AB_AD_MEDIAN_COMP_20240501T000000_20241101T000000_FULL_23_TILE_332;-67.3234300;-53.089715", "detection_date": "2024-08-01", "structure_id": "1051638", "lon": -67.32289149541135, "lat": -53.0895574340617, "structure_start_date": "2024-02-01", "structure_end_date": null, "label": "oil", "label_confidence": "high" } ] } ``` -------------------------------- ### Successful response with download URL Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/bulk-download/download-file Example 200 response containing the signed URL in the 'url' field. The URL points to a downloadable file hosted on Global Fishing Watch's cloud infrastructure. ```json { "url": "https://example.com/download-file" } ``` -------------------------------- ### Response with signed download URL Source: https://globalfishingwatch.org/our-apis/documentation/docs/examples/bulk-download/download-file-example1.md Example JSON response from the download-file-url endpoint. The url field contains a temporary signed URL to download the README file. ```shell { "url": "https://storage.googleapis.com/api-bulk-release-us-central1/adbb9b62-5c08-4142-82e0-b2b575f3e058/README.md?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=896869274290-compute%40developer.gserviceaccount.com%2F20250627%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20250627T110204Z&X-Goog-Expires=60&X-Goog-SignedHeaders=host&X-Goog-Signature=2b7ed1b82af29747bfe00d2abf745a2d20f6909c4548f1aeebc8f2f51e0be335872622423ee888b25daad93cb4871bc398f4c1ec279febaaf2cf16197ba3044f0d28443c05d197e46cddfcfac3401958fb87efc3d04c9ea9761dbff6567bf53a7ec634a44425e1160ad31552e7126b257441fc047ceb95a11e167620cb8b99232942afa28c08a5c414981dbef3681ee3868d1df7655d2c6a6c5123f9db3a27a73d15cd976d7508bac8de9c5bc865e6ed55dd62805b0f2a87c494484a60e521335af80711f7fce207fe25db54d5fd7efedbf46aa4119d0d539d995a575e758079ba771b07a7ed6e8fe93dfaaefbc519d45855b1f44df21307bb0ecc036f7bd36b" } ``` -------------------------------- ### cURL request to get one event Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/events/get-one-event Example cURL command to fetch an event by ID using the public-global-fishing-events dataset. ```bash curl -X GET "https://example.com/api/v3/events/string?dataset=public-global-fishing-events%3Alatest" ``` -------------------------------- ### Get vessel by ID - Response Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/vessels/get-one-vessel.md Example JSON response returned when the request is successful. It includes vessel identity and self-reported information. ```json { "dataset": "public-global-vessel-identity:v20230623", "registryInfoTotalRecords": 0, "registryInfo": [], "registryOwners": [], "registryAuthorizations": [], "selfReportedInfo": [ { "id": "c54923e64-46f3-9338-9dcb-ff09724077a3", "ssvid": "775998121", "shipname": "DON TITO", "nShipname": "DONTITO", "flag": "VEN", "callsign": "YD23136", "imo": null, "geartype": null, "shiptype": "OTHER_NON_FISHING", "messagesCounter": 1103, "positionsCounter": 430, "shiptypesByYear": [ { "shiptype": "OTHER_NON_FISHING", "years": [2021, 2022, 2023] } ], "sourceCode": ["AIS"], "matchFields": "NO_MATCH", "transmissionDateFrom": "2021-08-06T10:49:26Z", "transmissionDateTo": "2023-09-21T14:52:16Z" } ] } ``` -------------------------------- ### Successful response with entries and pagination Source: https://globalfishingwatch.org/our-apis/documentation/docs/v3/bulk-download/query-bulk-report Example 200 response showing the structure of a successful query result, including entries, limit, metadata, nextOffset, offset, and total. ```JSON { "entries": [ {} ], "limit": 10, "metadata": {}, "nextOffset": 10, "offset": 0, "total": 152} ```