A port's latest congestion score and 90-day history, plus the two waits people ask about: median_anchorage_wait_h (hours a ship waits at anchor for a berth) and longest_wait_days (the longest any vessel at the port has been waiting). Either is null — never 0 — when we hold no reading. Answers for every port we score, whether or not it has a page on /ports. Reads Traqo analytics — never consumes a slot. Requires port-congestion on your organisation’s plan.
Request
GET https://traqocontainer.com/api/v1/ports/{locode}/congestion
Your API key as a Bearer token: Authorization: Bearer YOUR_API_KEY.
Rate limit.Each API key gets 120 requests per minute by default; your key's own budget comes back in the X-RateLimit-* headers.Limits by plan.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
locode | path | string | Yes | Port UN/LOCODE (5 chars). |
Example request
curl "https://traqocontainer.com/api/v1/ports/INMUN/congestion" \
-H "Authorization: Bearer YOUR_API_KEY"Run it in the sandbox — no key, no account: the same request answers at https://traqocontainer.com/api/v1/sandbox/ports/{locode}/congestion with a schema-identical reply.
Responses
Example 200 body:
{
"success": true,
"data": {
"locode": "INNSA",
"latest": {
"score": 58,
"bucket": "moderate",
"tier": "A",
"trend7d": 9,
"components": {
"waiting": 63,
"anchorage_hours": 116,
"berth_hours": 58
},
"computedAt": "2026-11-01T12:00:00.000Z"
},
"history": [
{
"computedAt": "2026-08-09T12:00:00.000Z",
"score": 0,
"bucket": "fluid"
},
{
"computedAt": "2026-08-16T12:00:00.000Z",
"score": 0,
"bucket": "fluid"
}
],
"median_anchorage_wait_h": 116,
"longest_wait_days": 6
}
}| Status | Meaning |
|---|---|
200 | Congestion score + history |
400 | Bad request — check required parameters. |
401 | Invalid or missing API key. |
403 | Port congestion is unavailable. TWO different causes share this status and |
429 | Rate limit exceeded — see the Retry-After header. The body names the plan the limit was computed from ( |
Error bodies and retry advice: Errors.