Portoflosangeles APIportoflosangeles.org ↗
Access container/tonnage statistics, terminal listings, news releases, facts, and social posts from the Port of Los Angeles via a structured JSON API.
What is the Portoflosangeles API?
This API exposes 7 endpoints covering the Port of Los Angeles — including container throughput in TEUs, historical tonnage data back to 1970, terminal directories, and published news releases. The get_container_statistics endpoint returns month-over-month and year-over-year TEU comparisons, while get_terminal_details provides capabilities, berth assignments, and contact information for individual terminals identified by slug and type.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/d93cc82b-cac1-4410-9aca-573b8122f950/get_container_statistics' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace portoflosangeles-org-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
Port of Los Angeles API - Usage Example
Get your API key from: https://parse.bot/settings
"""
from parse_apis.port_of_los_angeles_api import PortOfLA, Terminal, TerminalDetail, NewsRelease, SocialPost, TonnageRecord
# Initialize the client
port = PortOfLA(api_key="YOUR_API_KEY")
# List all terminals at the port
for terminal in port.terminals.list():
print(terminal.name, terminal.type, terminal.slug)
# Get detailed info for a specific terminal by constructing it from known slug/type
container_terminal = Terminal(_api=port, slug="trapac", type="container")
detail = container_terminal.details.get()
print(detail.name, detail.berths)
for feature in detail.features:
print(feature)
# Retrieve container throughput statistics
report = port.containerreports.get()
for row in report.monthly:
print(row)
# Retrieve tonnage statistics with typed records
tonnage = port.tonnagereports.get()
for record in tonnage.historical:
print(record.year, record.general_cargo, record.liquid_bulk, record.total)
# Get port profile (facts and figures)
profile = port.portprofiles.get()
for stat in profile.key_statistics:
print(stat)
for infra in profile.infrastructure:
print(infra)
# List latest news releases
for news in port.newsreleases.list():
print(news.title, news.date, news.url)
# List social media posts
for post in port.socialposts.list():
print(post.poster_name, post.external_created_at, post.like_count)
Retrieves monthly and annual container throughput statistics in TEUs (Twenty-Foot Equivalent Units) from the Port of Los Angeles. Monthly statistics compare the current reporting month year-over-year with change amounts and percentages. Annual statistics show total TEU counts grouped by decade ranges. No input parameters required.
No input parameters required.
{
"type": "object",
"fields": {
"Annual Container Statistics": "array of objects with decade-range columns containing year labels and TEU counts",
"Monthly Container Statistics": "array of objects with month category, current and prior year TEU values, change, and percent change"
},
"sample": {
"data": {
"Annual Container Statistics": [
{
"2010-2019": "9,213,396",
"2020-2025": "2020"
}
],
"Monthly Container Statistics": [
{
"2025": "439,230.00",
"2026": "459,825.25",
"April": "Loaded Imports",
"Change": "20,595.25",
"% Change": "4.69%"
}
]
},
"status": "success"
}
}About the Portoflosangeles API
Container and Tonnage Statistics
The get_container_statistics endpoint returns two datasets: monthly TEU figures with current-year and prior-year values alongside change amounts and percentages, and annual totals organized in decade-range columns. The get_tonnage_statistics endpoint covers general cargo, liquid bulk, dry bulk, and total tonnage in millions of revenue tons from 1970 through the most recent year, plus a conversion reference table with To Convert, Into, and Multiply fields.
Terminal Directory
get_terminal_list returns all terminals with their name, type, slug, and url fields. Terminal types include container, automobile, breakbulk, dry-bulk, liquid-bulk, passenger, multi-use, and maritime-support. Those values feed directly into get_terminal_details, which accepts slug and type as required parameters and returns berths, features (an array of capability strings), and contact_info. Not all terminals have every field populated — some fields will be absent depending on the terminal.
News, Facts, and Social Feed
get_latest_news returns news releases sorted newest to oldest, each with a title, url, and date. get_facts_and_figures organizes port-wide data into labeled sections: Key Statistics, Trade Volume, Infrastructure, Finances, Economic Impacts, and Market Share — all returned as arrays of strings under each heading. The data is published annually in Q1 with calendar-year and fiscal-year comparisons. get_social_feed pulls recent posts from LinkedIn, X (Twitter), and other platforms via the port's Juicer aggregation feed, returning message, poster_name, source, timestamps, engagement metrics, and media attachments per post.
The Portoflosangeles API is a managed, monitored endpoint for portoflosangeles.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when portoflosangeles.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official portoflosangeles.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track year-over-year TEU growth at the Port of Los Angeles for trade volume analysis or logistics forecasting.
- Build a terminal directory that surfaces equipment capabilities and contact information filtered by terminal type.
- Monitor port news releases to detect announcements about infrastructure changes, partnerships, or regulatory updates.
- Populate dashboards with historical tonnage breakdowns (general cargo, liquid bulk, dry bulk) from 1970 to present.
- Pull facts and figures data to compare the port's container market share and economic impact across reporting years.
- Aggregate the port's social media activity to track public communications and engagement trends.
- Cross-reference berth assignments from terminal details against cargo routing or vessel scheduling datasets.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Port of Los Angeles offer an official developer API?+
What does get_terminal_details return, and are all fields always present?+
get_terminal_details returns name, url, berths, features, and contact_info for a terminal identified by its slug and type — both obtained from get_terminal_list. The berths, features, and contact_info fields can be absent depending on what the terminal's page publishes; callers should handle missing fields gracefully.How current is the container statistics data?+
Does the API return vessel schedules or individual shipment records?+
Can I filter news releases by date range or topic?+
get_latest_news returns all available releases sorted newest to oldest with title, url, and date fields — there are no filter parameters. Date-range or keyword filtering would need to be applied client-side after retrieving the full list. You can fork this API on Parse and revise it to add server-side filtering logic.