# Ladder Safety API
> Ladder-safety maths as an API, computed locally and deterministically — the angle, reach and load numbers that keep a ladder from sliding out or buckling. The angle endpoint applies the 4:1 rule: the base goes out one foot for every four feet of working length, which lands the ladder at about 75.5° — a 24-foot ladder sits 6 feet from the wall and reaches roughly 23 feet up, steep enough not to tip back and shallow enough not to slide. The extension endpoint gives the usable length and reach of a two-section extension ladder, which loses the overlap the sections share (3 feet up to 36, 4 to 48, 5 beyond), and the working height at the safe angle — remembering the ladder must extend 3 feet above a roof edge you step onto. The duty-rating endpoint turns a total load — your weight plus tools and materials, not just bodyweight — into the right duty class, from Type III household (200 lb) through I industrial (250) to IAA professional (375). Everything is computed locally and deterministically, so it is instant and private. Ideal for construction-safety and trades apps, jobsite and rental tools, OSHA training aids, and home-improvement sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Educational — always follow the manufacturer's labels and OSHA/ANSI rules.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/ladder-api/..."
```

## Pricing
- **Free** (Free) — 650 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 16,000 calls/Mo, 8 req/s
- **Pro** ($15/Mo) — 96,000 calls/Mo, 20 req/s
- **Mega** ($46/Mo) — 320,000 calls/Mo, 48 req/s

## Endpoints

### Ladder

#### `GET /v1/angle` — 4:1 setup angle and reach

**Parameters:**
- `ladder_length_ft` (query, required, string) — Working length in feet Example: `24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ladder-api/v1/angle?ladder_length_ft=24"
```

**Response:**
```json
{
    "data": {
        "note": "The 4:1 rule sets the base out one foot for every four feet of working length, which lands the ladder at about 75.5° — steep enough not to tip back, shallow enough not to slide out. A 24-foot ladder sits 6 feet from the wall and reaches ~23 feet up. An easy check: stand at the base, arms straight out, and your palms should just touch a rung.",
        "inputs": {
            "ladder_length_ft": 24
        },
        "angle_deg": 75.5,
        "base_distance_ft": 6,
        "vertical_height_ft": 23.24
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:59.880Z",
        "request_id": "eab647c6-44d9-4e08-9274-d7ffa7bf10b0"
    },
    "status": "ok",
    "message": "Setup angle",
    "success": true
}
```

#### `GET /v1/duty-rating` — Duty-rating class for a load

**Parameters:**
- `total_load_lb` (query, required, string) — Total load (person + tools) in lb Example: `280`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ladder-api/v1/duty-rating?total_load_lb=280"
```

**Response:**
```json
{
    "data": {
        "note": "Duty rating is the TOTAL load — your weight plus tools and materials, not just bodyweight. Type III (200 lb) is household, II (225) light commercial, I (250) industrial, IA (300) extra-heavy and IAA (375) professional. Add up everything you carry up and pick the rating above it; never exceed it.",
        "inputs": {
            "total_load_lb": 280
        },
        "duty_use": "extra heavy duty",
        "duty_type": "IA",
        "rated_capacity_lb": 300
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:59.960Z",
        "request_id": "c635a569-9e02-4738-9b63-e2bd1b53b3e0"
    },
    "status": "ok",
    "message": "Duty rating",
    "success": true
}
```

#### `GET /v1/extension` — Extension ladder reach

**Parameters:**
- `base_section_ft` (query, required, string) — Base section length in feet Example: `13`
- `fly_section_ft` (query, required, string) — Fly section length in feet Example: `13`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ladder-api/v1/extension?base_section_ft=13&fly_section_ft=13"
```

**Response:**
```json
{
    "data": {
        "note": "A two-section extension ladder loses the overlap the sections share: usable length = both sections − the required overlap (3 ft up to 36 ft, 4 ft to 48, 5 ft beyond). Set at the 4:1 angle that gives the working height shown, and the ladder must extend at least 3 feet above a roof edge you step onto.",
        "inputs": {
            "fly_section_ft": 13,
            "base_section_ft": 13
        },
        "required_overlap_ft": 3,
        "max_extended_length_ft": 23,
        "approx_working_height_ft": 22.3
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.055Z",
        "request_id": "2067386e-68ea-4235-a8e9-b5818c6a010c"
    },
    "status": "ok",
    "message": "Extension reach",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ladder-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "US units (feet, lb). 4:1 rule → base = length/4, ~75.5°; extension overlap 3/4/5 ft by length; duty types III–IAA (200–375 lb). Educational — follow the manufacturer's labels and OSHA/ANSI.",
        "service": "ladder-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/angle": "Base distance, height and angle from the 4:1 rule.",
            "GET /v1/extension": "Extended length, required overlap and working height of an extension ladder.",
            "GET /v1/duty-rating": "Duty-rating class for a total load."
        },
        "description": "Ladder-safety maths: the 4:1 setup angle and reach, extension-ladder overlap and reach, and the duty-rating class for a load."
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.129Z",
        "request_id": "27bb4ec9-ba1d-4e61-8adb-a8a1e12a3e36"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/ladder-api
OpenAPI spec: https://www.oanor.com/api/ladder-api/openapi.json
