Documentation
JSONCargo Container & Vessel Tracking API gives you real-time shipment and vessel tracking data from the world's major shipping lines. This reference covers every endpoint, parameter, and response field.
x-api-key header in every request.
Authentication
All API requests must include your API key in the request header. You can obtain a key by subscribing to any plan on our pricing page - your key will arrive by email immediately after subscribing.
Header Parameter
Shipping Line Compatibility
Container tracking is currently supported for the shipping lines listed below. Use the API Parameter value exactly as shown when specifying shipping_line in requests.
| Shipping Line | Alternate Name | API Parameter |
|---|---|---|
| A.P. Moller - Maersk | Maersk | MAERSK |
| Hapag-Lloyd | Hapag-Lloyd | HAPAG_LLOYD |
| Hyundai Merchant Marine | HMM | HMM |
| Ocean Network Express | ONE | ONE |
| Evergreen Marine Corp | Evergreen | EVERGREEN |
| Mediterranean Shipping Company | MSC | MSC |
| Compagnie Maritime d'Affretement Compagnie Generale Maritime | CMA CGM | CMA_CGM |
| COSCO SHIPPING Lines Co | Cosco | COSCO |
| Zim Integrated Shipping Services | ZIM | ZIM |
| YangMing Marine Transport Corp | Yang Ming | YANG_MING |
| Pacific International Lines | PIL | PIL |
This list is not final. We are continuously working to expand shipping line support. If you have specific lines you'd like to see added, send your feedback to info@jsoncargo.com
API Usage
Each API request to our system counts as one API call, regardless of whether it's for a new or previously tracked container or vessel.
Upon reaching your monthly limit, you can upgrade to a higher plan or wait until renewal. Check your current usage anytime via Endpoint 10: API Key Stats.
Common Errors
If you are experiencing issues with your API requests, check the following common causes before reaching out to support.
ABCD1234567).x-api-key header and is still active. A request without the header returns 401; a key that does not exist returns 403.429 means the key exceeded its per-minute or monthly quota (type=MINUTE or type=MONTHLY in the title). Retry after the limit window passes, and check usage via the API Key Stats endpoint.502 means tracking data for this container or Bill of Lading can't be returned right now. Retry later if the response says "retryable": true.Error Format
Container and Bill of Lading errors carry three fields: code, a stable machine-readable value to build your logic on; title, a human-readable message; and retryable, which is true if the same request may succeed later and false if it will fail the same way until the input changes. Apart from invalid_request, each code always returns the same title, so match on code, not on the text.
{
"error": {
"code": "upstream_unavailable",
"title": "Tracking data is temporarily unavailable. Please try again later.",
"retryable": true
}
}
| code | HTTP | Retryable | Meaning |
|---|---|---|---|
| invalid_request | 400 | No | The request is malformed: a missing or invalid parameter, or an unsupported shipping line. title explains what to fix. |
| unknown_resource | 404 | No | No tracking data was found for this number and shipping line. |
| internal_error | 500 | Yes | An unexpected error on our side. |
| content_unavailable | 502 | No | Tracking data for this request is not available. |
| upstream_unavailable | 502 | Yes | Tracking data is temporarily unavailable. Retry later. |
API-key errors (401, 403, 429) can come from any endpoint and contain title only. Errors from the vessel, port and API key endpoints also contain title only.
Still experiencing issues? Contact us at support@jsoncargo.com
Endpoint 1: Get Container Details
Fetches details of a container using the tracking number.
Path Parameters
Query Parameters
ONE, MAERSK, MSC, COSCO, YANG_MING. See the Shipping Lines table.Responses
| Field | Type |
|---|---|
| container_id | string |
| container_type | string |
| container_status | string |
| shipping_line_name | string |
| tare | string |
| shipped_from | string |
| shipped_from_terminal | string |
| shipped_to | string |
| shipped_to_terminal | string |
| atd_origin | datetime |
| eta_final_destination | datetime |
| last_location | string |
| last_location_terminal | string |
| next_location | string |
| next_location_terminal | string |
| atd_last_location | datetime |
| eta_next_destination | datetime |
| timestamp_of_last_location | datetime |
| last_movement_timestamp | datetime |
| loading_port | string |
| discharging_port | string |
| last_vessel_name | string |
| last_voyage_number | string |
| current_vessel_name | string |
| current_voyage_number | string |
| last_updated | datetime |
invalid_request, not retryable. The only error whose title varies: it tells you what to fix. Values in {braces} are filled in from your request.
| When | title |
|---|---|
| Tracking number is not 11 characters | Invalid tracking number {tracking_number}. |
| shipping_line missing | Missing required parameter shipping_line. Please provide shipping_line to select the carrier for tracking number {tracking_number}. |
| Unknown shipping line | Shipping line {shipping_line} for tracking number {tracking_number} is not recognized. Supported shipping_line values are: {list}. |
| Shipping line not enabled | Shipping line {shipping_line} for tracking number {tracking_number} is not supported. Supported shipping_line values are: {list}. |
| Any other invalid input | The request is invalid. |
{
"error": {
"code": "invalid_request",
"title": "Shipping line NOT_A_CARRIER for tracking number ABCD1234567 is not recognized. Supported shipping_line values are: MSC, ONE, COSCO, YANG_MING, EVERGREEN, CMA_CGM, MAERSK, HAPAG_LLOYD, HMM, ZIM, PIL.",
"retryable": false
}
}Returned by the API-key check, so the body has title only.
{
"error": {
"title": "API key header is missing."
}
}Returned by the API-key check, so the body has title only. {api_key} is the key you sent.
{
"error": {
"title": "API key {api_key} does not exist."
}
}{
"error": {
"title": "API key {api_key} does not have admin permissions."
}
}unknown_resource, not retryable: no tracking data was found for this container number and shipping line.
{
"error": {
"code": "unknown_resource",
"title": "The requested resource was not found.",
"retryable": false
}
}The API key exceeded its per-minute or monthly quota. Returned by the API-key check, so the body has title only. Retry after the limit window passes.
{
"error": {
"title": "API key exceeded its rate limit (type=MINUTE)."
}
}{
"error": {
"title": "API key exceeded its rate limit (type=MONTHLY)."
}
}internal_error, retryable: an unexpected error on our side.
{
"error": {
"code": "internal_error",
"title": "An unexpected error occurred.",
"retryable": true
}
}upstream_unavailable (retryable) or content_unavailable (not retryable): tracking data for this request is temporarily unavailable, or is not available for this shipment.
{
"error": {
"code": "upstream_unavailable",
"title": "Tracking data is temporarily unavailable. Please try again later.",
"retryable": true
}
}{
"error": {
"code": "content_unavailable",
"title": "Data for this request is currently unavailable.",
"retryable": false
}
}Response Sample
{
"data": {
"container_id": "MEDU9091004",
"container_type": "40' HIGH CUBE REEFER",
"container_status": "Empty received at CY",
"shipping_line_name": "Mediterranean Shipping Company",
"tare": null,
"shipped_from": "GUAYAQUIL, EC",
"shipped_from_terminal": "NAPORTEC TERMINAL - BANANAPUERTO ",
"shipped_to": "TRIPOLI, LY",
"shipped_to_terminal": "SPCO ( SOCIALIST PORTS CO UNDER MINISTRY OF TRANSPORT ) ",
"atd_origin": "2024-07-09 00:00",
"eta_final_destination": null,
"last_location": "TRIPOLI, LY",
"last_location_terminal": "SPCO ( SOCIALIST PORTS CO UNDER MINISTRY OF TRANSPORT ) ",
"next_location": null,
"next_location_terminal": null,
"atd_last_location": "2024-08-11 00:00",
"eta_next_destination": null,
"timestamp_of_last_location": "2024-08-13 00:00",
"last_movement_timestamp": "2024-08-17 00:00",
"loading_port": "GUAYAQUIL, EC",
"discharging_port": "TRIPOLI, LY",
"last_vessel_name": "MSC LENA F",
"last_voyage_number": "YF432A",
"current_vessel_name": null,
"current_voyage_number": null,
"last_updated": "2024-09-09 18:34"
}
}
Endpoint 2: Get Bill of Lading Containers
Fetches the container numbers associated with a Bill of Lading (B/L) number.
Path Parameters
Query Parameters
MAERSK, COSCO, CMA_CGM, YANG_MING. See the Shipping Lines table.Responses
| Field | Type |
|---|---|
| bill_of_lading | string |
| shipping_line_name | string |
| associated_containers | integer |
| associated_container_numbers | array of strings |
| last_updated | string |
invalid_request, not retryable. The only error whose title varies: it tells you what to fix. Values in {braces} are filled in from your request.
| When | title |
|---|---|
| B/L number has non-alphanumeric characters | Bill of Lading {bol_number} is invalid. Must contain only alphanumeric characters. |
| shipping_line missing | Missing required parameter shipping_line. Please provide shipping_line to select the carrier for Bill of Lading {bol_number}. |
| Unknown shipping line | Shipping line {shipping_line} for Bill of Lading {bol_number} is not recognized. Supported shipping_line values are: {list}. |
| Shipping line not enabled | Shipping line {shipping_line} for Bill of Lading {bol_number} is not supported. Supported shipping_line values are: {list}. |
| Any other invalid input | The request is invalid. |
{
"error": {
"code": "invalid_request",
"title": "Missing required parameter shipping_line. Please provide shipping_line to select the carrier for Bill of Lading 6464150910.",
"retryable": false
}
}Returned by the API-key check, so the body has title only.
{
"error": {
"title": "API key header is missing."
}
}Returned by the API-key check, so the body has title only. {api_key} is the key you sent.
{
"error": {
"title": "API key {api_key} does not exist."
}
}{
"error": {
"title": "API key {api_key} does not have admin permissions."
}
}unknown_resource, not retryable: no data was found for this Bill of Lading number and shipping line.
{
"error": {
"code": "unknown_resource",
"title": "The requested resource was not found.",
"retryable": false
}
}The API key exceeded its per-minute or monthly quota. Returned by the API-key check, so the body has title only. Retry after the limit window passes.
{
"error": {
"title": "API key exceeded its rate limit (type=MINUTE)."
}
}{
"error": {
"title": "API key exceeded its rate limit (type=MONTHLY)."
}
}internal_error, retryable: an unexpected error on our side.
{
"error": {
"code": "internal_error",
"title": "An unexpected error occurred.",
"retryable": true
}
}upstream_unavailable (retryable) or content_unavailable (not retryable): tracking data for this request is temporarily unavailable, or is not available for this shipment.
{
"error": {
"code": "upstream_unavailable",
"title": "Tracking data is temporarily unavailable. Please try again later.",
"retryable": true
}
}{
"error": {
"code": "content_unavailable",
"title": "Data for this request is currently unavailable.",
"retryable": false
}
}Response Sample
{
"data": {
"bill_of_lading": "6464150910",
"shipping_line_name": "COSCO SHIPPING Lines Co",
"associated_containers": 1,
"associated_container_numbers": [
"OOLU9372428"
],
"last_updated": "2026-09-28 09:30"
}
}
Endpoint 3: Get Basic Live Vessel Tracking Details
Fetches basic live position and status for a vessel using UUID, MMSI, or IMO as the identifier.
Query Parameters
Responses
| Field | Type |
|---|---|
| uuid | string |
| name | string |
| mmsi | string |
| imo | string |
| eni | string |
| country_iso | string |
| type | string |
| type_specific | string |
| lat | number |
| lon | number |
| speed | number |
| course | number |
| heading | number |
| navigation_status | string |
| destination | string |
| last_position_epoch | integer |
| last_position_UTC | string |
| eta_epoch | integer |
| eta_UTC | string |
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Vessel not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": {
"uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
"name": "MAERSK CHENNAI",
"mmsi": "566093000",
"imo": "9525338",
"eni": null,
"country_iso": "SG",
"type": "Cargo - Hazard A (Major)",
"type_specific": "Container Ship",
"lat": 5.51935,
"lon": 0.02906167,
"speed": 0.1,
"course": 256,
"heading": 144,
"navigation_status": null,
"destination": "CGPNR>GHTEM",
"last_position_epoch": 1721842560,
"last_position_UTC": "2024-07-24T17:36:00Z",
"eta_epoch": 1721633940,
"eta_UTC": "2024-07-22T07:39:00Z"
}
}
Endpoint 4: Get Pro Live Vessel Tracking Details
Fetches pro details of a vessel using UUID, MMSI, or IMO: departure/arrival port details, draught, timezone, and more. All Basic fields plus the additional ones below.
Accepts the same query parameters as Endpoint 3 (uuid, mmsi or imo). Returns all Basic fields plus:
| Additional Field | Type |
|---|---|
| current_draught | number |
| dest_port_uuid | string |
| dest_port | string |
| dest_port_unlocode | string |
| dep_port_uuid | string |
| dep_port | string |
| dep_port_unlocode | string |
| atd_epoch | integer |
| atd_UTC | string |
| timezone_offset_sec | integer |
| timezone | string |
Responses
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Vessel not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": {
"uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
"name": "MAERSK CHENNAI",
"mmsi": "566093000",
"imo": "9525338",
"eni": null,
"country_iso": "SG",
"type": "Cargo - Hazard A (Major)",
"type_specific": "Container Ship",
"lat": 5.519612,
"lon": 0.02949333,
"speed": 0.1,
"course": 133,
"heading": 161,
"current_draught": 12.9,
"navigation_status": null,
"destination": "CGPNR>GHTEM",
"dest_port_uuid": "4e16eec7-c821-423f-7a61-31ca9cdd4601",
"dest_port": "TEMA",
"dest_port_unlocode": "GHTEM",
"dep_port_uuid": "11ccc7a1-cb91-bfd8-fefd-520b892be1da",
"dep_port": "POINTE NOIRE",
"dep_port_unlocode": "CGPNR",
"last_position_epoch": 1721925300,
"last_position_UTC": "2024-07-25T16:35:00Z",
"atd_epoch": 1721391180,
"atd_UTC": "2024-07-19T12:13:00Z",
"eta_epoch": 1721633940,
"eta_UTC": "2024-07-22T07:39:00Z",
"timezone_offset_sec": 0,
"timezone": "GMT"
}
}
Endpoint 5: Get Bulk Live Vessel Tracking Details
Fetches details of up to 100 vessels in a single request using their identifiers (UUID, MMSI, or IMO).
Query Parameters
Repeat the parameter once per vessel, for example ?imo=9525338&imo=9249403 (up to 100 vessels). Returns data as an array of vessel objects with the same fields as Endpoint 3.
Responses
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Vessel not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": [
{
"uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
"name": "MAERSK CHENNAI",
"mmsi": "566093000",
"imo": "9525338",
"eni": null,
"country_iso": "SG",
"type": "Cargo - Hazard A (Major)",
"type_specific": "Container Ship",
"lat": 5.519552,
"lon": 0.0297,
"speed": 0,
"course": 0,
"heading": 169,
"navigation_status": null,
"destination": "CGPNR>GHT",
"last_position_epoch": 1721927100,
"last_position_UTC": "2024-07-25T17:05:00Z",
"eta_epoch": null,
"eta_UTC": null
},
{
"uuid": "17959a4c-f5a9-ed71-1a42-5bfab00670ef",
"name": "GARGANO",
"mmsi": "235362000",
"imo": "9249403",
"eni": null,
"country_iso": "GB",
"type": "Other",
"type_specific": "Supply Vessel",
"lat": 54.01164,
"lon": 6.747243,
"speed": 0,
"course": 218,
"heading": 269,
"navigation_status": null,
"destination": "RWE OWF",
"last_position_epoch": 1721927100,
"last_position_UTC": "2024-07-25T17:05:00Z",
"eta_epoch": null,
"eta_UTC": null
}
]
}
Endpoint 6: Vessel Finder API
Fetches static ship data. Search and filter vessels by name, type, flag state, tonnage, dimensions, and build year.
Query Parameters
| Parameter | Type |
|---|---|
| name | string |
| fuzzy | integer |
| type | string |
| type_specific | string |
| country_iso | string |
| gross_tonnage_min / gross_tonnage_max | integer |
| deadweight_min / deadweight_max | integer |
| length_min / length_max | number |
| breadth_min / breadth_max | number |
| year_built_min / year_built_max | integer |
| next | string |
Results are paged. The response includes meta.next; pass it as next to fetch the following page. It is null on the last page.
Responses
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Vessel not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": [
{
"uuid": "335087a4-d70f-58ba-7e51-d8c0e26f069c",
"name": "ERIC",
"name_ais": "ERIC",
"mmsi": "244700187",
"imo": null,
"eni": "2000604",
"country_iso": "NL",
"country_name": "Netherlands",
"callsign": "PH5504",
"type": "Tug",
"type_specific": "Inland, Passenger Ship without Accommodation",
"gross_tonnage": null,
"deadweight": null,
"teu": null,
"liquid_gas": null,
"length": 19.3,
"breadth": 3.2,
"draught_avg": null,
"draught_max": null,
"speed_avg": 6.7,
"speed_max": 9,
"year_built": null,
"is_navaid": false,
"home_port": null
}
],
"meta": {
"next": null
}
}
Endpoint 7: Vessel Specs Details API
Fetch static technical specifications for a vessel by UUID, MMSI, or IMO.
Query Parameters
Provide one of uuid, mmsi or imo.
Responses
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Vessel not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": {
"uuid": "b8625b67-7142-cfd1-7b85-595cebfe4191",
"name": "MAERSK CHENNAI",
"name_ais": "MAERSK CHENNAI",
"mmsi": "566093000",
"imo": "9525338",
"eni": null,
"country_iso": "SG",
"country_name": "Singapore",
"callsign": "9V9409",
"type": "Cargo - Hazard A (Major)",
"type_specific": "Container Ship",
"gross_tonnage": 50869,
"deadweight": 68898,
"teu": "4500",
"liquid_gas": null,
"length": 249.12,
"breadth": 37.4,
"draught_avg": 10.021295387634936,
"draught_max": 14.2,
"speed_avg": 7.4,
"speed_max": 20,
"year_built": "2011",
"is_navaid": false,
"home_port": "SINGAPORE"
}
}
Endpoint 8: Port Finder
Fetches port details by coordinates and radius, name, country code, or port type. At least one parameter must be provided.
Query Parameters
| Parameter | Type |
|---|---|
| lat | number |
| lon | number |
| radius | number |
| name | string |
| country_iso | string |
| port_type | string |
| fuzzy | integer |
Responses
{
"error": {
"title": "Invalid request"
}
}{
"error": {
"title": "Port not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": [
{
"port_name": "LONDON",
"port_code": null,
"country": null,
"lat": 51.49743,
"lon": -0.04960075,
"port_type": "Port",
"size": null,
"area": null,
"city": null,
"unlocode": "GBLON"
},
{
"port_name": "NEW LONDON",
"port_code": null,
"country": null,
"lat": 41.35305,
"lon": -72.08705,
"port_type": "Port",
"size": null,
"area": null,
"city": null,
"unlocode": "USNED"
}
]
}
Endpoint 9: Terminal Finder API
Retrieve terminal details using a UN/LOCODE.
Query Parameters
Response Sample
{
"data": [{
"unlocode": "CNCQI",
"alt_unlocode": "CNCHQ",
"code": "CUNTAN",
"terminal_name": "CUNTAN TERMINAL",
"company_name": "CHONGQING INTERNATIONAL CONTAINER TERMINAL CO., LTD.",
"lat": "29.618056",
"lon": "106.591667",
"url": "http://www.cqgj.com.cn/",
"address": "No. 306, Hai'er Road, Jiangbei District, Chongqing, China"
}]
}
Endpoint 10: Get API Key Usage Stats
Check your current plan, total requests, requests used, and requests remaining.
No query parameters required. The response is based on the API key provided in the request header.
Responses
{
"error": {
"title": "API key stats not found"
}
}{
"error": {
"title": "Too many requests"
}
}{
"error": {
"title": "Internal server error"
}
}Response Sample
{
"data": {
"plan": "MARINER",
"requests_total": 10000,
"requests_made": 6,
"requests_available": 9994
}
}
Code Examples
The examples below call the Get Container Details endpoint for container MEDU9091004 at MSC. The same pattern applies to all endpoints.
curl --location 'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC' \ --header 'x-api-key: YOUR_API_KEY'
const axios = require('axios'); axios.get('https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC', { headers: { 'x-api-key': 'YOUR_API_KEY' } }).then(res => console.log(res.data));
import requests response = requests.get( 'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC', headers={'x-api-key': 'YOUR_API_KEY'} ) print(response.json())
package main import ("fmt"; "io"; "net/http") func main() { req, _ := http.NewRequest("GET", "https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC", nil) req.Header.Add("x-api-key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => 'https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC', CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['x-api-key: YOUR_API_KEY'], ]); echo curl_exec($curl); curl_close($curl);
require "uri"; require "net/http" url = URI("https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC") req = Net::HTTP::Get.new(url) req["x-api-key"] = "YOUR_API_KEY" puts Net::HTTP.start(url.host){ |h| h.request(req) }.read_body
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.jsoncargo.com/api/v1/containers/MEDU9091004/?shipping_line=MSC") .addHeader("x-api-key", "YOUR_API_KEY") .build(); System.out.println(client.newCall(request).execute().body().string());
Need Help or Have Questions?
If you need help or have questions about the API, our team is ready to assist.