GET /ports

Search ports

Resolve a LOCODE, port name or city to canonical port metadata.

Directory lookup against the Traqo port table — resolve a UN/LOCODE, port name, or city to canonical metadata. Local read; never consumes a slot.

Request

GET https://traqocontainer.com/api/v1/ports

Authentication.

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

NameInTypeRequiredDescription
searchquerystringYes

A UN/LOCODE, port name, or city — at least 2 characters.

Example request

curl "https://traqocontainer.com/api/v1/ports?search=rotterdam" \
  -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 with a schema-identical reply.

Responses

Example 200 body:

{
  "success": true,
  "total": 1,
  "data": [
    {
      "locode": "NLRTM",
      "name": "Rotterdam",
      "city": "Rotterdam",
      "country": "Netherlands",
      "country_code": "NL",
      "region": "Northern Europe",
      "lat": "51.920000",
      "lng": "4.480000",
      "slug": "rotterdam"
    }
  ]
}
StatusMeaning
200

Matching ports (max 25, exact-LOCODE first)

400

Bad request — check required parameters.

401

Invalid or missing API key.

403

Developer mode not enabled, or the feature is not on your plan.

429

Rate limit exceeded — see the Retry-After header. The body names the plan the limit was computed from (plan, always the ORGANISATION’s plan, not the row your key hangs off) and what would raise it: upgrade with next_plan and next_limit_per_min, or contactUrl when there is no plan above yours. Exactly one of the two is present.

Error bodies and retry advice: Errors.