{
  "openapi": "3.0.1",
  "info": {
    "title": "Vessel Tracking API - MarineTraffic AIS Ship Positions, Ports",
    "description": "AIS vessel tracking from the MarineTraffic API (Kpler): live ship positions by IMO or MMSI, fleet and area positions, historical tracks, port calls, expected port arrivals, voyage forecasts with ETA, vessel search and ship particulars. Bring your own key.",
    "version": "0.1",
    "x-build-id": "PYKo9mXC5kGa0eucd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~vessel-tracking-ais-ship-position-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-vessel-tracking-ais-ship-position-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~vessel-tracking-ais-ship-position-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-vessel-tracking-ais-ship-position-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~vessel-tracking-ais-ship-position-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-vessel-tracking-ais-ship-position-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "vesselPosition",
              "fleetPositions",
              "areaPositions",
              "vesselTrack",
              "portCalls",
              "expectedArrivals",
              "voyageForecast",
              "vesselSearch",
              "vesselParticulars"
            ],
            "type": "string",
            "description": "Each mode calls one MarineTraffic API service, and every service has its own key: use the key of the service you subscribed to. Latest vessel position reads the current AIS position and voyage of each vessel. Fleet and area positions read every vessel in the fleet or area of interest set up on your MarineTraffic account. Historical track reads past positions. Port calls reads arrivals and departures at a port or of a vessel. Expected arrivals reads vessels heading to a port. Voyage forecast reads destination and ETA. Vessel search finds vessels by name or identifier. Vessel particulars reads ship details, owner and manager.",
            "default": "vesselPosition"
          },
          "vessels": {
            "title": "Vessels",
            "type": "array",
            "description": "Vessel modes, plus port calls and vessel search. One vessel per line: IMO 9241061, MMSI 310627000, shipid 371681 (the MarineTraffic ship ID), a bare 7 digit IMO or 9 digit MMSI number, or a MarineTraffic vessel page URL.",
            "items": {
              "type": "string"
            }
          },
          "vesselNames": {
            "title": "Vessel names",
            "type": "array",
            "description": "Vessel search only. Full or partial vessel names, at least 3 characters each. MarineTraffic returns up to 100 active vessels per name, exact matches first.",
            "items": {
              "type": "string"
            }
          },
          "ports": {
            "title": "Ports",
            "type": "array",
            "description": "Port calls and Expected arrivals. MarineTraffic port IDs (the number in the port page URL on marinetraffic.com, such as 1766 for Amsterdam). Port calls also take UN/LOCODEs such as NLAMS.",
            "items": {
              "type": "string"
            }
          },
          "timespan": {
            "title": "Timespan (minutes)",
            "minimum": 1,
            "maximum": 2880,
            "type": "integer",
            "description": "Position modes: how far back to look for each vessel's latest position, up to 1440 minutes (empty means 60). Port calls without dates: the maximum age of the calls, up to 2880 minutes (empty means 1440, the last 24 hours)."
          },
          "days": {
            "title": "Track days",
            "minimum": 1,
            "maximum": 190,
            "type": "integer",
            "description": "Historical track only. Days back from now to read positions for, up to 190. Ignored when a from and to date are given. Empty means 1."
          },
          "fromDate": {
            "title": "From date (UTC)",
            "type": "string",
            "description": "Historical track, Port calls and Expected arrivals. Start of the window as YYYY-MM-DD or YYYY-MM-DD HH:MM in UTC. Set together with the to date; at most 190 days apart. Tracks and port calls go back to January 2015; expected arrivals look forward."
          },
          "toDate": {
            "title": "To date (UTC)",
            "type": "string",
            "description": "End of the window, in the same format as the from date."
          },
          "daysAhead": {
            "title": "Days ahead",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Expected arrivals only. Days into the future to look for expected arrivals, up to 40. Leave this and the dates empty to get the vessels currently in port."
          },
          "trackPeriod": {
            "title": "Track resolution",
            "enum": [
              "all",
              "hourly",
              "daily"
            ],
            "type": "string",
            "description": "Historical track only. Hourly and daily keep the first position received in each hour or day, which keeps long tracks small.",
            "default": "all"
          },
          "moveType": {
            "title": "Arrivals or departures",
            "enum": [
              "both",
              "arrivals",
              "departures"
            ],
            "type": "string",
            "description": "Port calls only.",
            "default": "both"
          },
          "excludeInTransit": {
            "title": "Exclude vessels in transit",
            "type": "boolean",
            "description": "Port calls only. Leave out vessels that only passed through the port.",
            "default": false
          },
          "shipType": {
            "title": "Ship type",
            "enum": [
              "2",
              "4",
              "6",
              "7",
              "8"
            ],
            "type": "string",
            "description": "Expected arrivals and Vessel search. Leave empty for all types."
          },
          "vesselTypeIds": {
            "title": "Vessel type IDs",
            "type": "array",
            "description": "Fleet and area positions only. MarineTraffic vessel type IDs to keep (see the MarineTraffic ship types article). Leave empty for all vessels.",
            "items": {
              "type": "string"
            }
          },
          "fromPort": {
            "title": "Previous port",
            "type": "string",
            "description": "Expected arrivals only. Only vessels coming from this port: a MarineTraffic port ID such as 106, or a UN/LOCODE such as GBSOU."
          },
          "dwtMin": {
            "title": "Minimum DWT",
            "minimum": 0,
            "type": "integer",
            "description": "Port calls and Expected arrivals. Minimum deadweight tonnage (IMO registered vessels). Expected arrivals need the minimum and maximum together."
          },
          "dwtMax": {
            "title": "Maximum DWT",
            "minimum": 0,
            "type": "integer",
            "description": "Port calls and Expected arrivals. Maximum deadweight tonnage."
          },
          "gtMin": {
            "title": "Minimum GT",
            "minimum": 0,
            "type": "integer",
            "description": "Port calls and Expected arrivals. Minimum gross tonnage (IMO registered vessels). Expected arrivals need the minimum and maximum together."
          },
          "gtMax": {
            "title": "Maximum GT",
            "minimum": 0,
            "type": "integer",
            "description": "Port calls and Expected arrivals. Maximum gross tonnage."
          },
          "extended": {
            "title": "Extended response",
            "type": "boolean",
            "description": "Historical track (adds wind, wave, swell and current weather), Port calls (adds draught, load status and voyage data since the previous call), Expected arrivals (adds vessel particulars), Voyage forecast (adds distances, load condition and route) and Vessel particulars (adds engine, class, hull and owner contact details). Your service must include the extended response, and MarineTraffic often allows fewer extended calls.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pacing. Your MarineTraffic contract sets how many calls each service key may make per period (often only a few per minute), and every key is capped at 100 calls a minute. A call limit answer is waited out and retried.",
            "default": 6
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own MarineTraffic service key (40 hexadecimal characters) for the service this mode reads, from the API Services page of your marinetraffic.com account. Stored as a secret and sent only to services.marinetraffic.com, in the URL path the API requires; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}