{"openapi":"3.1.0","info":{"title":"Roofing Calculator API","version":"1.0.0","description":"Roofing geometry as an API, computed locally and deterministically. The pitch endpoint converts a roof pitch between every common form — rise-over-run (such as 6:12), the angle in degrees, the percent slope, and the slope multiplier (the factor that turns a flat footprint into the real sloped area). The rafter endpoint computes the rafter length from the horizontal run and the pitch — that is, the hypotenuse √(run² + rise²) — with an optional overhang projected along the slope. The area endpoint computes the true sloped roof area from the building footprint (entered directly or as length × width) and the pitch, adds a wastage allowance, and reports the number of US roofing squares and shingle bundles needed. Everything is computed locally and deterministically, so it is instant and private. Lengths are unit-agnostic — use consistent units — while the squares and bundles figures assume US roofing squares of 100 square feet, so pass the footprint in square feet for those. Ideal for roofing contractors and estimators, construction and DIY tools, solar-install planning, and quoting software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is roof geometry; for paint, tile, concrete and brick quantities use a construction-calculator API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/roofing-api","description":"oanor gateway"}],"tags":[{"name":"Roofing"},{"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/area":{"get":{"operationId":"get_v1_area","tags":["Roofing"],"summary":"Roof area, squares & bundles","description":"","parameters":[{"name":"footprint","in":"query","required":false,"description":"Plan area (or length+width)","schema":{"type":"string"},"example":"1500"},{"name":"length","in":"query","required":false,"description":"Length","schema":{"type":"string"}},{"name":"width","in":"query","required":false,"description":"Width","schema":{"type":"string"}},{"name":"pitch","in":"query","required":false,"description":"rise:run","schema":{"type":"string"},"example":"6:12"},{"name":"waste_percent","in":"query","required":false,"description":"default 10","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Roof area = footprint × slope multiplier. Squares assume 100 ft² each and ~3 shingle bundles per square; pass footprint in ft² for those.","input":{"ratio":0.5,"rise_run":"6:12","angle_degrees":26.565,"percent_slope":50,"waste_percent":10,"footprint_area":1500,"slope_multiplier":1.118034},"squares":18.45,"roof_area":1677.051,"shingle_bundles":56,"slope_multiplier":1.118034,"roof_area_with_waste":1844.756},"meta":{"timestamp":"2026-06-03T17:41:55.476Z","request_id":"a27d6793-70d3-454e-92ed-c613cc6b6d17"},"status":"ok","message":"Roof area","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/pitch":{"get":{"operationId":"get_v1_pitch","tags":["Roofing"],"summary":"Convert roof pitch","description":"","parameters":[{"name":"pitch","in":"query","required":false,"description":"rise:run e.g. 6:12","schema":{"type":"string"},"example":"6:12"},{"name":"angle","in":"query","required":false,"description":"Or angle (degrees)","schema":{"type":"string"}},{"name":"percent","in":"query","required":false,"description":"Or percent slope","schema":{"type":"string"}},{"name":"rise","in":"query","required":false,"description":"Or rise (with run)","schema":{"type":"string"}},{"name":"run","in":"query","required":false,"description":"Run","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Slope multiplier = √(1 + (rise/run)²); multiply plan (footprint) area by it to get sloped roof area.","input":{"pitch":"6:12"},"ratio":0.5,"rise_run":"6:12","angle_degrees":26.565,"percent_slope":50,"slope_multiplier":1.118034},"meta":{"timestamp":"2026-06-03T17:41:55.582Z","request_id":"351a8ff3-d775-4ea9-bccb-0ac4af23d505"},"status":"ok","message":"Roof pitch conversion","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/rafter":{"get":{"operationId":"get_v1_rafter","tags":["Roofing"],"summary":"Rafter length","description":"","parameters":[{"name":"run","in":"query","required":true,"description":"Horizontal run","schema":{"type":"string"},"example":"12"},{"name":"pitch","in":"query","required":false,"description":"rise:run","schema":{"type":"string"},"example":"6:12"},{"name":"angle","in":"query","required":false,"description":"Or angle","schema":{"type":"string"}},{"name":"overhang","in":"query","required":false,"description":"Horizontal overhang","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Rafter = run × slope multiplier = √(run² + rise²). Overhang is measured horizontally and projected along the slope.","rise":6,"input":{"run":12,"rise":6,"ratio":0.5,"overhang":0,"rise_run":"6:12","angle_degrees":26.565,"percent_slope":50,"slope_multiplier":1.118034},"rafter_length":13.4164,"total_rafter_length":13.4164,"overhang_along_rafter":0},"meta":{"timestamp":"2026-06-03T17:41:55.688Z","request_id":"760cd886-aebe-41f6-8a81-ba383c471112"},"status":"ok","message":"Rafter length","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":{"note":"Lengths are unit-agnostic (use consistent units); square/bundle figures assume US roofing squares (100 ft²) — pass footprint in ft².","service":"roofing","endpoints":{"/v1/area":"Sloped roof area from the footprint and pitch, with waste, roofing squares and shingle bundles.","/v1/pitch":"Convert roof pitch between rise:run, angle (degrees), percent slope and slope multiplier.","/v1/rafter":"Rafter length from the horizontal run and the pitch, with optional overhang."},"description":"Roofing maths: pitch conversions, rafter length, and roof area with shingle squares and bundles."},"meta":{"timestamp":"2026-06-03T17:41:55.776Z","request_id":"d9212c11-70a2-4113-980b-7ffd6370f1c3"},"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":10235,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1175,"monthly_call_quota":19850,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3165,"monthly_call_quota":248500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6965,"monthly_call_quota":1285000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/roofing-api"}