Maersk API: Track a container or shipment
Tracks a Maersk ocean container or shipment by container, bill of lading or booking number. Returns container milestones, vessel details and estimated arrival, with times in the local time of each location when its time zone can be identified.
Unofficial. Not affiliated with or endorsed by Maersk.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Reference, required
reference Container number, bill of lading number or booking number, for example MSKU0235187 or 276211578.
276211578
Input as JSON
{ "reference": "276211578"}Output
{ "origin": { "city": "Shanghai", "country": "China" }, "reference": "276211578", "containers": [ { "events": [ { "event": "Gate out empty", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-17T23:49:00+08:00" }, { "event": "Gate in", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-25T14:45:00+08:00" }, { "event": "Loaded on vessel", "vessel": "BRUSSELS EXPRESS", "location": "Shanghai, China", "date_time": "2026-09-28T04:03:00+08:00" } ], "voyage": "637W", "vessel_name": "BRUSSELS EXPRESS", "size_and_type": "40 ft high cube dry", "tracking_link": "https://www.maersk.com/tracking/276211578" , "current_status": "Vessel departure", "last_known_time": "2026-09-28T23:12:00+08:00", "container_number": "MIEU4025382", "estimated_arrival": "2026-11-16T06:00:00+01:00", "last_known_location": "Shanghai, China" }, { "events": [ { "event": "Gate out empty", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-17T21:12:00+08:00" }, { "event": "Gate in", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-25T14:28:00+08:00" }, { "event": "Loaded on vessel", "vessel": "BRUSSELS EXPRESS", "location": "Shanghai, China", "date_time": "2026-09-28T03:05:00+08:00" } ], "voyage": "637W", "vessel_name": "BRUSSELS EXPRESS", "size_and_type": "40 ft high cube dry", "tracking_link": "https://www.maersk.com/tracking/276211578" , "current_status": "Vessel departure", "last_known_time": "2026-09-28T23:12:00+08:00", "container_number": "MIEU4031127", "estimated_arrival": "2026-11-16T06:00:00+01:00", "last_known_location": "Shanghai, China" }, { "events": [ { "event": "Gate out empty", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-18T05:51:00+08:00" }, { "event": "Gate in", "vessel": null, "location": "Shanghai, China", "date_time": "2026-09-25T14:18:00+08:00" }, { "event": "Loaded on vessel", "vessel": "BRUSSELS EXPRESS", "location": "Shanghai, China", "date_time": "2026-09-28T04:43:00+08:00" } ], "voyage": "637W", "vessel_name": "BRUSSELS EXPRESS", "size_and_type": "40 ft high cube dry", "tracking_link": "https://www.maersk.com/tracking/276211578" , "current_status": "Vessel departure", "last_known_time": "2026-09-28T23:12:00+08:00", "container_number": "MIEU4225009", "estimated_arrival": "2026-11-16T06:00:00+01:00", "last_known_location": "Shanghai, China" } ], "tracking_link": "https://www.maersk.com/tracking/276211578" , "final_destination": { "city": "Belgrade", "country": "Serbia" }}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"maersk.com/track_container","input":{"reference":"276211578"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "maersk.com/track_container" , "input": { "reference": "276211578" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "maersk.com/track_container" , "input": { "reference": "276211578" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run maersk.com/track_container# with {"reference":"276211578"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "reference" ], "properties": { "reference": { "type": "string", "examples": [ "MSKU0235187", "276211578" ], "minLength": 1, "description": "Container number, bill of lading number or booking number, for example MSKU0235187 or 276211578." } }}Output schema
{ "type": "object", "required": [ "reference", "origin", "final_destination", "containers", "tracking_link" ], "properties": { "origin": { "type": "object", "required": [ "city", "country" ], "properties": { "city": { "type": [ "string", "null" ] }, "country": { "type": [ "string", "null" ] } } }, "reference": { "type": "string" }, "containers": { "type": "array", "items": { "type": "object", "required": [ "container_number", "size_and_type", "current_status", "last_known_location", "last_known_time", "vessel_name", "voyage", "estimated_arrival", "events", "tracking_link" ], "properties": { "events": { "type": "array", "items": { "type": "object", "required": [ "date_time", "location", "event", "vessel" ], "properties": { "event": { "type": [ "string", "null" ] }, "vessel": { "type": [ "string", "null" ] }, "location": { "type": [ "string", "null" ] }, "date_time": { "type": [ "string", "null" ] } } } }, "voyage": { "type": [ "string", "null" ] }, "vessel_name": { "type": [ "string", "null" ] }, "size_and_type": { "type": [ "string", "null" ] }, "tracking_link": { "type": "string" }, "current_status": { "type": [ "string", "null" ] }, "last_known_time": { "type": [ "string", "null" ] }, "container_number": { "type": [ "string", "null" ] }, "estimated_arrival": { "type": [ "string", "null" ] }, "last_known_location": { "type": [ "string", "null" ] } } } }, "tracking_link": { "type": "string" }, "final_destination": { "type": "object", "required": [ "city", "country" ], "properties": { "city": { "type": [ "string", "null" ] }, "country": { "type": [ "string", "null" ] } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
maersk.com/track_container- Returns
- origin, final destination, containers with status, last location, vessel, voyage, ETA and events
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method maersk.com/track_container with the inputs above.
Ask your agent
- Where is container MRKU4471023 right now and when is it expected to arrive?
- Can you check the status of Maersk bill of lading 254893716 and tell me the vessel and voyage?
- I need the latest milestones for booking number 231775904 — has it been loaded or discharged yet?
- Look up shipment MSKU7726514 on maersk.com and give me the ETA at the final destination in local time.
- What's the last known location and event history for container TCLU3098265 shipped from Ningbo?
See more
Finds a ship on VesselFinder by name, IMO or MMSI and returns its public position, voyage and vessel details.
vesselfinder.com/get_vessel_locationTracks a UPS package by tracking number, with its status, delivery details and shipment history when available.
ups.com/track_packageReturns the latest public weekly Freightos Baltic Index (FBX) price per 40-foot container for one trade lane, or for the global composite and all twelve lanes.
freightos.com/get_container_freight_ratesChecks the public FlightAware status of an airline flight (airline name or code plus number) on a departure date, by default today at the departure airport: airports, scheduled, estimated and actual gate times in local time, delays, gates, terminals, aircraft and distance. A date older than FlightAware's public two-week list is looked up on the flight's history page when FlightAware still shows it.
flightaware.com/check_flight_statusChecks a flight's public status and times on Flightradar24 by flight number and the departure date at the origin airport.
flightradar24.com/check_flight_statusSearches Mercari US listings for items for sale or sold, with condition, price and sorting filters, and adds seller, size and shipping details from each item page. Sold prices are displayed listing prices.
mercari.com/search_listingsEstimates domestic USPS Post Office retail postage between two ZIP Codes for a letter, large envelope, package or flat-rate packaging, by weight and mailing date. Media Mail is left out; a zero-weight letter counts as one ounce. Prices are retail, cheapest first, with each service's estimated delivery.
usps.com/estimate_postageFinds dated FlixBus trip options between two cities, with stops, local times, availability and displayed per-person prices, including partner operators on some routes.
flixbus.com/search_bus_trips