{"openapi":"3.1.0","info":{"title":"Hay Bale Weight API","version":"1.0.0","description":"Hay and forage bale maths as an API, computed locally and deterministically — the weight, dry-matter and feed-supply numbers a rancher, hay producer or livestock manager plans winter feed with. The round-bale endpoint gives the weight from the cylinder volume (π·r²·width) × the dry-matter density (typically ~9–12 lb/ft³ for cured hay), so a 5×5 ft bale runs about 1,000 lb, and reports the dry-matter weight (≈88 % of as-fed) that actually feeds the animals — buy and ration on dry matter, not gate weight. The square-bale endpoint gives the weight of a rectangular bale from its length, width and height (÷ 1,728 for cubic feet from inches) × the density — a typical 14×18×36-inch small square is about 50 lb, big 3×3 or 4×4 ft bales hundreds — with a reminder that high moisture both adds weight and risks mould and barn-fire heating. The feed-supply endpoint sizes the stack: feed needed = head × daily intake × days (cattle eat ~2–2.5 % of bodyweight, about 25–30 lb of dry matter for a beef cow), and bales = that ÷ the bale weight, so 30 cows for 120 days at 30 lb is about 108 thousand-pound bales — add 10–20 % for feeding waste. Everything is computed locally and deterministically, so it is instant and private. Ideal for ranch- and farm-management tools, hay-trading and livestock apps, and ag calculators. Pure local computation — no key, no third-party service, instant. US units; densities are estimates. 3 compute endpoints. For grain storage use a grain-bin API; for rotational grazing a grazing API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/baleweight-api","description":"oanor gateway"}],"tags":[{"name":"Bale"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/feed-supply":{"get":{"operationId":"get_v1_feed_supply","tags":["Bale"],"summary":"Bales needed to feed a herd","description":"","parameters":[{"name":"bale_weight_lb","in":"query","required":true,"description":"Weight per bale (lb)","schema":{"type":"string"},"example":"1000"},{"name":"animal_count","in":"query","required":true,"description":"Number of animals","schema":{"type":"string"},"example":"30"},{"name":"daily_intake_lb_per_head","in":"query","required":true,"description":"Daily intake per head (lb)","schema":{"type":"string"},"example":"30"},{"name":"days","in":"query","required":true,"description":"Number of days","schema":{"type":"string"},"example":"120"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Feed needed = head × daily intake × days; bales = that ÷ the bale weight. Cattle eat roughly 2–2.5 % of bodyweight per day in dry matter (about 25–30 lb for a beef cow), so 30 cows for 120 days at 30 lb each is 108,000 lb — about 108 thousand-pound bales. Add 10–20 % for feeding waste and refusal, more if bales are fed on the ground without a ring.","inputs":{"days":120,"animal_count":30,"bale_weight_lb":1000,"daily_intake_lb_per_head":30},"whole_bales":108,"bales_needed":108,"total_feed_lb":108000},"meta":{"timestamp":"2026-06-07T08:17:59.288Z","request_id":"fd294a63-0728-4c94-b74c-0ef2295ed85c"},"status":"ok","message":"Feed supply","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/round-bale":{"get":{"operationId":"get_v1_round_bale","tags":["Bale"],"summary":"Round-bale weight and dry matter","description":"","parameters":[{"name":"diameter_ft","in":"query","required":true,"description":"Bale diameter (ft)","schema":{"type":"string"},"example":"5"},{"name":"width_ft","in":"query","required":true,"description":"Bale width (ft)","schema":{"type":"string"},"example":"5"},{"name":"density_lb_ft3","in":"query","required":false,"description":"Density (lb/ft³, default 10)","schema":{"type":"string"},"example":"10"},{"name":"dry_matter_pct","in":"query","required":false,"description":"Dry matter % (default 88)","schema":{"type":"string"},"example":"88"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A round bale's weight = its cylinder volume (π·r²·width) × the dry-matter density (typically ~9–12 lb/ft³ for dry hay — wetter, tighter bales weigh more). A 5×5 ft bale runs roughly 1,000 lb. The dry-matter weight (≈88 % of as-fed for cured hay) is what actually feeds the animals, so buy and ration on dry matter, not the gate weight.","inputs":{"width_ft":5,"diameter_ft":5,"density_lb_ft3":10,"dry_matter_pct":88},"weight_lb":982,"volume_ft3":98.17,"dry_matter_lb":864},"meta":{"timestamp":"2026-06-07T08:17:59.364Z","request_id":"ef95c6fb-c074-44c3-bb45-993041d2ee0a"},"status":"ok","message":"Round bale","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/square-bale":{"get":{"operationId":"get_v1_square_bale","tags":["Bale"],"summary":"Square-bale weight","description":"","parameters":[{"name":"length_in","in":"query","required":true,"description":"Length (inches)","schema":{"type":"string"},"example":"36"},{"name":"width_in","in":"query","required":true,"description":"Width (inches)","schema":{"type":"string"},"example":"18"},{"name":"height_in","in":"query","required":true,"description":"Height (inches)","schema":{"type":"string"},"example":"14"},{"name":"density_lb_ft3","in":"query","required":false,"description":"Density (lb/ft³, default 10)","schema":{"type":"string"},"example":"10"},{"name":"dry_matter_pct","in":"query","required":false,"description":"Dry matter % (default 88)","schema":{"type":"string"},"example":"88"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A square (rectangular) bale's weight = length × width × height (÷ 1,728 for cubic feet from inches) × the density. A typical 14×18×36-inch small square is about 50 lb; big 3×3 or 4×4 ft bales run hundreds. Tighter packing and higher moisture both raise the weight — and high moisture risks mould and barn-fire heating, so bale dry hay below ~18 % moisture.","inputs":{"width_in":18,"height_in":14,"length_in":36,"density_lb_ft3":10,"dry_matter_pct":88},"weight_lb":52.5,"volume_ft3":5.25,"dry_matter_lb":46.2},"meta":{"timestamp":"2026-06-07T08:17:59.461Z","request_id":"d2482871-7ad5-442a-bf24-ee44976ce6ce"},"status":"ok","message":"Square bale","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"US units (ft, in, lb/ft³, lb). round = π·r²·width·density; square = L·W·H/1728·density; bales = head·intake·days/bale weight. Dry hay ~9–12 lb/ft³, ~88 % DM. For grain storage use a grain-bin API; for rotational grazing a grazing API.","service":"baleweight-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/round-bale":"Round-bale volume, weight and dry matter.","GET /v1/feed-supply":"Bales needed to feed a herd for a period.","GET /v1/square-bale":"Square-bale weight from length/width/height."},"description":"Hay/forage bale maths: round and square bale weight from size and density, and bales needed to feed a herd."},"meta":{"timestamp":"2026-06-07T08:17:59.574Z","request_id":"bd07db47-0245-4129-9cd9-0ddb1a53bb38"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":7250,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":890,"monthly_call_quota":75500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2920,"monthly_call_quota":320000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":8980,"monthly_call_quota":1500000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/baleweight-api"}