Port congestion
Congestion and dwell for a port, or the congestion leaderboard.
Counted: 1 call for each answer that carries data. Free: an answer with nothing in it (no reading for the port, or an empty leaderboard), and any refusal or error. See how calls are counted.
Query parameters
Port UN/LOCODE. Omit for the leaderboard.
Leaderboard only: mild, moderate or severe. Ignored when port is set, and an unrecognised value returns the unfiltered leaderboard rather than an error.
Leaderboard only: rows to return. Default 100, maximum 500.
Response schema
6 fields
Derived from the example response, nested as the JSON is.
Whether the request succeeded.
data
The payload. Everything an endpoint returns sits under this key.
Port UN/LOCODE.
Average wait at the port, in hours.
Vessels currently at anchor.
On a port, the congestion level. On a sailing card confidence block, high when at least two carriers agree within a day, then medium, low, or single_source when only one published it.
Errors
Every refusal is { "ok": false, "error": { "code", "message" } }. Branch on the code, and log the message. No refusal or error is counted as a call.
The key is missing, unknown, revoked or past its own expiry date. Not counted.
SchedulesMCP is not connected to your account. Not counted.
Your account's access period has ended. Not counted.
The monthly call limit or the key's daily limit is spent. Retry-After gives the seconds until it resets. Not counted.
Too many requests in a short window. Wait Retry-After seconds. Not counted.
Access could not be checked just now, so the request was not run. Retry after Retry-After. Not counted.
curl 'https://api.schedulesmcp.com/public/port-congestion?port=USLAX&level=severe' \
-H "Authorization: Bearer smcp_YOUR_API_KEY"const res = await fetch("https://api.schedulesmcp.com/public/port-congestion?port=USLAX&level=severe", {
headers: {
"Authorization": "Bearer smcp_YOUR_API_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://api.schedulesmcp.com/public/port-congestion?port=USLAX&level=severe",
headers={"Authorization": "Bearer smcp_YOUR_API_KEY"},
)
data = res.json() {
"ok": true,
"data": {
"port": "USLAX",
"wait_hours": 38,
"at_anchor": 11,
"level": "elevated"
}
}