FT
FreightUtils.com

API Documentation

All FreightUtils calculators are available as free, open REST API endpoints

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.

Base URL: https://freightutils.com/api
GET/api/ldmLoading Metres Calculator

Calculate the loading metres (LDM) required for a consignment on a UK/EU road freight trailer.

Parameters

ParameterTypeRequiredDescriptionDefault
lengthnumberYes*Pallet length in millimetres
widthnumberYes*Pallet width in millimetres
palletstringNo*Preset: euro, uk, half, quarter. Replaces length/width.
qtyintegerNoNumber of pallets1
stackablebooleanNoWhether pallets can be stackedfalse
stack2 or 3NoMax stack height (used when stackable=true)2
weightnumberNoWeight per pallet in kgnull
vehiclestringNoartic, rigid10, rigid75, luton, customartic
vehicle_lengthnumberNoCustom vehicle length in metres (required when vehicle=custom)

* Either pallet (preset ID) or both length and width must be provided.

Example Requests

12 Euro pallets on an artic:

GET /api/ldm?pallet=euro&qty=12&vehicle=artic

Custom dimensions, stackable, with weight check:

GET /api/ldm?length=1200&width=1000&qty=5&stackable=true&stack=2&weight=300&vehicle=rigid10

cURL example:

curl "https://freightutils.com/api/ldm?pallet=euro&qty=12&vehicle=artic"

Response

{ "ldm": 4.8, "vehicle": { "name": "13.6m Artic Trailer", "length_m": 13.6, "max_payload_kg": 24000 }, "utilisation_percent": 35.29, "pallet_spaces": { "used": 12, "available": 33 }, "total_weight_kg": null, "fits": true, "warnings": [], "meta": { "inputs": { "length_mm": 1200, "width_mm": 800, "qty": 12, "stackable": false, "stack_factor": 2, "weight_per_pallet_kg": null, "vehicle": "artic" } } }
GET/api/cbmCubic Metres Calculator

Calculate the cubic metre (CBM) volume of a shipment. Returns total CBM plus equivalents in cubic feet, litres, and cubic inches.

Parameters

ParameterTypeRequiredDescriptionDefault
lnumberYesLength of one piece in centimetres
wnumberYesWidth of one piece in centimetres
hnumberYesHeight of one piece in centimetres
pcsintegerNoNumber of identical pieces1

Example Request

5 boxes, 120×80×100 cm each:

curl "https://freightutils.com/api/cbm?l=120&w=80&h=100&pcs=5"
{ "cbm_per_piece": 0.096, "total_cbm": 0.48, "total_volume_m3": 0.48, "cubic_feet": 16.951, "litres": 480, "cubic_inches": 29291.4, "pieces": 5, "meta": { "inputs": { "length_cm": 120, "width_cm": 80, "height_cm": 100, "pieces": 5 } } }
GET/api/adrADR 2025 Dangerous Goods Lookup

Look up ADR 2025 dangerous goods by UN number, search by substance name, or filter by hazard class. The dataset contains 2,336 entries from the ADR 2025 Dangerous Goods List (Table A). Responses are cached for 1 hour (s-maxage=3600).

Query Modes

ParameterTypeDescriptionMax results
unstringExact UN number lookup. Accepts 1203, UN1203, or 01203.1
searchstringCase-insensitive partial match on the proper shipping name. Min 2 characters.20
classstringFilter by ADR hazard class (e.g. 3, 6.1, 1.1).50

Provide exactly one parameter per request. Omitting all parameters returns a 400 with usage hints.

Example Requests

Exact UN number lookup:

curl "https://freightutils.com/api/adr?un=1203"
{ "count": 1, "results": [ { "un_number": "1203", "proper_shipping_name": "MOTOR SPIRIT or GASOLINE or PETROL", "class": "3", "classification_code": "F1", "packing_group": "II", "labels": ["3"], "special_provisions": ["243", "534", "664"], "limited_quantity": "1 L", "excepted_quantity": "E2", "transport_category": 2, "tunnel_restriction_code": "D/E", "transport_prohibited": false, "hazard_identification_number": "33" } ] }

Search by substance name:

curl "https://freightutils.com/api/adr?search=acetone"
{ "count": 3, "results": [ ... ] }

Filter by hazard class:

curl "https://freightutils.com/api/adr?class=3"
{ "count": 50, "results": [ ... ] }
GET/api/chargeable-weightAir Freight Chargeable Weight

Calculate air freight chargeable weight — whichever is higher between actual gross weight and volumetric (dimensional) weight. Supports custom volumetric factors for all carriers.

Parameters

ParameterTypeRequiredDescriptionDefault
lnumberYesLength of one piece in centimetres
wnumberYesWidth of one piece in centimetres
hnumberYesHeight of one piece in centimetres
gwnumberYesTotal gross weight of all pieces in kg
pcsintegerNoNumber of identical pieces1
factorintegerNoVolumetric divisor: 6000 (IATA standard), 5000 (express carriers)6000

Example Request

2 pieces, 120×80×100 cm, 500 kg total, IATA factor:

curl "https://freightutils.com/api/chargeable-weight?l=120&w=80&h=100&gw=500&pcs=2&factor=6000"
{ "chargeable_weight_kg": 640, "basis": "volumetric", "gross_weight_kg": 500, "volumetric_weight_kg": 640, "volumetric_weight_per_piece_kg": 320, "cbm": 1.92, "ratio": 3.84, "factor": 6000, "pieces": 2, "meta": { "inputs": { "length_cm": 120, "width_cm": 80, "height_cm": 100, "gross_weight_kg": 500, "pieces": 2, "factor": 6000 } } }
GET/api/palletPallet Box Fitting Calculator

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

ParameterTypeRequiredDescriptionDefault
plnumberYesPallet length in centimetres
pwnumberYesPallet width in centimetres
pmhnumberYesMaximum total stack height in centimetres (floor to top of cargo)
blnumberYesBox length in centimetres
bwnumberYesBox width in centimetres
bhnumberYesBox height in centimetres
phnumberNoPallet board/deck height in cm — deducted from usable height15
bwtnumberNoWeight per box in kg — enables weight constraint calculation
mpwnumberNoMaximum pallet payload weight in kg — caps result if weight exceeded
rotatebooleanNoAllow 90° rotation of boxes for best fit. Pass false to disable.true

Example Request

curl "https://freightutils.com/api/pallet?pl=120&pw=80&pmh=220&bl=40&bw=30&bh=25&bwt=5&mpw=1500"
{ "boxes_per_layer": 8, "layers": 8, "total_boxes": 64, "orientation": "original", "boxes_per_row": 3, "boxes_per_col": 2, "usable_height_cm": 205, "utilisation_percent": 62.5, "total_box_volume_cbm": 0.192, "pallet_volume_cbm": 1.968, "wasted_space_cbm": 1.776, "weight_limited": false, "total_weight_kg": 320, "remaining_weight_capacity_kg": 1180, "meta": { "inputs": { "pallet_length_cm": 120, "pallet_width_cm": 80, "pallet_max_height_cm": 220, "pallet_height_cm": 15, "box_length_cm": 40, "box_width_cm": 30, "box_height_cm": 25, "box_weight_kg": 5, "max_payload_weight_kg": 1500, "allow_rotation": true } } }

HTTP Status Codes

CodeMeaning
200Success — calculation result returned as JSON
400Bad Request — missing or invalid parameters. Check the details array in the response.
405Method Not Allowed — only GET requests are supported
500Internal Server Error — unexpected error, please report via GitHub

Rate Limiting

The API is currently free and unmetered. As a courtesy, please keep requests under 1,000/hour per IP. Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Window: 3600