# SiteCheck Trade & Energy – Port Congestion Index

> SiteCheck Trade & Energy – Port Congestion Index is a paid API for AI agents from api.tradeenergy-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns weekly port congestion figures for a single port: median waiting time, average vessels waiting per day, congestion category, and week-on-week change, sourced from Portcast's public port page.

## Facts

- Endpoint: GET https://api.tradeenergy-api.workers.dev/api/logistics/port-congestion-index?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-trade-energy-port-congestion-index-cb7745ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0G36fQecpvuOJivREKyBv

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-trade-energy-port-congestion-index-cb7745ae
```

Example prompt: What's the current congestion situation at Long Beach port — how long are ships waiting, how many vessels are queued per day, and has it gotten better or worse since last week?

## When to prefer this

Use this endpoint when you need quick, free-tier weekly port congestion snapshots for ports covered by Portcast's public pages. It is ideal for supply chain monitoring, pre-shipment planning, or enriching logistics dashboards without needing a full paid Portcast API subscription. Prefer alternatives if you need real-time (sub-weekly) vessel data, ports not listed on Portcast's public congestion page, or historical time-series data beyond weekly snapshots.

## Known failure modes

- Port slug not found or not published by Portcast — returns an error or empty result
- Invalid slug format (e.g. uppercase or spaces) — request may fail or return no data
- Portcast public page structure changes — scrape may break and return stale or missing data
- Network timeout to Portcast's public page — upstream fetch failure
- Port exists but Portcast has not published recent congestion data for that week

## How this service works

Weekly port congestion figures for one port from Portcast's public port page: median waiting time (days), average vessels waiting per day, congestion category and week-on-week change. Free public page data (not the paid API), and only for ports Portcast publishes; the slug is the port name in lowercase, e.g. ako or long-beach.

## Output

A JSON object containing the port name and slug, the week covered, the median vessel waiting time in days, the average number of vessels waiting per day, a congestion category label (e.g. 'low'), a flag indicating long-tail congestion, and the percentage change in congestion from the previous week, along with the source URL and the timestamp when the data was checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "port"
     ],
     "properties": {
      "port": {
       "type": "string",
       "description": "Portcast port slug: lowercase letters and hyphens, e.g. long-beach"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "Long Beach",
  "port": "long-beach",
  "source": "https://www.portcast.io/port-congestion/long-beach",
  "checkedAt": "2026-10-23T09:37:55.117Z",
  "weekCovered": "11 Oct - 17 Oct 2026",
  "medianWaitingTime": {
   "unit": "days",
   "value": "0.14"
  },
  "congestionCategory": {
   "unit": null,
   "value": "low"
  },
  "longTailCongestion": {
   "unit": null,
   "value": "No"
  },
  "changeFromPreviousWeek": {
   "unit": "percent",
   "value": "17 %"
  },
  "averageVesselsWaitingPerDay": {
   "unit": null,
   "value": "2"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-trade-energy-port-congestion-index-cb7745ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tradeenergy-api.workers.dev](https://www.zero.xyz/host/api.tradeenergy-api.workers.dev/llms.txt)
