Global Fishing Watch API
Examples4Wings PNG Tiles

Filtering by vessel type (cargo and carrier vessels)

Example 4Wings PNG style request for AIS vessel presence, filtered to cargo and carrier vessels.

Query parameters

ParameterValueDescription
intervalDAYDaily temporal resolution
datasets[0]public-global-presence:latestAIS vessel presence dataset
filters[0]vessel_type in ("cargo","carrier")Filter to cargo and carrier vessels
date-range2020-01-01,2020-01-31Filter to January 2020

Request

# Make sure to replace [TOKEN] with your API Access Token.
curl --location --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/generate-png?interval=DAY&datasets[0]=public-global-presence:latest&filters[0]=vessel_type%20in%20(%22cargo%22,%22carrier%22)&date-range=2020-01-01,2020-01-31' \
  -H "Authorization: Bearer [TOKEN]"

Response

{
  "colorRamp": {
    "stepsByZoom": {
      "0": [
        {
          "color": "rgba(34,139,34,25)",
          "value": 78
        },
        {
          "color": "rgba(34,139,34,102)",
          "value": 456
        },
        {
          "color": "rgba(34,139,34,255)",
          "value": 2134
        },
        {
          "color": "rgba(34,139,34,0)",
          "value": 0
        },
        {
          "color": "rgba(34,139,34,76)",
          "value": 234
        },
        {
          "color": "rgba(34,139,34,127)",
          "value": 789
        },
        {
          "color": "rgba(34,139,34,153)",
          "value": 1123
        },
        {
          "color": "rgba(34,139,34,178)",
          "value": 1567
        },
        {
          "color": "rgba(34,139,34,51)",
          "value": 134
        }
      ]
    }
  },
  "url": "https://gateway.api.globalfishingwatch.org/v3/4wings/tile/heatmap/{z}/{x}/{y}?format=PNG&interval=DAY&datasets[0]=public-global-presence:latest&filters[0]=vessel_type in (\"cargo\",\"carrier\")&date-range=2020-01-01,2020-01-31&style=eyJjb2xvciI6WzM0LDEzOSwzNF0sInJhbXAiOlswLDc4LDEzNCwyMzQsNDU2LDc4OSwxMTIzLDE1NjcsMjEzNF19"
}