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.
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:
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
| 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. | 20 |
class | string | Filter 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:
Search by substance name:
Filter by hazard class:
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
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success — calculation result returned as JSON |
| 400 | Bad Request — missing or invalid parameters. Check the details array in the response. |
| 405 | Method Not Allowed — only GET requests are supported |
| 500 | Internal 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-Window: 3600