Skip to main content

JSONCargo

Documentation

Getting Started

JSONCargo Container & Vessel Tracking API provides you with real-time Shipment & Vessel Tracking data from major shipping lines. 

Authentication

To access JSONCargo Container & Vessel Tracking API, you need to obtain an API key. You can get an API key by visiting our pricing page and subscribing to one of our three API plans.  Once you have subscribed you will receive an email with your API key included. 

Shipping Line Compatibility

Container Tracking API is currently only compatible with:

Shipping Line NameAlternate NameInternal ID Code
A.P. Moller - MaerskMaersk0010
Hapag-LloydHapag-Lloyd0011
Hyundai Merchant MarineHMM0012
Ocean Network ExpressONE0013
Evergreen Marine CorpEvergreen0014
Mediterranean Shipping CompanyMSC0015
Compagnie Maritime d'Affrètement
Compagnie Générale Maritime
CMA CGM0016
COSCO SHIPPING Lines CoCosco0017
Zim Integrated Shipping ServicesZIM0018
YangMing Marine Transport CorpYang Ming0019
Pacific International LinesPIL0020

Please note that this current list is not final. We are continuously working to expand our list of shipping line support, you can expect that more shipping lines will be added in the future to improve tracking coverage. If you have specific shipping lines you’d like to see in our Container Tracking API feel free to reach out to us, and we’ll consider them for future updates.

You can send your feedback at: info@jsoncargo.com

API Usage Explanation

Container and Vessel Tracking: Each API request to our system counts as one API call, regardless of whether it’s for a new or previously tracked container/vessel.

Tracking New Container: 1 API Call.
Tracking New Vessel: 1 API Call.
Tracking Previously Tracked Container: 1 API Call.
Tracking Previously Tracked Vessel: 1 API Call.

Example:

If you track 500 containers three times per week, this equals:

500 containers×3 times/week=1500 API calls/week

Monthly Usage: To estimate your monthly API calls, multiply the weekly calls by the number of weeks in a month (approximately 4.33):

1500 calls/week×4.33 weeks/month=6495 API calls/month

This calculation applies to Basic, Pro, and Bulk Vessel tracking requests as well. Make sure to account for any additional requests beyond your normal frequency.

What happens if I reach my monthly limit?

Upon reaching the max monthly calls you can choose to upgrade to a higher plan or to wait until the package renewal date.

You can always find your request statistics and current usage by calling Endpoint 9: Get API Key Usage Stats

Understanding Third-Party Container Prefixes

In the container industry, a container prefix (the first four letters of a container number) typically identifies the shipping line that owns or operates the container. However, some prefixes are shared across multiple shipping lines due to leasing agreements, partnerships, etc.

For example, a container with the prefix CCLU might be used by COSCO, CMA CGM, or another carrier, making it impossible to determine the shipping line from the prefix alone. Third-party prefixes can be linked to multiple shipping lines. To ensure accurate tracking, users must specify the shipping line when making a request.

So if you are tracking a container with a shared prefix, you must include the shipping_line query parameter in your request like this:

				
					GET http://api.jsoncargo.com/api/v1/containers/{tracking_number}?shipping_line={shipping_line_name}

				
			

If a container has a third-party prefix and no shipping line is specified, the request may return a 404 not found error or incorrect data, as the system cannot determine which shipping line to query.

User Errors

If you are experiencing issues with your API requests, please check the following common user errors before reaching out to support:

If you’ve checked all the above and you are still experiencing issues, please contact us at support@jsoncargo.com

Endpoint 1: Get Container Details

Fetches details of a container using the tracking number.

				
					Authorizations: ApiKeyAuth
				
			

API Key: ApiKeyAuth

				
					GET http://api.jsoncargo.com/api/v1/containers/{tracking_number}?shipping_line={shipping_line_name}
				
			

Header Parameter Name:

				
					x-api-key
				
			

Path Parameters:

required

Query Parameters:

required if using a third-party prefix – The shipping line associated with the container

				
					GET http://api.jsoncargo.com/api/v1/containers/{tracking_number}?shipping_line={shipping_line_name}

				
			
Request ParameterObject
MAERSKstring
HAPAG_LLOYDstring
HMMstring
ONEstring
EVERGREENstring
MSCstring
CMA_CGMstring
COSCOstring
ZIMstring
YANG_MINGstring
PILstring
If you are receiving a ‘Prefix Not Found’ error, please reach out to us at support@jsoncargo.com, it is possible that the container prefix is not yet in our database, and we can add it for you.

Responses
View response sample

Response Schema: application/json

DataObject
container_idstring
container_typestring
container_statusstring
shipping_line_namestring
shipping_line_idstring
tarefloat
shipped_fromstring
shipped_from_terminalstring
shipped_tostring
shipped_to_terminalstring
atd_origindatetime
eta_final_destinationdatetime
last_locationstring
last_location_terminalstring
next_locationstring
next_location_terminalstring
atd_last_locationdatetime
eta_next_destinationdatetime
timestamp_of_last_locationdatetime
last_movement_timestampdatetime
loading_portstring
discharging_portstring
customs_clearancedatetime
bill_of_ladingstring
last_vessel_namestring
last_voyage_numberstring
current_vessel_namestring
current_voyage_numberstring
last_updateddatetime

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "data": {
    "container_id": "MEDU9091004",
    "container_type": "40' HIGH CUBE REEFER",
    "container_status": "Empty received at CY",
    "shipping_line_name": "Mediterranean Shipping Company",
    "shipping_line_id": "0015",
    "tare": 3900,
    "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": "2024-08-10 00:00",
    "last_location": "TRIPOLI, LY",
    "last_location_terminal": "SPCO ( SOCIALIST PORTS CO UNDER MINISTRY OF TRANSPORT ) ",
    "next_location": "TRIPOLI, LY - CY Depot",
    "next_location_terminal": "AL MOURSSALAT CONTAINER YARD",
    "atd_last_location": "2024-08-11 00:00",
    "eta_next_destination": "2024-08-20 00:00",
    "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",
    "customs_clearance": "2024-08-14 00:00",
    "last_vessel_name": "MSC LENA F",
    "last_voyage_number": "YF432A",
    "current_vessel_name": "MSC LENA F",
    "current_voyage_number": "YF432A",
    "last_updated": "2024-09-09 18:34"
  }
}
				
			

Endpoint 2: Get Container Numbers From Bill of Lading

Fetches a list of container numbers associated with a specific Bill of Lading (BoL) number.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET http://api.jsoncargo.com/api/v1/containers/bol/{bill_of_lading_number}?shipping_line={shipping_line_name}
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Path Parameters:

required

Query Parameters:

required

Request ParameterObject
MAERSKstring
HAPAG_LLOYDstring
HMMstring
ONEstring
EVERGREENstring
MSCstring
CMA_CGMstring
COSCOstring
ZIMstring
YANG_MINGstring
PILstring
Responses
View response sample

Response Schema: application/json

DataObject
bill_of_ladingstring
shipping_line_namestring
shipping_line_idstring
associated_containersinteger
associated_container_numbersarray of strings
last_updatedstring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
    "data": {
        "bill_of_lading": "SZPE72846000",
        "shipping_line_name": "Hyundai Merchant Marine",
        "shipping_line_id": "0012",
        "associated_containers": 16,
        "associated_container_numbers": [
            "CAIU9933760",
            "CLKU5004260",
            "GAOU6162340",
            "HDMU6653051",
            "HDMU6836237",
            "HMMU6053862",
            "HMMU6541677",
            "HMMU6668297",
            "KOCU4503822",
            "KOCU4771471",
            "KOCU4839231",
            "KOCU4904240",
            "KOCU5067657",
            "KOCU5082841",
            "ROEU8622402",
            "TGBU6353192"
        ],
        "last_updated": "2025-03-28 04:09"
    }
}
				
			

Endpoint 3: Get Basic Live Vessel Tracking Details

Fetches basic details of a vessel using either UUID, MMSI, or IMO as query parameters.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/vessel/api/v1/basic
http://api.jsoncargo.com/api/v1/vessel/basic
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

DataObject
uuidstring
mmsistring
imostring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataObject
uuidstring
namestring
mmsistring
imostring
enistring
country_isostring
typestring
type_specificstring
latnumber
lonnumber
speednumber
coursenumber
headingnumber
navigation_statusstring
destinationstring
last_position_epochinteger
last_position_UTCstring
eta_epochinteger
eta_UTCstring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "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 either UUID, MMSI, or IMO as query parameters.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/vessel/pro
http://api.jsoncargo.com/api/v1/vessel/pro
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

DataObject
uuidstring
mmsistring
imostring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataObject
uuidstring
namestring
mmsistring
imostring
enistring or None
country_isostring
typestring
type_specificstring
latnumber
lonnumber
speednumber
coursenumber
headingnumber
current_draughtnumber
navigation_statusstring or None
destinationstring
dest_port_uuidstring
dest_portstring
dest_port_unlocodestring
dep_port_uuidstring
dep_portstring
dep_port_unlocodestring
last_position_epochinteger
last_position_UTCstring
atd_epochinteger
atd_UTCstring
eta_epochinteger
eta_UTCstring
timezone_offset_secinteger
timezonestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "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 using their identifiers (UUID, MMSI, or IMO) as query parameters.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/vessel/bulk
http://api.jsoncargo.com/v1/vessel/bulk
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

DataObject
uuidstring
mmsistring
imostring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataArray of objects
uuidstring
namestring
mmsistring
imostring
enistring or None
country_isostring
typestring
type_specificstring
latnumber
lonnumber
speednumber
coursenumber
headingnumber
navigation_statusstring or None
destinationstring
last_position_epochinteger
last_position_UTCstring
eta_epochinteger or None
eta_UTCstring or None

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "data": {
    "total": 2,
    "vessels": [
      {
        "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.105115,
        "lon": 0.016225,
        "speed": 4.4,
        "course": 332.8,
        "heading": 333,
        "navigation_status": "Under way using engine",
        "destination": "SUNDERLAND",
        "last_position_epoch": 1638543058,
        "last_position_UTC": "2021-12-03T14:50:58Z",
        "eta_epoch": null,
        "eta_UTC": null
      },
      {
        "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": -4.92493,
        "lon": 11.52828,
        "speed": 10.8,
        "course": 204,
        "heading": 201,
        "navigation_status": null,
        "destination": "CGPNR\u003eGHTMA",
        "last_position_epoch": 1638335880,
        "last_position_UTC": "2021-12-01T05:18:00Z",
        "eta_epoch": null,
        "eta_UTC": null
  }
}
				
			

Endpoint 6: Vessel Finder API

Fetches static ship data using various query parameters.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/vessel/finder
http://api.jsoncargo.com/api/v1/vessel/finder
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

DataObject
namestring
fuzzyinteger
typestring
type_specificstring
country_isostring
gross_tonnage_mininteger
gross_tonnage_maxinteger
deadweight_mininteger
deadweight_maxinteger
length_minnumber
length_maxnumber
breadth_minnumber
breadth_maxnumber
year_built_mininteger
year_built_maxinteger
nextstring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataObject
uuidstring
namestring
name_aisstring or None
mmsistring or None
imostring or None
enistring or None
country_isostring
country_namestring or None
callsignstring or None
typestring
type_specificstring
gross_tonnageinteger or None
deadweightinteger or None
teuinteger or None
liquid_gasinteger or None
lengthnumber
breadthnumber
draught_avgnumber or None
draught_maxnumber or None
speed_avgnumber or None
speed_maxnumber or None
year_builtinteger or None
is_navaidboolean
home_portstring or None

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{"data": [
{
"uuid":"bd7614f7-82af-89d6-4d1b-7cf0d1bd0ce6",
"name":"THALASSINI",
"name_ais":"THALASSINI",
"mmsi":"229609000",
"imo":"9286592",
"eni":null,
"country_iso":"MT",
"country_name":"Malta",
"callsign":"9HA3445",
"type":"Cargo",
"type_specific":"Bulk Carrier",
"gross_tonnage":42887,
"deadweight":82977,
"teu":null,
"liquid_gas":null,
"length":228.99,
"breadth":32.26,
"draught_avg":null,
"draught_max":null,
"speed_avg":null,
"speed_max":null,
"year_built":"2005",
"is_navaid":false,
"home_port":"VALLETTA"},
{
"uuid":"c396d62a-7643-e57f-1f35-bc725cfd5a27",
"name":"THALASSINI",
"name_ais":"THALASSINI",
"mmsi":"205535790",
"imo":null,
"eni":"6105582",
"country_iso":"BE",
"country_name":"Belgium",
"callsign":"OT5357",
"type":"Cargo",
"type_specific":"Inland, Motor Freighter",
"gross_tonnage":null,
"deadweight":null,
"teu":null,"liquid_gas":null,
"length":110,
"breadth":11.5,
"draught_avg":null,
"draught_max":null,
"speed_avg":null,
"speed_max":null,
"year_built":null,
"is_navaid":false,
"home_port":null
  }
}
				
			

Endpoint 7: Vessel Specs Details API

Fetches static ship data using uuid, mmsi, or imo as query parameters.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/vessel/specs
http://api.jsoncargo.com/api/v1/vessel/specs
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

DataObject
uuidstring
mmsistring
imostring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataObject
uuidstring
namestring
name_aisstring or None
mmsistring or None
imostring or None
enistring or None
country_isostring
country_namestring or None
callsignstring or None
typestring
type_specificstring
gross_tonnageinteger or None
deadweightinteger or None
teuinteger or None
liquid_gasinteger or None
lengthnumber
breadthnumber
draught_avgnumber or None
draught_maxnumber or None
speed_avgnumber or None
speed_maxnumber or None
year_builtinteger or None
is_navaidboolean
home_portstring or None

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
"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

Endpoints for finding and retrieving port details.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/port/find
http://api.jsoncargo.com/api/v1/port/find
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

ObjectData
latnumber
lonnumber
radiusnumber
namestring
country_isostring
port_typestring
fuzzyinteger
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataArray of objects
port_namestring
unlocodestring
countrystring or None
latnumber
lonnumber
port_typestring
unlocodestring
areastring or None
country_isostring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "data": [
    {
      "uuid": "17f4481e-801a-2c57-a356-e8ccf561f14f",
      "port_name": "LONDON",
      "country_iso": "GB",
      "country_name": "United Kingdom",
      "unlocode": "GBLON",
      "port_type": "Port",
      "lat": 51.49743,
      "lon": -0.04960075,
      "area_lvl1": "UK Coast & Atlantic",
      "area_lvl2": "North Sea"
  }
}
				
			

Endpoint 9: Terminal Finder API

Endpoint for finding and retrieving terminal details.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/terminal
http://api.jsoncargo.com/api/v1/terminal
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			

Query Parameters:

ObjectData
unlocodestring
pagestring
limitstring
Responses
View response sample

Response Schema: application/json

DataObject
unlocodestring
alt_unlocodestring
codestring
terminal_namestring
company_namestring
latfloat
lonfloat
urlstring
addressstring

Response Schema: application/json

ErrorObject
Unlocode not valid, must contain at least 2 charactersstring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
    "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

Fetches the API key usage statistics, including the total number of requests, requests made, and requests available.

				
					Authorizations: ApiKeyAuth
				
			
				
					GET/api/v1/api_key/stats
http://api.jsoncargo.com/api/v1/api_key/stats
				
			

API Key: ApiKeyAuth

Header Parameter Name:

				
					x-api-key
				
			
Responses
View response sample

Response Schema: application/json

DataObject
planstring
requests_totalinteger
requests_madeinteger
requests_availableinteger

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response Schema: application/json

ErrorObject
titlestring

Response sample:

				
					Content type
application/json
				
			
				
					{
  "data": {
    "plan": "MARINER",
    "requests_total": 2000,
    "requests_made": 6,
    "requests_available": 1994
  }
}
				
			

Programming Languages

JSONCargo supports various programming languages. The language examples below is illustrative, JSONCargo API is not limited to these languages only.

jsoncargo curl container api
				
					curl --location 'http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE" \
--header 'x-api-key: "YOUR_API_KEY"
				
			
jsoncargo go container api
				
					package main
import (
  "fmt"
  "net/http"
  "io"
)
func main() {
  url := "http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE"
  method := "GET"
  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)
  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("x-api-key", "YOUR_API_KEY")
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()
  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
				
			
jsoncargo node container api
				
					const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE",
  headers: {
    'x-api-key': "YOUR_API_KEY"
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
				
			
jsoncargo ruby container api
				
					require "uri"
require "net/http"
url = URI("http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["x-api-key"] = "YOUR_API_KEY"
response = http.request(request)
puts response.read_body
				
			
jsoncargo php container api
				
					<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: "YOUR_API_KEY"
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
				
			
jsoncargo Java container api
				
					OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE")
  .method("GET", body)
  .addHeader("x-api-key", "YOUR_API_KEY")
  .build();
Response response = client.newCall(request).execute();
				
			
jsoncargo python container api
				
					import requests
url = "http://api.jsoncargo.com/api/v1/containers/"PARAMETER_VALUE"
payload = {}
headers = {
  'x-api-key': "YOUR_API_KEY"
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
				
			

Need Help or Have Questions?

If you need further assistance or encounter any issues while using our API please don’t hesitate to contact our support team. We’re here to help!

Support email

General inquiries

We also value your feedback! Feel free to share your thoughts on how we can improve our services.