You're trying to answer a concrete question—what is congestion like at the Port of Singapore today—and you need something you can ship into your stack. By the end of this post you’ll know exactly how to query FreightPulse for Singapore (SGSIN), interpret the IMF PortWatch-derived signal (lagged ~6–7 days), and embed a stable “7‑day average vs 90‑day baseline” indicator in your product without confusing it for live AIS wait times.
What this dataset actually measures for Singapore (SGSIN)
FreightPulse’s port “congestion” fields for Singapore are derived from IMF PortWatch. This is not a live anchorage or berthing wait-time feed. Instead, it is a normalized activity index based on recent vessel port-calls compared with a rolling baseline for the same port.
Concretely, the service reports:
- A 7-day average of daily port calls (“recent” activity).
- A 90-day baseline average for the same location.
- An activity label (low, moderate, high) and a “congestion” alias for backward compatibility.
- An as_of date that reflects the publication tick of PortWatch (lagged; not today’s timestamp).
In other words, a “moderate” label for Singapore means the last week’s port-call volume sits around typical levels versus the prior 90 days—not that ships are or are not waiting at anchor right now. If you need live wait or turn time, you’d need a separate AIS or port operations feed. Here, your output should say, “relative port-call activity through as_of, normalized to the port’s own 90‑day baseline.”
Why the series is lagged (~6–7 days) and how to communicate that
IMF PortWatch republishes its daily series in weekly batches. In practice, that means a typical lag of about 6–7 days between “today” and the most recent as_of date available from the source. FreightPulse forwards that cadence and includes explicit metadata and the as_of field so you don’t mistake it for live AIS data.
When you display Singapore’s status, surface the as_of date in the UI or API response you expose. If you cache results (recommended), refresh on a daily schedule and accept that the most recent tick may stay constant for several days until the next weekly republish lands.
Origin catalog facts you should keep at hand
- Auth: header X-API-Key: YOUR_API_KEY. Guest without key: 100 requests/day per IP.
- Envelope: {"success":true,"data":{...}}
- Port congestion is IMF PortWatch, lagged ~6-7 days, 7-day avg vs 90-day baseline — not live AIS.
- Do not quote a freight-rates USD fare as today’s price.
- Port: Singapore (SGSIN)
- curl: curl -H "X-API-Key: YOUR_API_KEY" "https://freightpulsehq.com/api/v1/port-congestion?port=SGSIN"
- No official congestion JSON is published for SGSIN. Show the curl and field names (congestion, ratio_vs_baseline, as_of). Do not reuse the USLAX 0.85 fixture.
Call the API for Singapore (copy/paste)
The endpoint accepts the SGSIN query and returns a standard envelope with a results array for the Singapore area entries published by PortWatch.
Live FreightPulse congestion for SGSIN.
Source: live
cURL:
curl -H "X-API-Key: YOUR_API_KEY" "https://freightpulsehq.com/api/v1/port-congestion?port=SGSIN"
JSON:
{
"success": true,
"data": {
"results": [
{
"port": "Singapore",
"locode": "SG SIN",
"country": "Singapore",
"activity": "moderate",
"congestion": "moderate",
"as_of": "2026-11-13",
"metrics": {
"recent_avg_portcalls_per_day": 121,
"baseline_avg_portcalls_per_day": 116.9,
"ratio_vs_baseline": 1.04
}
},
{
"port": "Serangoon Harbor",
"locode": "SG SIN",
"country": "Singapore",
"activity": "moderate",
"congestion": "moderate",
"as_of": "2026-11-13",
"metrics": {
"recent_avg_portcalls_per_day": 6.9,
"baseline_avg_portcalls_per_day": 7.4,
"ratio_vs_baseline": 0.93
}
}
],
"global_summary": {
"ports_high_activity": 0,
"ports_moderate_activity": 2,
"ports_low_activity": 0,
"ports_high_congestion": 0,
"ports_moderate": 2,
"ports_low": 0
},
"meta": {
"source": "IMF PortWatch (portwatch.imf.org) - UN Global Platform AIS data",
"data_lag_days": "4-11 (PortWatch republishes the daily series once a week; check as_of)",
"methodology": "activity is port-call volume, not congestion: last 7 days' avg calls vs a 90-day baseline for the same port. low means fewer calls than usual, which can be a closure or ships waiting offshore. It does not measure vessel wait or anchorage time. congestion is a deprecated alias of activity."
}
},
"meta": {
"request_id": "37047acc-ce8d-4f89-b45e-7f4226f9af2a"
}
}
What you’ll actually use from the payload:
- data.results[].congestion (string): current label for relative activity. Alias for activity.
- data.results[].metrics.ratio_vs_baseline (number): 7-day average vs 90-day baseline multiplier.
- data.results[].as_of (date string, YYYY-MM-DD): the tick date from the weekly batch republish.
Reading and displaying Singapore’s signal correctly
The safest compact display is: “Singapore: moderate (1.04× vs baseline) as of 2026‑11‑13.” This preserves the lag and the normalization. If you plot a time series, label the axis in dates (not “today”) and annotate weekly step updates if you see them.
For Serangoon Harbor in the same response, you might show: “Serangoon Harbor: moderate (0.93×) as of 2026‑11‑13.” Don’t aggregate different locations unless you’re explicit about the method (e.g., simple average of ratios) and you understand how PortWatch segments locations under the “SG SIN” UN/LOCODE umbrella.
One-file example: fetch Singapore congestion in Python
This sample calls the same endpoint, extracts the key fields for Singapore and Serangoon Harbor, and prints a normalized line you can reuse in logs or in a status banner.
import os
import requests
API_KEY = os.getenv("FREIGHTPULSE_API_KEY", "YOUR_API_KEY")
URL = "https://freightpulsehq.com/api/v1/port-congestion?port=SGSIN"
headers = {"X-API-Key": API_KEY}
resp = requests.get(URL, headers=headers, timeout=20)
resp.raise_for_status()
payload = resp.json()
if not payload.get("success"):
raise SystemExit("API returned success=false")
results = payload.get("data", {}).get("results", [])
for r in results:
port = r.get("port")
as_of = r.get("as_of")
label = r.get("congestion") or r.get("activity")
metrics = r.get("metrics", {})
ratio = metrics.get("ratio_vs_baseline")
recent = metrics.get("recent_avg_portcalls_per_day")
baseline = metrics.get("baseline_avg_portcalls_per_day")
print(f"{port}: {label} ({ratio}x vs 90d baseline; recent {recent}/d vs baseline {baseline}/d) as of {as_of}")
Operational notes that will save you time
- Auth and guest quota: Use header X-API-Key: YOUR_API_KEY. Without a key, the service permits 100 requests/day per IP. Batch requests and cache to stay well within this.
- Envelope format: The response is wrapped as {"success":true,"data":{...}}. Always check success before reading data.results.
- Timezone and dates: as_of is a date string (YYYY-MM-DD). Treat it as a UTC date boundary from the weekly PortWatch publish. Do not replace with your server’s “today.”
- Caching: Since PortWatch republishes weekly, refreshing once a day is more than sufficient. Cache by port parameter (SGSIN) and invalidate on as_of change.
- Pagination: The provided endpoint and sample do not document pagination; expect a bounded array of results for the queried port cluster.
- Units: Port-call counts are counts per day over the specified averaging windows. No currency appears in this endpoint.
- Weekends and holidays: Shipping activity continues daily; the weekly batch can land any day. Do not infer “closed” from a “low” label—it can also reflect diversions or offshore waiting.
UI copy and alerts that won’t confuse users
- Always include “as of YYYY‑MM‑DD” in any label for Singapore.
- Avoid words like “delay” or “waiting” in your UI when using this dataset. Prefer “relative port-call activity vs 90-day baseline.”
- For thresholds, consider: low (<0.9×), moderate (0.9–1.1×), high (>1.1×). Use the API-provided label as your primary tag, then show the exact ratio alongside.
- When alerting, trigger on ratio change or as_of advancement, not on your local time.
Robust parsing and field mapping
Because “congestion” is a deprecated alias of “activity,” your parser should fall back gracefully. A defensive mapping for Singapore might be:
- label = results[i].congestion or results[i].activity
- ratio = results[i].metrics.ratio_vs_baseline
- as_of = results[i].as_of
If you log a single canonical field in your database, store ratio_vs_baseline as a numeric column and as_of as a date. Keep port and locode to distinguish Singapore proper from nearby locations under the same country and UN/LOCODE prefix.
Error handling and monitoring
- Transport: Treat non-2xx as retryable with jittered backoff. Many teams use a 20–30s timeout and up to 3 retries during ingestion windows.
- Semantic: If success=false, do not reuse stale data unless your cache explicitly allows it and you tag it as cached.
- Schema drift: Validate that data.results is an array and metrics.ratio_vs_baseline is numeric before computing deltas or thresholds.
- Data staleness: Alert if as_of has not advanced for more than 14 days; this typically indicates a PortWatch publication gap, not an API fault.
Embedding in dashboards and APIs
Common patterns for Singapore (SGSIN):
- Status badge: “Singapore: moderate (1.04×) as of 2026‑11‑13.” Link to your methodology tooltip that explains 7‑day average vs 90‑day baseline.
- Time-series: Plot ratio_vs_baseline with weekly steps. Annotate schedule changes (e.g., new terminal openings) if you maintain domain notes.
- Downstream API: Re-expose a minimal object {port, ratio, label, as_of}. Maintain the original as_of; do not stamp now().
JavaScript fetch example for a web dashboard
If you’re rendering a small badge for Singapore in a browser or Node service, here’s a minimal JS snippet. It reads the required fields and formats a compact string, preserving the as_of date.
async function fetchSingaporeStatus() {
const url = "https://freightpulsehq.com/api/v1/port-congestion?port=SGSIN";
const resp = await fetch(url, {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const json = await resp.json();
if (!json.success) throw new Error("API returned success=false");
const results = (json.data && json.data.results) || [];
return results.map(r => {
const label = r.congestion || r.activity;
const ratio = r.metrics && r.metrics.ratio_vs_baseline;
const asOf = r.as_of;
return `${r.port}: ${label} (${ratio}x vs 90d baseline) as of ${asOf}`;
});
}
fetchSingaporeStatus()
.then(lines => lines.forEach(l => console.log(l)))
.catch(err => console.error(err));
Documentation and testing tips
- Refer to the official API reference for any changes: Documentation.
- Use a known-good cassette in tests: snapshot the exact JSON for SGSIN and assert the formatter output, especially the as_of propagation and ratio precision.
- Precision: Display ratios to two decimals for UI but store full precision. For Singapore’s 1.04, “1.04×” is clean and matches the payload.
- Internationalization: If you localize labels, keep the raw values (“moderate”, ratio) available for machine logic and thresholds.
FAQ
- Is this a live congestion or wait-time metric for Singapore? No. It’s a PortWatch-derived activity signal: 7-day average port calls vs a 90-day baseline, lagged ~6–7 days. It does not measure vessel queue time.
- Why does as_of not equal today’s date? PortWatch republishes the daily series weekly. Expect a several-day lag and step-like updates. Always surface as_of in your UI.
- Can I get this without an API key? Yes, but guests are limited to 100 requests/day per IP. For production, set X-API-Key: YOUR_API_KEY.
- What fields should I store? Keep port, locode, as_of, activity/congestion, recent and baseline call rates, and ratio_vs_baseline. Drive alerts off ratio and as_of changes.
- How often should I refresh Singapore’s status? Daily is safe. The underlying data advances weekly; refreshing more frequently won’t yield new ticks until PortWatch republishes.
Ready to integrate Singapore (SGSIN) port activity with a few lines of code and ship a clear, lag-aware status to your users? Create your account and get an API key here: Register. Then review the full parameter and schema notes in the Documentation and add a daily refresh job that caches by as_of.