When a shipment is moving through Jebel Ali, you may need a congestion indicator that can be retrieved by code and compared with the port’s usual activity. This guide shows how to request AEJEA data, read the returned activity and baseline fields, and present the result without mistaking a lagged port-call indicator for a live vessel waiting time.
What the Jebel Ali indicator measures
The port-congestion endpoint uses IMF PortWatch data. For Jebel Ali, it compares the recent seven-day average number of port calls per day with a 90-day baseline for the same port. The result is an indicator of relative port-call activity, not a direct measurement of congestion, anchorage time, or vessel waiting time.
PortWatch data is typically lagged by about six to seven days rather than being live AIS. The response metadata in the example below describes a four-to-eleven-day lag because PortWatch republishes its daily series weekly; use the returned as_of date and metadata when assessing a particular result.
The response includes both activity and congestion. According to its methodology metadata, congestion is a deprecated alias of activity. Prefer activity in new integrations, and retain congestion only where compatibility with that field is useful.
A low activity classification means fewer port calls than usual. It does not establish why activity is lower: the metadata notes that a closure or ships waiting offshore are possible explanations. Conversely, a moderate activity classification does not provide a vessel’s expected waiting time.
Request the data
Send a GET request to /api/v1/port-congestion with the port query parameter set to Jebel Ali’s code, AEJEA. Authenticate with the X-API-Key header. Replace YOUR_API_KEY with your own key before running the request.
curl -H "X-API-Key: YOUR_API_KEY" "https://freightpulsehq.com/api/v1/port-congestion?port=AEJEA"
Guest access without a key is limited to 100 requests per day per IP. For an application using a key, keep the key in your deployment’s secret storage rather than embedding it in browser-side code or committing it to a repository. The Documentation is the place to check current access and endpoint details.
The request uses AEJEA without a space. The sample response displays the location code as AE JEA, so do not assume that the returned presentation of the code will be identical to the query value.
Read the response
The following is the provided Jebel Ali response example. Its values describe the observation dated in the response; they should not be presented as the current port condition without making a fresh request.
{
"success": true,
"data": {
"results": [
{
"port": "Jebel Ali",
"locode": "AE JEA",
"country": "United Arab Emirates",
"activity": "moderate",
"congestion": "moderate",
"as_of": "2026-11-27",
"metrics": {
"recent_avg_portcalls_per_day": 4.7,
"baseline_avg_portcalls_per_day": 4.7,
"ratio_vs_baseline": 1
}
}
],
"global_summary": {
"ports_high_activity": 0,
"ports_moderate_activity": 1,
"ports_low_activity": 0,
"ports_high_congestion": 0,
"ports_moderate": 1,
"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": "7ca79784-0e71-459f-ae82-04e4750b9c19"
}
}
The top-level success indicates whether the request succeeded, and data.results contains the port records. For the Jebel Ali record, the useful display fields are activity, the deprecated congestion alias, and as_of. The nested metrics object supplies the recent average, baseline average, and ratio_vs_baseline.
Both averages are measured in port calls per day, not hours or vessels waiting. The ratio is unitless: in this example, 1 corresponds to a recent average equal to the baseline average. The classification and ratio should be displayed with the observation date and the activity methodology, rather than converted into an estimated delay.
global_summary supplies counts by classification in the response. For a Jebel Ali integration, read the individual record rather than treating a summary count as the port’s own metric. The top-level meta.request_id can be retained with application logs when investigating a particular response.
Call the endpoint from Python
This example uses Python’s standard library and reads the key from the environment. It checks the response envelope, handles an empty result, and prints the fields needed to display the Jebel Ali indicator. Set the FREIGHTPULSE_API_KEY environment variable to your own key before running it.
import json
import os
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = "https://freightpulsehq.com/api/v1/port-congestion?port=AEJEA"
api_key = os.environ.get("FREIGHTPULSE_API_KEY")
if not api_key:
raise SystemExit("Set FREIGHTPULSE_API_KEY before running this script.")
request = Request(url)
request.add_header("X-API-Key", api_key)
try:
with urlopen(request) as response:
payload = json.load(response)
except HTTPError as exc:
raise SystemExit("HTTP request failed with status: " + str(exc.code))
except URLError as exc:
raise SystemExit("Could not reach the API: " + str(exc.reason))
except json.JSONDecodeError:
raise SystemExit("The API response was not valid JSON.")
if payload.get("success") is not True:
raise SystemExit("The API did not report a successful request.")
data = payload.get("data") or dict()
results = data.get("results") or []
if not results:
raise SystemExit("No port result was returned.")
port = results[0]
metrics = port.get("metrics") or dict()
source_meta = data.get("meta") or dict()
print("Port:", port.get("port"))
print("Location code:", port.get("locode"))
print("Activity:", port.get("activity"))
print("Congestion alias:", port.get("congestion"))
print("As of:", port.get("as_of"))
print("Recent average port calls per day:",
metrics.get("recent_avg_portcalls_per_day"))
print("Baseline average port calls per day:",
metrics.get("baseline_avg_portcalls_per_day"))
print("Ratio vs baseline:", metrics.get("ratio_vs_baseline"))
print("Source:", source_meta.get("source"))
print("Data lag:", source_meta.get("data_lag_days"))
print("Methodology:", source_meta.get("methodology"))
The script uses the first returned record because the request is for Jebel Ali. In production, check the returned port identity before associating a record with your internal port identifier. The example prints missing fields as None; an application should instead mark an unavailable value as unavailable and avoid substituting a fabricated measurement.
Keep transport errors distinct from a successful HTTP response that does not report success. If a request fails, preserve enough context to diagnose it without logging the API key. Where a response supplies meta.request_id, recording that identifier can help associate an investigation with the response.
Use the indicator safely in an application
Show as_of next to the activity label and ratio. The example contains a date, not a time of day or timezone, so do not attach an assumed timestamp or present it as the time a vessel was observed. Also distinguish the time your application retrieved the response from the date of the underlying observation.
Cache the returned observation if it suits your application, but keep its as_of date and source metadata alongside it. A newly fetched response can still contain an older observation; fetching more frequently does not make PortWatch data live. Choose a refresh policy based on your needs and check the returned date rather than assuming every request produces a new daily value.
If the observation is too old for a decision, label it stale or withhold the indicator according to your application’s policy. Do not replace it with a live wait-time estimate: the returned fields do not measure waiting or anchorage time. Likewise, do not interpret a ratio change as proof of a particular operational cause without separate evidence.
For an operational display, a useful minimum is the port name, activity classification, ratio, as_of date, and a short source note. Include the recent and baseline port-call averages when users need to understand the ratio. If an existing consumer reads congestion, plan its transition to activity because the response identifies the former as deprecated.
The sample shows results as an array, so handle an empty array rather than assuming a record is always present. It does not establish pagination behavior; check the documentation before building pagination logic. Similarly, use the response’s own metadata rather than hard-coding a single lag as a guarantee.
FAQ
Is this a live Jebel Ali congestion or vessel-wait API?
No. The indicator uses lagged IMF PortWatch port-call data, typically about six to seven days behind, and does not measure vessel waiting or anchorage time. Check as_of and the returned lag metadata for the observation you receive.
What does a ratio of one mean?
It means the recent average port calls per day equals the baseline average. It does not mean that every vessel is moving normally or that there is no queue.
Should I read activity or congestion?
Use activity for new integrations. The response methodology describes congestion as a deprecated alias, and the underlying measure is port-call activity rather than direct congestion.
Can I call the endpoint without an API key?
Yes. Guest requests without a key are limited to 100 requests per day per IP. The examples above use the documented X-API-Key header instead.
Can I use as_of as an exact timestamp?
No. The example supplies a date without a time or timezone. Preserve that date as returned and record your own retrieval time separately if your application needs one.
Register to get an API key, then run the Jebel Ali request and display the returned activity, baseline ratio, and observation date together.