{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Tracking API, Portcast Predictive ETA and Vessels",
    "description": "Read ocean container tracking from your Portcast account: predicted and carrier ETAs, milestones, AIS vessel position, container route, delay risks, terminal last free day and holds, vessel tracking, port congestion, sailing schedules and 100+ carrier SCACs. Read only. Bring your own key.",
    "version": "0.1",
    "x-build-id": "ScAJ9BYGGfcfEyfiz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~container-tracking-predictive-eta-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-container-tracking-predictive-eta-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-predictive-eta-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-container-tracking-predictive-eta-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-predictive-eta-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-container-tracking-predictive-eta-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": [
              "containers",
              "containerEvents",
              "containerRoute",
              "containerRisks",
              "terminalData",
              "vesselTracking",
              "portCongestion",
              "sailingSchedules",
              "carriers"
            ],
            "type": "string",
            "description": "Container tracking: one row per tracked container with carrier, ports, scheduled, Portcast predicted and actual ETA, vessel and AIS position. Container milestone events: one row per milestone. Container route, Container risks and Container terminal data read the add-on APIs for each container. Vessel tracking reads vessel bookmarks. Port congestion and Sailing schedules work on ports. Supported carriers lists every carrier SCAC. This actor never uploads containers, so it never creates a billable Portcast bookmark.",
            "default": "containers"
          },
          "containerNumbers": {
            "title": "Container numbers",
            "type": "array",
            "description": "Container modes, optional. One ISO 6346 container number per line. It must already be tracked in your Portcast account; this actor never starts tracking. Leave all three container inputs empty in Container tracking to list every tracked container.",
            "items": {
              "type": "string"
            }
          },
          "billOfLadingNumbers": {
            "title": "Bill of lading or booking numbers",
            "type": "array",
            "description": "Container modes, optional. One bill of lading or booking number per line; every tracked container under it is returned.",
            "items": {
              "type": "string"
            }
          },
          "bookmarkIds": {
            "title": "Bookmark IDs",
            "type": "array",
            "description": "Container modes, optional. One Portcast Bill of Lading Bookmark ID per line, read directly.",
            "items": {
              "type": "string"
            }
          },
          "carrierScac": {
            "title": "Carrier SCAC",
            "type": "string",
            "description": "Container modes, optional. One carrier SCAC such as CMDU or MSCU; narrows the container and bill of lading lookups, or the full listing, to that carrier."
          },
          "enterpriseCustomer": {
            "title": "Enterprise customer",
            "type": "string",
            "description": "Container modes, optional, for Portcast enterprise accounts only. The customer name that says which organisation to read tracking data from (sent as the x-customer header)."
          },
          "vesselBookmarkIds": {
            "title": "Vessel bookmark IDs",
            "type": "array",
            "description": "Vessel tracking only. One Portcast Vessel Bookmark ID per line, as the Portcast web app or a vessel upload gives it.",
            "items": {
              "type": "string"
            }
          },
          "portCodes": {
            "title": "Port codes",
            "type": "array",
            "description": "Port congestion only. One port UN/LOCODE per line.",
            "items": {
              "type": "string"
            }
          },
          "congestionSeries": {
            "title": "Congestion series",
            "enum": [
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "Port congestion only. Which of the two series Portcast returns to put one row each.",
            "default": "weekly"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Port congestion and Sailing schedules, optional. YYYY-MM-DD. Congestion defaults to 60 days ago; sailings depart (or arrive) on or after it."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Port congestion and Sailing schedules, optional. YYYY-MM-DD. Congestion defaults to today; sailings depart (or arrive) on or before it."
          },
          "originPort": {
            "title": "Origin port",
            "type": "string",
            "description": "Sailing schedules, required there. Origin port UN/LOCODE, for example NLRTM."
          },
          "destinationPort": {
            "title": "Destination port",
            "type": "string",
            "description": "Sailing schedules, required there. Destination port UN/LOCODE, for example CNSHA."
          },
          "sailingDateBasis": {
            "title": "Sailing dates refer to",
            "enum": [
              "departure",
              "arrival"
            ],
            "type": "string",
            "description": "Sailing schedules only. Whether Date from and Date to bound the departure or the arrival of each sailing.",
            "default": "departure"
          },
          "sailingCarriers": {
            "title": "Sailing carriers",
            "type": "array",
            "description": "Sailing schedules, optional. Carrier SCACs to include; leave empty for every covered carrier.",
            "items": {
              "type": "string"
            }
          },
          "transshipments": {
            "title": "Transshipments",
            "type": "array",
            "description": "Sailing schedules, optional. Keeps sailings with these transshipment counts; leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2"
              ],
              "enumTitles": [
                "Direct",
                "One transshipment",
                "Two transshipments"
              ]
            }
          },
          "nearbyOrigins": {
            "title": "Include ports near the origin",
            "type": "boolean",
            "description": "Sailing schedules only. Also returns sailings from ports near the origin port.",
            "default": false
          },
          "nearbyDestinations": {
            "title": "Include ports near the destination",
            "type": "boolean",
            "description": "Sailing schedules only. Also returns sailings to ports near the destination port.",
            "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": 120,
            "type": "integer",
            "description": "Pacing for calls to the Portcast API. Portcast sets no limit on reads, but asks to be told about unusually high volumes.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Portcast organisation API key from the profile page of the Portcast web app (app.portcast.io/profile). Stored as a secret and sent only to api.portcast.io 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}