# Climbing Fall API
> Rock-climbing fall maths as an API, computed locally and deterministically — the safety numbers behind a lead fall, from the harshness of the catch to whether you hit the deck. The fall-factor endpoint gives the fall factor, distance fallen ÷ rope paid out, from 0 to a maximum of 2: it, not the absolute distance, decides how hard the catch is, so 4 metres on 2 metres of rope is a brutal factor-2 onto the anchor while the same fall on 10 metres of rope is a mild 0.4. The impact-force endpoint gives the peak force the rope transmits from the spring model F = mg + √((mg)² + 2·mg·k·f), where k is the rope modulus (~20 kN for a dynamic single rope) and f the fall factor — so an 80 kg climber on a factor-1 fall feels about 6.4 kN, and the top runner sees roughly 1.66× that from the pulley effect. The ground-fall endpoint adds it up: total drop = twice the height above the last piece, plus slack, plus the rope's stretch, and tells you whether that clears the ground or a ledge. Everything is computed locally and deterministically, so it is instant and private. Ideal for climbing apps, gym and guiding tools, route-planning and education sites, and gear calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Educational estimates — not a substitute for instruction and judgement.

## 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/climbing-api/..."
```

## Pricing
- **Free** (Free) — 600 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 14,500 calls/Mo, 6 req/s
- **Pro** ($16/Mo) — 90,000 calls/Mo, 15 req/s
- **Mega** ($49/Mo) — 300,000 calls/Mo, 36 req/s

## Endpoints

### Climbing

#### `GET /v1/fall-factor` — Fall factor and severity

**Parameters:**
- `fall_distance_m` (query, required, string) — Distance fallen in metres Example: `4`
- `rope_out_m` (query, required, string) — Rope paid out in metres Example: `2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climbing-api/v1/fall-factor?fall_distance_m=4&rope_out_m=2"
```

**Response:**
```json
{
    "data": {
        "note": "Fall factor = distance fallen ÷ rope paid out, from 0 to a maximum of 2 (a fall straight onto the belay with no rope to absorb it). It — not the absolute distance — drives how harsh the catch is: more rope out cushions the same length of fall. Keep slack down and get the first piece in early to avoid a factor-2 onto the anchor.",
        "inputs": {
            "rope_out_m": 2,
            "fall_distance_m": 4
        },
        "severity": "severe — near the factor-2 maximum",
        "fall_factor": 2
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:43.023Z",
        "request_id": "9836621a-bd67-4363-a591-ebab7ff789b3"
    },
    "status": "ok",
    "message": "Fall factor",
    "success": true
}
```

#### `GET /v1/ground-fall` — Ground / ledge fall check

**Parameters:**
- `above_pro_m` (query, required, string) — Distance above last protection in metres Example: `2`
- `slack_m` (query, optional, string) — Slack in metres (default 0) Example: `0.5`
- `rope_out_m` (query, required, string) — Rope out in metres Example: `12`
- `stretch_pct` (query, optional, string) — Rope stretch % under load (default 10) Example: `10`
- `clearance_m` (query, required, string) — Clearance to ground/ledge in metres Example: `7`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climbing-api/v1/ground-fall?above_pro_m=2&slack_m=0.5&rope_out_m=12&stretch_pct=10&clearance_m=7"
```

**Response:**
```json
{
    "data": {
        "note": "Total drop = twice the distance above the last piece, plus slack, plus the rope's stretch (≈10 % of rope out under a hard catch). If that exceeds the clearance to the ground or a ledge, you deck. Low first clips, minimal slack and an attentive belay are what keep the margin positive — count the stretch in, especially near the deck.",
        "decks": false,
        "inputs": {
            "slack_m": 0.5,
            "rope_out_m": 12,
            "above_pro_m": 2,
            "clearance_m": 7,
            "stretch_pct": 10
        },
        "margin_m": 1.3,
        "free_fall_m": 4.5,
        "total_drop_m": 5.7,
        "rope_stretch_m": 1.2
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:43.106Z",
        "request_id": "a0aaf160-d7d1-465f-a67e-56a244f753aa"
    },
    "status": "ok",
    "message": "Ground fall",
    "success": true
}
```

#### `GET /v1/impact-force` — Peak impact force

**Parameters:**
- `climber_mass_kg` (query, required, string) — Climber mass in kg Example: `80`
- `fall_factor` (query, required, string) — Fall factor 0-2 Example: `1`
- `rope_modulus_kn` (query, optional, string) — Rope modulus in kN (default 20) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/climbing-api/v1/impact-force?climber_mass_kg=80&fall_factor=1&rope_modulus_kn=20"
```

**Response:**
```json
{
    "data": {
        "note": "Peak impact force from the rope's spring model: F = mg + √((mg)² + 2·mg·k·f), with k the rope modulus (~20 kN for a dynamic single rope) and f the fall factor — so it depends on the fall factor, not the rope length. The top runner sees roughly 1.66× this from the pulley effect at the carabiner. A softer (lower-modulus) rope catches gentler.",
        "inputs": {
            "fall_factor": 1,
            "climber_mass_kg": 80,
            "rope_modulus_kn": 20
        },
        "peak_force_n": 6441,
        "peak_force_kn": 6.44,
        "force_on_top_piece_kn": 10.69
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:43.193Z",
        "request_id": "6cd878cc-f168-4ae6-b2af-7486852be439"
    },
    "status": "ok",
    "message": "Impact force",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "SI units (m, kg, kN). FF = fall ÷ rope out (max 2); F = mg + √((mg)²+2·mg·k·f) with k≈20 kN; total drop = 2·above-pro + slack + stretch. Educational estimates — not a substitute for proper instruction and judgement.",
        "service": "climbing-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/fall-factor": "Fall factor = fall distance ÷ rope paid out, with severity.",
            "GET /v1/ground-fall": "Whether a fall decks, including slack and rope stretch.",
            "GET /v1/impact-force": "Peak impact force from mass, fall factor and rope modulus."
        },
        "description": "Rock-climbing fall maths: the fall factor, the peak impact force a dynamic rope transmits, and whether a fall reaches the ground/ledge."
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:43.278Z",
        "request_id": "53ddd6fb-64b8-460f-9a7a-a4643010ae11"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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