Container Load API
Geometric pallet-fit calculator for shipping containers and trailers. Returns max pallets per floor (testing both orientations), double-stack count if pallets fit height-wise, floor / volume utilization, and whether weight caps the count before geometry does. JSON in, JSON out. CORS open. Free for 60 requests per hour without a key.
30-second start
POST your inputs. Get back the answer in JSON. No signup. No key required for the first 60 calls per hour per IP.
curl
curl -X POST https://www.wearewarp.com/api/v1/tools/container-load \
-H "Content-Type: application/json" \
-d '{"pallet_length":48,"pallet_width":40,"pallet_height":56,"pallet_weight":1200,"container":"trailer_53ft"}'Or use GET with query params for one-liners:
curl GET
curl "https://www.wearewarp.com/api/v1/tools/container-load?pallet_length=48&pallet_width=40&pallet_height=56&pallet_weight=1200&container=trailer_53ft"
Request
POST /api/v1/tools/container-load
40 ft High Cube container example (can_double_stack: true):
curl
curl -X POST https://www.wearewarp.com/api/v1/tools/container-load \
-H "Content-Type: application/json" \
-d '{"pallet_length":48,"pallet_width":40,"pallet_height":48,"pallet_weight":900,"container":"container_40ft_hc"}'Response
Every response has a data envelope (the computed result) and a meta envelope (rate limits, docs, upgrade path, attribution).
200 OK
{
"data": {
"container": {
"slug": "trailer_53ft",
"name": "53 ft Trailer",
"length_in": 630,
"width_in": 98.5,
"height_in": 108,
"max_lbs": 44000
},
"pallets_floor": 30,
"pallets_stacked": 30,
"effective_floor": 30,
"effective_stacked": 30,
"can_double_stack": false,
"weight_limited": false,
"floor_util_pct": 92.8,
"volume_util_pct": 48.1,
"max_by_weight_floor": 36
},
"meta": {
"request_id": "req_lzgk2zo_a1b2c3d4",
"tier": "anon",
"rate_limit": { "limit": 60, "remaining": 59, "reset_at": "2026-05-15T19:00:00.000Z" },
"docs": "https://www.wearewarp.com/developers/tools-api/container-load",
"attribution": "Powered by Warp — https://www.wearewarp.com"
}
}Code samples
JavaScript (fetch)
const res = await fetch('https://www.wearewarp.com/api/v1/tools/container-load', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"pallet_length":48,"pallet_width":40,"pallet_height":56,"pallet_weight":1200,"container":"trailer_53ft"}),
});
const { data, meta } = await res.json();
console.log(data.pallet_length);Python (requests)
import requests
res = requests.post(
"https://www.wearewarp.com/api/v1/tools/container-load",
json={"pallet_length":48,"pallet_width":40,"pallet_height":56,"pallet_weight":1200,"container":"trailer_53ft"},
)
data = res.json()["data"]
print(data["pallet_length"])curl with sandbox key
curl -X POST https://www.wearewarp.com/api/v1/tools/container-load \
-H "Content-Type: application/json" \
-H "Authorization: Bearer wak_test_YOUR_KEY" \
-d '{"pallet_length":48,"pallet_width":40,"pallet_height":56,"pallet_weight":1200,"container":"trailer_53ft"}'Rate limits and tiers
No tier blocks access. Hit the limit and the response includes an upgradeURL with the next tier's signup flow.
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. The meta.rate_limit object mirrors the same values in JSON.
Rate-limited response:
429 Too Many Requests
{
"error": "Anonymous rate limit reached (60/hr). Get a free sandbox key for 1000/hr at https://www.wearewarp.com/agents/account.",
"code": "RATE_LIMITED",
"meta": { "tier": "anon", "rate_limit": { "limit": 60, "remaining": 0 }, "upgrade": "..." }
}Errors
Bad input example:
400 Bad Request
{
"error": "pallet dimensions and weight must all be greater than zero.",
"code": "BAD_INPUT",
"meta": { "request_id": "req_...", "docs": "https://www.wearewarp.com/developers/tools-api/container-load" }
}Attribution
The free tier carries an attribution request: link back to wearewarp.com from any surface that displays results from this API. A “Powered by Warp” link in your footer is enough. Live keys remove the attribution request.
Every API response includes meta.attribution so you can render the link programmatically.
How the load is calculated
- Try both orientations. Compute floor(length ÷ pallet_length) × floor(width ÷ pallet_width) and the rotated version (pallet swapped). Take the max.
- Double-stack check. If pallet_height × 2 ≤ container_height, pallets_stacked = pallets_floor × 2. Otherwise pallets_stacked = pallets_floor.
- Weight cap. max_by_weight_floor = floor(max_lbs ÷ pallet_weight). effective_floor = min(pallets_floor, max_by_weight_floor).
- Utilization. floor_util = pallet_area × effective_floor ÷ container_floor_area × 100. volume_util uses effective_stacked × pallet_volume ÷ container_volume.
This is a geometric maximum, not a practical maximum. Real-world loading constraints — door access, aisle space, pallet handling, mixed orientations within a single load — typically yield 10-15% fewer pallets than pure geometry suggests. Use the result as an upper bound, not a guarantee.
Related
Get a free sandbox key
Sandbox keys take 30 seconds. No card. 1,000 calls per hour across every Warp tool API.