{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Tracking API, Vizion Milestones, ETAs and Positions",
    "description": "Track ocean containers through the Vizion API: latest status, carrier ETA and Vizion predictive ETA, every milestone across ocean, terminal and Class I rail, vessel traces, last known positions, transit schedules, risk briefs and port dwell metrics. Read only. Bring your own key.",
    "version": "0.1",
    "x-build-id": "5a5zRrwZZJLAA1QFI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~container-tracking-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-container-tracking-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~container-tracking-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-container-tracking-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~container-tracking-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-container-tracking-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": [
              "shipmentStatus",
              "milestoneEvents",
              "lifecycleEvents",
              "containerTrace",
              "listReferences",
              "lastKnownPositions",
              "transitSchedules",
              "riskBriefs",
              "riskBriefShipments",
              "portPerformance",
              "carriers"
            ],
            "type": "string",
            "description": "Container shipment status: one row per tracked container with origin and destination ports, carrier ETA, Vizion predictive ETA, actual arrival, latest milestone and vessel, from its most recent update. Container milestone events: one row per milestone across ocean, terminal and rail. Reference lifecycle events, Container vessel trace (Pro tier) and Last known container positions (Pro tier). Tracked references lists what your account tracks. Point to point transit schedules, Supply chain risk briefs, Shipments affected by a risk brief, Port and location performance and Supported carriers. Every call is a read only GET, which Vizion does not bill.",
            "default": "shipmentStatus"
          },
          "containerIds": {
            "title": "Container numbers",
            "type": "array",
            "description": "Container status, milestone, lifecycle and trace modes. One ISO 6346 container number per line, such as MRKU3252720. The container must already be tracked as a reference in your Vizion account; this actor never creates references.",
            "items": {
              "type": "string"
            }
          },
          "billsOfLading": {
            "title": "Bills of lading",
            "type": "array",
            "description": "Container status, milestone, lifecycle and trace modes. One master bill of lading number per line. Every container reference under it is read.",
            "items": {
              "type": "string"
            }
          },
          "bookingNumbers": {
            "title": "Booking numbers",
            "type": "array",
            "description": "Container status, milestone, lifecycle and trace modes. One carrier booking number per line. Every container reference under it is read.",
            "items": {
              "type": "string"
            }
          },
          "referenceIds": {
            "title": "Vizion reference IDs",
            "type": "array",
            "description": "Container status, milestone, lifecycle and trace modes. One Vizion reference UUID per line, as returned by the Tracked references mode or your own integration.",
            "items": {
              "type": "string"
            }
          },
          "searchInactive": {
            "title": "Also search inactive references",
            "type": "boolean",
            "description": "Container status, milestone, lifecycle and trace modes. When no active reference matches a container, bill of lading or booking, also look among inactive (completed or unsubscribed) references.",
            "default": true
          },
          "includePlanned": {
            "title": "Include planned milestones",
            "type": "boolean",
            "description": "Container milestone events only. Keeps estimated milestones (ETAs, ETDs and the Vizion predictive ETA) alongside actual ones.",
            "default": true
          },
          "eventTypes": {
            "title": "Lifecycle event types",
            "type": "array",
            "description": "Reference lifecycle events only, optional. Keeps only these event types, such as estimated arrival changed.",
            "items": {
              "type": "string",
              "enum": [
                "reference_created",
                "reference_deactivated",
                "reference_reactivated",
                "reference_update_created",
                "extraction_succeeded",
                "extraction_failed",
                "estimated_departure_changed",
                "estimated_arrival_changed"
              ],
              "enumTitles": [
                "Reference created",
                "Reference deactivated",
                "Reference reactivated",
                "Reference update created",
                "Extraction succeeded",
                "Extraction failed",
                "Estimated departure changed",
                "Estimated arrival changed"
              ]
            }
          },
          "eventsFrom": {
            "title": "Events from date",
            "type": "string",
            "description": "Reference lifecycle events only, optional. YYYY-MM-DD; events that occurred on or after it."
          },
          "eventsTo": {
            "title": "Events to date",
            "type": "string",
            "description": "Reference lifecycle events only, optional. YYYY-MM-DD; events that occurred on or before it."
          },
          "eventOrder": {
            "title": "Event order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Reference lifecycle events only. Sort order on the time the event occurred.",
            "default": "asc"
          },
          "includeProjected": {
            "title": "Include projected trace points",
            "type": "boolean",
            "description": "Container vessel trace only. Adds forecast vessel positions alongside actual ones when your account has the projected trace capability.",
            "default": false
          },
          "referenceState": {
            "title": "Reference state",
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Tracked references only. Active references are still being tracked; inactive ones were completed, auto unsubscribed or unsubscribed.",
            "default": "active"
          },
          "carrierCode": {
            "title": "Carrier",
            "enum": [
              "ALPJ",
              "ANNU",
              "APLU",
              "CMDU",
              "COSU",
              "EGLV",
              "HASL",
              "HDMU",
              "HLCU",
              "KMTU",
              "MAEU",
              "MATS",
              "MSCU",
              "NSRU",
              "ONEY",
              "OOCL",
              "PCIU",
              "RCLU",
              "SAFM",
              "SEAU",
              "SMLM",
              "SNKO",
              "SUDU",
              "TMGB",
              "WECU",
              "WHLC",
              "WWSU",
              "YMLU",
              "ZIMU"
            ],
            "type": "string",
            "description": "Tracked references only, optional. Keeps references of this Vizion carrier code, such as MAEU for Maersk or MSCU for MSC."
          },
          "lastUpdateStatus": {
            "title": "Last update status",
            "enum": [
              "data_received",
              "no_data",
              "extraction_failed",
              "webhook_failed",
              "duplicate_payload",
              "auto_carrier_completed",
              "auto_carrier_failed",
              "auto_carrier_not_found",
              "invalid_container",
              "invalid_bill_of_lading",
              "invalid_booking_number",
              "new_container_journey",
              "incomplete_processing",
              "container_not_on_document"
            ],
            "type": "string",
            "description": "Tracked references only, optional. Keeps references whose last update has this status, such as no data or invalid container, to find shipments that need attention."
          },
          "createdFrom": {
            "title": "Created from date",
            "type": "string",
            "description": "Tracked references only, optional. YYYY-MM-DD; references created on or after it."
          },
          "createdTo": {
            "title": "Created to date",
            "type": "string",
            "description": "Tracked references only, optional. YYYY-MM-DD; references created on or before it."
          },
          "updatedFrom": {
            "title": "Updated from date",
            "type": "string",
            "description": "Tracked references only, optional. YYYY-MM-DD; references changed on or after it. With the inactive state it lists references deactivated since then."
          },
          "updatedTo": {
            "title": "Updated to date",
            "type": "string",
            "description": "Tracked references only, optional. YYYY-MM-DD; references changed on or before it."
          },
          "tagNames": {
            "title": "Tag names",
            "type": "array",
            "description": "Tracked references only, optional. Up to 10 Vizion tag names, matched without regard to case.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active references only",
            "type": "boolean",
            "description": "Last known container positions only. Restricts the positions to active references.",
            "default": true
          },
          "lanes": {
            "title": "Lanes",
            "type": "array",
            "description": "Point to point transit schedules only. One lane per line as origin and destination UN/LOCODEs separated by \";\", such as USHOU;CNSHA or CNSHA;NLRTM.",
            "items": {
              "type": "string"
            }
          },
          "departureFrom": {
            "title": "Earliest departure",
            "type": "string",
            "description": "Point to point transit schedules only, optional. YYYY-MM-DD; Vizion defaults to today."
          },
          "departureTo": {
            "title": "Latest departure",
            "type": "string",
            "description": "Point to point transit schedules only, optional. YYYY-MM-DD; Vizion defaults to 14 days after the earliest departure."
          },
          "scheduleCarriers": {
            "title": "Schedule carriers",
            "type": "array",
            "description": "Point to point transit schedules only, optional. Keeps sailings operated by these carriers.",
            "items": {
              "type": "string",
              "enum": [
                "CMA",
                "COSCO",
                "HAPAG",
                "HMM",
                "MAERSK",
                "MATSON",
                "MSC",
                "ONE",
                "OOCL",
                "SHIPMENTLINK",
                "ZIM"
              ],
              "enumTitles": [
                "CMA CGM",
                "COSCO",
                "Hapag-Lloyd",
                "HMM",
                "Maersk",
                "Matson",
                "MSC",
                "ONE",
                "OOCL",
                "Shipmentlink (Evergreen)",
                "ZIM"
              ]
            }
          },
          "briefIds": {
            "title": "Risk brief IDs",
            "type": "array",
            "description": "Shipments affected by a risk brief only. One brief_id per line, from the Supply chain risk briefs mode.",
            "items": {
              "type": "string"
            }
          },
          "locationNamespace": {
            "title": "Location type",
            "enum": [
              "unlocode",
              "country",
              "continent",
              "region"
            ],
            "type": "string",
            "description": "Port and location performance only. How the location codes are read.",
            "default": "unlocode"
          },
          "locationCodes": {
            "title": "Locations",
            "type": "array",
            "description": "Port and location performance only. One location code per line, such as the UN/LOCODE USLAX or NLRTM, or a country code for the country type.",
            "items": {
              "type": "string"
            }
          },
          "metrics": {
            "title": "Metrics",
            "type": "array",
            "description": "Port and location performance only. One row set per location and metric.",
            "items": {
              "type": "string",
              "enum": [
                "import_dwell",
                "export_dwell",
                "berth_time",
                "arrival_to_berth",
                "import_teu",
                "export_teu",
                "average_delay"
              ],
              "enumTitles": [
                "Import dwell (days)",
                "Export dwell (days)",
                "Berth time (days)",
                "Arrival to berth (days)",
                "Import TEU",
                "Export TEU",
                "Average delay (days)"
              ]
            }
          },
          "periodStart": {
            "title": "Period start",
            "type": "string",
            "description": "Port and location performance only, required there. YYYY-MM-DD, inclusive."
          },
          "periodEnd": {
            "title": "Period end",
            "type": "string",
            "description": "Port and location performance only, required there. YYYY-MM-DD, inclusive."
          },
          "grain": {
            "title": "Grain",
            "enum": [
              "week",
              "month"
            ],
            "type": "string",
            "description": "Port and location performance only, optional. A weekly or monthly series instead of one figure for the whole period."
          },
          "compare": {
            "title": "Comparison",
            "enum": [
              "prior_period",
              "prior_year"
            ],
            "type": "string",
            "description": "Port and location performance only, optional. Adds a comparison value. Prior year cannot be combined with a grain."
          },
          "environment": {
            "title": "Vizion environment",
            "enum": [
              "production",
              "demo"
            ],
            "type": "string",
            "description": "Which Vizion environment your key and references belong to. References created in one are not visible in the other.",
            "default": "production"
          },
          "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": 600,
            "type": "integer",
            "description": "Pacing for calls to the Vizion API. Your Vizion plan sets the real ceiling.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Vizion API key. Stored as a secret and sent only to prod.vizionapi.com or demo.vizionapi.com in the X-API-Key header; 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}