# HVAC BTU Calculator API
> HVAC sizing maths as an API, computed locally and deterministically from standard rule-of-thumb factors. The cooling endpoint estimates the air-conditioner load for a room — in BTU per hour, tons of cooling and kilowatts — from the floor area (in square feet or metres, or length × width) using a baseline of about 20 BTU/h per square foot, with adjustments for the number of occupants, a kitchen, sun exposure and ceiling height. The heating endpoint estimates the heating load from the area and a climate zone (mild through very cold) or a custom BTU per square foot. The convert endpoint converts between BTU per hour, tons of cooling, kilowatts and watts (one ton = 12,000 BTU/h ≈ 3.517 kW). Everything is computed locally and deterministically, so it is instant and private. These are rule-of-thumb estimates in the EnergyStar style — a proper Manual J load calculation accounting for insulation, windows and local climate is recommended for a real installation. Ideal for HVAC and home-improvement tools, air-conditioner and heater sizing guides, smart-home and energy apps, and contractor quoting. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is HVAC sizing; for appliance running cost use an energy-cost 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/hvac-api/..."
```

## Pricing
- **Free** (Free) — 11,235 calls/Mo, 2 req/s
- **Starter** ($13/Mo) — 20,850 calls/Mo, 8 req/s
- **Pro** ($33/Mo) — 258,500 calls/Mo, 20 req/s
- **Mega** ($71/Mo) — 1,335,000 calls/Mo, 50 req/s

## Endpoints

### HVAC

#### `GET /v1/convert` — BTU / ton / kW / watt

**Parameters:**
- `value` (query, required, string) — Value Example: `12000`
- `from` (query, required, string) — btu|ton|kw|w Example: `btu`

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

**Response:**
```json
{
    "data": {
        "kw": 3.5169,
        "note": "1 ton of cooling = 12,000 BTU/h ≈ 3.517 kW.",
        "tons": 1,
        "input": {
            "from": "btu",
            "value": 12000
        },
        "watts": 3516.9,
        "btu_per_hour": 12000
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.153Z",
        "request_id": "733f460e-15f6-47f5-a39f-d279cf3b0da9"
    },
    "status": "ok",
    "message": "BTU / ton / kW conversion",
    "success": true
}
```

#### `GET /v1/cooling` — Air-conditioner cooling load

**Parameters:**
- `area` (query, optional, string) — Room area (or length+width) Example: `300`
- `area_unit` (query, optional, string) — sqft|sqm Example: `sqft`
- `occupants` (query, optional, string) — People (default 2) Example: `4`
- `sun_exposure` (query, optional, string) — sunny|shaded
- `room_type` (query, optional, string) — kitchen adds 4000 BTU
- `ceiling_height_ft` (query, optional, string) — default 8 Example: `8`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/hvac-api/v1/cooling?area=300&area_unit=sqft&occupants=4&ceiling_height_ft=8"
```

**Response:**
```json
{
    "data": {
        "note": "Rule-of-thumb cooling load (≈20 BTU/h·ft² baseline). Estimate only — use a Manual J calculation for a real install.",
        "input": {
            "area_sqft": 300,
            "occupants": 4,
            "btu_per_sqft": 20,
            "ceiling_height_ft": 8
        },
        "cooling_kw": 2.11,
        "adjustments": [
            {
                "btu": 1200,
                "factor": "occupants"
            }
        ],
        "cooling_tons": 0.6,
        "cooling_btu_per_hour": 7200
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.242Z",
        "request_id": "1e2e0fd6-17a1-43ed-8366-795376ab0c55"
    },
    "status": "ok",
    "message": "Cooling load",
    "success": true
}
```

#### `GET /v1/heating` — Heating load by climate

**Parameters:**
- `area` (query, required, string) — Room area (or length+width) Example: `300`
- `area_unit` (query, optional, string) — sqft|sqm Example: `sqft`
- `climate` (query, optional, string) — mild|warm|moderate|cool|cold|verycold Example: `moderate`
- `btu_per_sqft` (query, optional, string) — Or custom BTU/ft²

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/hvac-api/v1/heating?area=300&area_unit=sqft&climate=moderate"
```

**Response:**
```json
{
    "data": {
        "note": "Rough heating load by climate zone for moderate insulation. Estimate only — a Manual J calculation is recommended.",
        "input": {
            "climate": "moderate",
            "area_sqft": 300,
            "btu_per_sqft": 40
        },
        "heating_kw": 3.517,
        "heating_watts": 3516.9,
        "heating_btu_per_hour": 12000
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.322Z",
        "request_id": "868bc6a4-089e-4eda-b223-e8ed246479bb"
    },
    "status": "ok",
    "message": "Heating load",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Rule-of-thumb estimates (EnergyStar-style). A Manual J load calculation is recommended for real installations.",
        "service": "hvac",
        "climates": [
            "mild",
            "warm",
            "moderate",
            "cool",
            "cold",
            "verycold"
        ],
        "endpoints": {
            "/v1/convert": "Convert between BTU/h, tons of cooling, kW and watts.",
            "/v1/cooling": "Cooling BTU/h, tons and kW for a room from area and adjustments (occupants, sun, ceiling, kitchen).",
            "/v1/heating": "Heating BTU/h, kW and watts from area and a climate zone (or BTU/ft²)."
        },
        "description": "HVAC sizing maths: air-conditioner cooling load, heating load by climate, and BTU/ton/kW conversion."
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.410Z",
        "request_id": "8a0e4bb1-840e-47fa-b82e-2e75f80673d9"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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