Compatible with Swagger, Postman, and RapidAPI import
Overview
The FreightUtils API is a free, stateless REST API. Every calculator on this site has a corresponding API endpoint. No authentication is required. Responses are JSON. CORS is enabled for all origins.
Reliability & Support
FreightUtils APIs are hosted on Vercel's global edge network with automatic SSL and CDN caching.
MCP Server β AI Agent Integration
FreightUtils is available as a Model Context Protocol (MCP) server, giving AI agents direct access to all 18 freight calculation and reference tools. The first and only freight MCP server.
claude_desktop_config.json:Get Started in 2 Minutes
// FreightUtils API β JavaScript example // Calculate loading metres for 10 Euro pallets const response = await fetch( 'https://www.freightutils.com/api/ldm?pallet=euro&qty=10' ); const data = await response.json(); console.log(`LDM: ${data.ldm}`); console.log(`Utilisation: ${data.utilisation_percent}%`); console.log(`Fits: ${data.fits}`);
All endpoints work the same way. No auth, no signup. Full reference below β
Composite endpoint that chains CBM, chargeable weight, LDM, ADR compliance, and UK duty/VAT estimation into a single call. Accepts a unified Shipment object and returns comprehensive results based on transport mode.
Mode Parameter
| Mode | Calculations Included |
|---|---|
road | CBM, LDM, pallet spaces, trailer utilisation, road chargeable weight (1 LDM = 1,750 kg), vehicle suggestion |
air | CBM, volumetric weight (1 CBM = 167 kg), air chargeable weight |
sea | CBM, revenue tonnes (W/M at 1 CBM = 1,000 kg), container suggestion |
multimodal | All of the above β road, air, and sea calculations combined |
Example Request
Mixed 3-item road shipment with a DG item and HS code:
Example Response
Pro tier endpoint. Free tier: 25 calls/day. Subscribe for higher limits.
Calculate the cubic metre (CBM) volume of a shipment. Returns total CBM plus equivalents in cubic feet, litres, and cubic inches.
Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
l | number | Yes | Length of one piece in centimetres | β |
w | number | Yes | Width of one piece in centimetres | β |
h | number | Yes | Height of one piece in centimetres | β |
pcs | integer | No | Number of identical pieces | 1 |
Example Request
5 boxes, 120Γ80Γ100 cm each:
Calculate air freight chargeable weight β whichever is higher between actual gross weight and volumetric (dimensional) weight. Supports custom volumetric factors for all carriers.
Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
l | number | Yes | Length of one piece in centimetres | β |
w | number | Yes | Width of one piece in centimetres | β |
h | number | Yes | Height of one piece in centimetres | β |
gw | number | Yes | Total gross weight of all pieces in kg | β |
pcs | integer | No | Number of identical pieces | 1 |
factor | integer | No | Volumetric divisor: 6000 (IATA standard), 5000 (express carriers) | 6000 |
Example Request
2 pieces, 120Γ80Γ100 cm, 500 kg total, IATA factor:
Calculate how many boxes fit on a pallet using a layer-based algorithm. Returns boxes per layer, number of layers, total boxes, orientation used, and volume/weight analysis. Optional weight constraint caps the result at the pallet's maximum payload.
Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
pl | number | Yes | Pallet length in centimetres | β |
pw | number | Yes | Pallet width in centimetres | β |
pmh | number | Yes | Maximum total stack height in centimetres (floor to top of cargo) | β |
bl | number | Yes | Box length in centimetres | β |
bw | number | Yes | Box width in centimetres | β |
bh | number | Yes | Box height in centimetres | β |
ph | number | No | Pallet board/deck height in cm β deducted from usable height | 15 |
bwt | number | No | Weight per box in kg β enables weight constraint calculation | β |
mpw | number | No | Maximum pallet payload weight in kg β caps result if weight exceeded | β |
rotate | boolean | No | Allow 90Β° rotation of boxes for best fit. Pass false to disable. | true |
Example Request
Look up ADR 2025 dangerous goods by UN number, search by substance name, or filter by hazard class. The dataset contains 2,939 entries from the ADR 2025 Dangerous Goods List (Table A). Responses are cached for 1 hour (s-maxage=3600).
Query Modes
| Parameter | Type | Description | Max results |
|---|---|---|---|
un | string | Exact UN number lookup. Accepts 1203, UN1203, or 01203. | 1 |
search | string | Case-insensitive partial match on the proper shipping name. Min 2 characters. Also accepts q as an alias. | 50 |
class | string | Filter by ADR hazard class (e.g. 3, 6.1, 1.1). | 100 |
Provide exactly one parameter per request. Omitting all parameters returns a 400 with usage hints.
Example Requests
Exact UN number lookup:
Search by substance name:
Filter by hazard class:
Calculate whether the ADR 1.1.3.6 small load exemption applies to a dangerous goods consignment. Supports single-substance GET queries and multi-substance POST requests. Checks both total points threshold (1,000) and per-substance quantity limits per ADR 1.1.3.6.3.
GET β Single Substance
| Parameter | Type | Required | Description |
|---|---|---|---|
un | string | Yes | UN number (e.g. 1203) |
qty | number | Yes | Quantity in kg or litres |
Example β 200 litres of petrol:
POST β Multi-Substance Load
Request body:
Response structure is identical to the GET endpoint, with multiple items in the array.
Response Fields
| Field | Type | Description |
|---|---|---|
transport_category | string | ADR transport category (0β4) |
multiplier | number | null | Points multiplier for the category (null for cat 0) |
points | number | null | quantity Γ multiplier |
total_points | number | Sum of all substance points |
exempt | boolean | true if total β€ 1,000 AND no cat 0 AND no quantity exceedance |
has_category_zero | boolean | true if any substance is transport category 0 |
has_quantity_exceedance | boolean | true if any substance exceeds its per-category max quantity |
warnings | string[] | Human-readable warning messages for limit violations |
Check whether dangerous goods qualify for ADR Limited Quantity (Chapter 3.4) or Excepted Quantity (Chapter 3.5) concessions. Accepts up to 20 items per request and returns per-item pass/fail status against ADR Table A limits.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | lq (default) or eq |
items | array | Yes | 1β20 items to check |
items[].un_number | string | Yes | UN number (e.g. 1203) |
items[].quantity | number | Yes | Quantity per inner packaging |
items[].unit | string | No | ml, L (default), g, or kg |
items[].inner_packaging_qty | number | No | Number of inner packagings per outer (EQ mode only) |
Example β check LQ for 0.5 L of petrol:
Response Fields
| Field | Type | Description |
|---|---|---|
mode | string | lq or eq |
overall_status | string | qualifies, does_not_qualify, or partial |
items[] | array | Per-item results with substance info, limits, and pass/fail |
items[].status | string | within_limit, exceeds_limit, or not_permitted |
summary | object | Counts of qualifying, exceeding, and not-permitted items |
references | object | ADR chapter and table references |
Search airlines by name, IATA code, ICAO code, AWB prefix, or country. The dataset contains6,352 airlines including 390 cargo airlines with AWB prefixes.
Query Modes
| Parameter | Type | Description | Match |
|---|---|---|---|
q | string | General search β matches name, codes, prefix, country. Smart: 2β3 digits match prefix only, 2β3 letters match IATA/ICAO only, 4+ chars search all fields. | Smart |
iata | string | IATA 2-letter code (e.g. EK) | Exact |
icao | string | ICAO 3-letter code (e.g. UAE) | Exact |
prefix | string | AWB 3-digit prefix (e.g. 176) | Exact |
country | string | Country name (e.g. Germany) | Partial |
Example Requests
AWB prefix lookup:
IATA code lookup:
Name search:
Response Fields
| Field | Type | Description |
|---|---|---|
slug | string | URL-friendly identifier |
airline_name | string | Official airline name |
iata_code | string | null | 2-character IATA designator |
icao_code | string | null | 3-character ICAO designator |
awb_prefix | string[] | null | 3-digit AWB prefix(es) β array, some airlines have multiple |
callsign | string | null | Radio callsign for ATC communication |
country | string | null | Country of registration |
has_cargo | boolean | true if airline has AWB prefix(es) |
aliases | string[] | null | Alternative names (e.g. cargo division name) |
verified | boolean | true if prefix confirmed from multiple independent sources |
Look up INCOTERMS 2020 trade terms. Returns all 11 terms by default, or filter by code or transport category. Each term includes seller/buyer responsibilities, risk and cost transfer points, insurance obligations, and practical guidance.
Parameters
| Parameter | Type | Description |
|---|---|---|
code | string | INCOTERM code (e.g. FOB, CIF, DDP) |
category | string | Filter by transport mode: any_mode or sea_only |
Omit all parameters to return all 11 INCOTERMS 2020 terms.
Example Requests
Single term lookup:
Filter by transport category:
All terms:
Shipping container specifications β internal/external dimensions, weights, door openings, and pallet capacity for all 10 standard ISO container types. Optionally calculate how many items fit in a specific container.
Query Modes
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | No | Container slug (e.g. 20ft-standard, 40ft-high-cube). Omit to list all. |
l | number | No | Item length in cm (requires type + w + h) |
w | number | No | Item width in cm |
h | number | No | Item height in cm |
wt | number | No | Item weight in kg |
qty | integer | No | Number of items |
Example Requests
List all containers:
Single container specs:
Loading calculation β how many 60Γ40Γ40cm boxes fit in a 40ft HC:
Convert between freight-relevant units β weights, volumes, lengths, and freight-specific conversions (CBM to chargeable weight, CBM to freight tonnes).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | number | Yes | The number to convert |
from | string | Yes | Source unit code |
to | string | Yes | Target unit code |
Supported Unit Codes
| Group | Codes |
|---|---|
| Weight | kg, lbs, oz, tonnes, short_tons, long_tons |
| Volume | cbm, cuft, cuin, litres, gal_us, gal_uk |
| Length | cm, inches, m, feet, mm |
| Freight | chargeable_kg (target only, from=cbm), freight_tonnes (target only, from=cbm) |
Example Requests
Standard conversion:
CBM to chargeable weight (IATA 6000 divisor):
CBM to freight tonnes (W/M rule):
Search and browse Harmonized System (HS 2022) commodity codes. Supports text search by product description, exact code lookup with ancestor chain, and section browsing. Covers all 6,940 codes across 21 sections and 97 chapters.
Query Modes
| Parameter | Type | Description | Max results |
|---|---|---|---|
q | string | Case-insensitive search on descriptions and codes. Min 2 characters. | 50 |
code | string | Exact HS code lookup (2, 4, or 6 digit). Returns full details with ancestor chain and children. | 1 |
section | string | Browse by section (Roman numeral, e.g. II). Returns all chapters in that section. | All |
Provide exactly one parameter per request. Omitting all parameters returns a 400 with usage hints.
Example Requests
Search by description:
Code lookup with ancestors:
Browse section:
Calculate total CBM, gross weight, LDM, and chargeable weight across multiple mixed items in a single consignment. Supports road, air, and sea modes with mode-specific chargeable weight calculations.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | road (default), air, or sea |
items | array | Yes | 1β50 item objects (see below) |
Item Object Fields
| Field | Type | Required | Description |
|---|---|---|---|
length | number | Yes | Length in cm |
width | number | Yes | Width in cm |
height | number | Yes | Height in cm |
quantity | integer | No | Number of items (default: 1) |
grossWeight | number | No | Gross weight per item in kg |
stackable | boolean | No | Whether items can be stacked (default: false) |
pallet_type | string | No | euro, uk, us, custom, none |
description | string | No | Item description |
Example Request
Estimate UK import duty and VAT for a commodity code using live GOV.UK Trade Tariff data. Accepts customs value, origin country, freight/insurance costs, and INCOTERM for CIF adjustment.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
commodity_code | string | Yes | HS/tariff code (min 6 digits) |
origin_country | string | Yes | ISO 2-letter country code (e.g. CN, DE) |
customs_value | number | Yes | Goods value in GBP |
freight_cost | number | No | Freight cost in GBP (added to CIF value) |
insurance_cost | number | No | Insurance cost in GBP (added to CIF value) |
incoterm | string | No | INCOTERM (e.g. FOB, CIF, EXW) |
Example Request
Search and look up UN/LOCODE transport locations β 116,129+ seaports, airports, rail terminals, inland depots, and border crossings worldwide. Responses are cached for 24 hours.
Query Modes
| Parameter | Type | Description |
|---|---|---|
code | string | Exact UN/LOCODE lookup (e.g. GBLHR, NLRTM) |
q | string | Search by name (e.g. rotterdam, heathrow) |
country | string | Filter by country code (e.g. GB, NL) |
function | string | Filter by function: port, airport, rail, road, icd, border |
limit | integer | Max results (1β100, default: 20) |
Example Requests
Search by name:
Exact code lookup:
Filter by country and function:
Look up air freight Unit Load Device (ULD) specifications. 15 types including LD3 (AKE), PMC main deck pallet, temperature-controlled containers, and more. Returns dimensions, weights, volume, and aircraft compatibility.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | ULD code or slug (e.g. AKE, PMC). Omit to list all. |
category | string | Filter: container, pallet, or special |
deck | string | Filter by deck: lower or main |
Example Requests
Single ULD lookup:
Filter by category:
All ULD types:
Look up road freight vehicle and trailer specifications. 17 types covering articulated trailers, rigid trucks, and vans. Returns internal dimensions, payload limits, pallet capacity, and features.
Parameters
| Parameter | Type | Description |
|---|---|---|
slug | string | Vehicle slug (e.g. standard-curtainsider). Omit to list all. |
category | string | Filter: articulated, rigid, or van |
region | string | Filter: EU or US |
Example Requests
Single vehicle lookup:
Filter by category:
Filter by region:
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success β calculation result returned as JSON |
| 400 | Bad Request β missing or invalid parameters. Check the error message in the response. |
| 404 | Not Found β no results for the given query (airlines and ADR endpoints) |
| 405 | Method Not Allowed β only GET (or POST for /api/adr-calculator, /api/adr/lq-check, /api/shipment/summary) is supported |
| 500 | Internal Server Error β unexpected error, please report via GitHub |
Field Naming
All endpoints use snake_case field names in responses (e.g. internal_length_cm, max_gross_kg). POST request bodies on /api/duty and /api/consignment accept either casing for backwards compatibility β snake_case is the documented form.
Rate Limiting
The API is free to use. Anonymous rate limit: 25 requests per day per IP. Free API key: 100 requests per day. Pro: 50,000 requests per month.
Error Responses
All endpoints return standard HTTP error codes with a descriptive JSON error message:
Platform Commitments
Five pages that spell out what you can rely on:
Source Code & Issue Reporting
FreightUtils is open source. Report bugs, request features, or contribute on GitHub: github.com/SoapyRED/freighttools. For data corrections or API support, email contact@freightutils.com.