{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Tracking API, Sinay Vessel ETA, Port Congestion, CO2",
    "description": "Track containers, bills of lading and bookings across 170+ shipping lines with the Sinay API: status, POL, POD, ETA, events, vessel and AIS position. Plus port congestion, berth occupation, vessels in port, vessel ETA prediction, voyage CO2 per TEU and underwater noise. Bring your own key.",
    "version": "0.1",
    "x-build-id": "tjBEwYnbGz2iDJZY7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~container-vessel-eta-port-congestion-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-container-vessel-eta-port-congestion-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-vessel-eta-port-congestion-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-container-vessel-eta-port-congestion-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-vessel-eta-port-congestion-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-container-vessel-eta-port-congestion-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": [
              "shipments",
              "containerEvents",
              "sealines",
              "portSearch",
              "portOccupation",
              "vesselsInPort",
              "portCongestion",
              "vesselEta",
              "co2Emissions",
              "underwaterNoise"
            ],
            "type": "string",
            "description": "Container shipments: one row per container, bill of lading or booking with carrier, status, POL, POD, ETA, vessel and AIS position. Container events: one row per milestone of each container. Supported shipping lines lists the carriers and SCAC codes. Port search finds ports by name or UN/LOCODE. Port berth occupation, Vessels in port and Port congestion read port intelligence by UN/LOCODE. Vessel ETA prediction, Voyage CO2 emissions and Underwater radiated noise compute a figure for a vessel between two ports. Nothing in your Sinay account is created or changed.",
            "default": "shipments"
          },
          "shipmentNumbers": {
            "title": "Container, bill of lading or booking numbers",
            "type": "array",
            "description": "Container shipments and Container events. One container number, bill of lading or booking number per line. ZZZZ0000000 is Sinay's free sandbox shipment (Le Havre to Rotterdam) for testing at no cost.",
            "items": {
              "type": "string"
            }
          },
          "sealine": {
            "title": "Sealine SCAC",
            "type": "string",
            "description": "Container shipments and Container events, optional. The carrier's 4 letter SCAC code, such as MAEU, MSCU or ONEY. Sinay detects the carrier when it is empty, but giving it is faster and avoids a wrong detection. Applies to every number in the run."
          },
          "shipmentType": {
            "title": "Number type",
            "enum": [
              "CT",
              "BL",
              "BK"
            ],
            "type": "string",
            "description": "Container shipments and Container events, optional. Leave empty to let Sinay detect it. Applies to every number in the run."
          },
          "includeRoute": {
            "title": "Include route segments",
            "type": "boolean",
            "description": "Container shipments and Container events. Asks Sinay for the route segments and the current position. Turning it off makes answers faster.",
            "default": true
          },
          "includeAis": {
            "title": "Include AIS vessel data",
            "type": "boolean",
            "description": "Container shipments and Container events. Asks Sinay for the vessel's latest AIS position, last event and ports. Works only with the route.",
            "default": true
          },
          "portQueries": {
            "title": "Port names or UN/LOCODEs to search",
            "type": "array",
            "description": "Port search only. One port name (such as Le Havre) or UN/LOCODE (such as FRLEH) per line.",
            "items": {
              "type": "string"
            }
          },
          "portCodes": {
            "title": "Port UN/LOCODEs",
            "type": "array",
            "description": "Port berth occupation, Vessels in port and Port congestion. One 5 character UN/LOCODE per line, such as FRLEH, NLRTM or SGSIN.",
            "items": {
              "type": "string"
            }
          },
          "vesselImos": {
            "title": "Vessel IMO numbers",
            "type": "array",
            "description": "Vessel ETA prediction, Voyage CO2 emissions and Underwater radiated noise. One 7 digit IMO number per line; each vessel is computed for the ports below.",
            "items": {
              "type": "string"
            }
          },
          "vesselMmsis": {
            "title": "Vessel MMSI numbers",
            "type": "array",
            "description": "Same modes, optional. One 9 digit MMSI per line, for vessels you know by MMSI rather than IMO.",
            "items": {
              "type": "string"
            }
          },
          "departurePort": {
            "title": "Departure port UN/LOCODE",
            "type": "string",
            "description": "Required for Voyage CO2 emissions and Underwater radiated noise, optional for Vessel ETA prediction. When it is empty, the ETA starts from the vessel's latest AIS position."
          },
          "arrivalPort": {
            "title": "Arrival port UN/LOCODE",
            "type": "string",
            "description": "Vessel ETA prediction, Voyage CO2 emissions and Underwater radiated noise. The port to compute the voyage to, such as ESBCN."
          },
          "departureDate": {
            "title": "Departure date and time",
            "type": "string",
            "description": "Vessel ETA prediction only, optional, and only with a departure port. ISO 8601, such as 2026-11-02T08:00:00Z; a plain date means midnight UTC. Sinay uses the current time when it is empty."
          },
          "speedKnots": {
            "title": "Average speed in knots",
            "minimum": 0.1,
            "maximum": 25,
            "type": "number",
            "description": "Vessel ETA prediction and Voyage CO2 emissions, optional. A custom average speed, at most 25 knots. Sinay's routing estimates it when empty."
          },
          "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": 60,
            "type": "integer",
            "description": "Pacing for calls to the Sinay API, which allows 10 requests per 10 seconds per key.",
            "default": 50
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Sinay API key from app.safecube.ai/api/credentials. Stored as a secret and sent only to api.sinay.ai in the 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}