# Snow Load API
> Roof snow-load maths as an API, computed locally and deterministically using the ASCE 7 method. The roof endpoint turns a ground snow load into the design roof snow load: the flat-roof load is pf = 0.7 · Ce · Ct · Is · pg, using the exposure, thermal and importance factors, and the sloped-roof load is ps = Cs · pf, where the slope factor Cs follows the warm-roof all-surfaces curve (1.0 up to 30°, falling linearly to 0 at 70°) or a value you supply. It reports every load in kilopascals, pascals, pounds per square foot and kilograms per square metre, and — if you give a roof area — the total load in kilonewtons, kilograms, tonnes and pounds. The depth endpoint converts a measured snow depth and a density (given directly or by snow type, from fresh ~100 to ice ~917 kg/m³) into a load. The convert endpoint converts a snow load between kPa, psf, kg/m², Pa and psi. Depths accept millimetres, centimetres, metres, inches or feet. Everything is computed locally and deterministically, so it is instant and private. An engineering aid, not a code-stamped design — always confirm against the governing local code with a qualified engineer. Ideal for structural and roofing tools, building-code and permitting apps, solar-install and carport planners, and winter-risk calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is roof snow-load engineering; for roof pitch and area geometry use a roofing API and for beam reactions use a beam API.

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

## Pricing
- **Free** (Free) — 13,535 calls/Mo, 2 req/s
- **Starter** ($15/Mo) — 23,250 calls/Mo, 8 req/s
- **Pro** ($35/Mo) — 282,500 calls/Mo, 20 req/s
- **Mega** ($73/Mo) — 1,455,000 calls/Mo, 50 req/s

## Endpoints

### Snow

#### `GET /v1/convert` — Snow-load unit conversion

**Parameters:**
- `value` (query, required, string) — Load value Example: `35`
- `from` (query, optional, string) — kpa|psf|kgm2|pa|psi (default psf) Example: `psf`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snowload-api/v1/convert?value=35&from=psf"
```

**Response:**
```json
{
    "data": {
        "input": {
            "unit": "psf",
            "value": 35
        },
        "converted": {
            "pa": 1675.8,
            "kpa": 1.6758,
            "psf": 35,
            "kg_m2": 170.88
        }
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:09.274Z",
        "request_id": "b6b2c2ff-c05a-48b0-9dc3-d1cbb38c4c69"
    },
    "status": "ok",
    "message": "Snow-load unit conversion",
    "success": true
}
```

#### `GET /v1/depth` — Snow load from depth

**Parameters:**
- `depth` (query, required, string) — Snow depth Example: `50`
- `depth_unit` (query, optional, string) — mm|cm|m|in|ft (default cm) Example: `cm`
- `snow_type` (query, optional, string) — fresh|average|settled|packed|wet|ice Example: `fresh`
- `density` (query, optional, string) — Or explicit density (kg/m³)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snowload-api/v1/depth?depth=50&depth_unit=cm&snow_type=fresh"
```

**Response:**
```json
{
    "data": {
        "load": {
            "pa": 490.3,
            "kpa": 0.4903,
            "psf": 10.2408,
            "kg_m2": 50
        },
        "note": "Snow load = depth(m) × density(kg/m³) → kg/m², converted to pressure with g = 9.80665. Densities: fresh ~100, settled ~300, wet ~500, ice ~917 kg/m³.",
        "depth_m": 0.5,
        "density_kg_m3": 100,
        "density_source": "fresh"
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:09.358Z",
        "request_id": "b2a43b1e-9114-40cb-9fc8-5a530feccb34"
    },
    "status": "ok",
    "message": "Snow load from depth & density",
    "success": true
}
```

#### `GET /v1/roof` — Roof snow load (ASCE 7)

**Parameters:**
- `ground_snow_load` (query, required, string) — Ground snow load (pg) Example: `50`
- `pressure_unit` (query, optional, string) — psf|kpa|kgm2|pa|psi (default psf) Example: `psf`
- `exposure_factor` (query, optional, string) — Ce (default 1.0)
- `thermal_factor` (query, optional, string) — Ct (default 1.0)
- `importance_factor` (query, optional, string) — Is (default 1.0)
- `slope` (query, optional, string) — Roof slope (degrees)
- `slope_factor` (query, optional, string) — Override Cs (0-1)
- `area` (query, optional, string) — Roof area (for total load)
- `area_unit` (query, optional, string) — m2|ft2 Example: `m2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snowload-api/v1/roof?ground_snow_load=50&pressure_unit=psf&area_unit=m2"
```

**Response:**
```json
{
    "data": {
        "note": "ASCE 7 method. Slope factor uses the warm-roof all-surfaces approximation (Cs=1 to 30°, linear to 0 at 70°); pass slope_factor to override. Verify against the governing local code with a qualified engineer.",
        "factors": {
            "slope_Cs": 1,
            "thermal_Ct": 1,
            "exposure_Ce": 1,
            "importance_Is": 1
        },
        "formula": "pf = 0.7·Ce·Ct·Is·pg ; ps = Cs·pf (ASCE 7).",
        "slope_degrees": null,
        "design_snow_load": {
            "pa": 1675.8,
            "kpa": 1.6758,
            "psf": 35,
            "kg_m2": 170.88
        },
        "ground_snow_load": {
            "pa": 2394,
            "kpa": 2.394,
            "psf": 50,
            "kg_m2": 244.12
        },
        "flat_roof_snow_load": {
            "pa": 1675.8,
            "kpa": 1.6758,
            "psf": 35,
            "kg_m2": 170.88
        },
        "sloped_roof_snow_load": {
            "pa": 1675.8,
            "kpa": 1.6758,
            "psf": 35,
            "kg_m2": 170.88
        }
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:09.440Z",
        "request_id": "10403f51-7b79-4561-b140-219a6327f2ff"
    },
    "status": "ok",
    "message": "Roof snow load from ground snow load",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "snowload",
        "note": "Roof snow-load maths (ASCE 7) — computed locally and deterministically, no key, no third-party service. Engineering aid, not a code-stamped design.",
        "endpoints": [
            "/v1/roof",
            "/v1/depth",
            "/v1/convert",
            "/v1/meta"
        ],
        "snow_types": [
            "fresh",
            "light",
            "new",
            "average",
            "settled",
            "packed",
            "wet",
            "wet_packed",
            "ice"
        ],
        "pressure_units": [
            "kpa",
            "pa",
            "psf",
            "kgm2",
            "psi"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:09.527Z",
        "request_id": "3fcfa1fe-a173-4b23-b23c-3cecc22e7b88"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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