# Standard Atmosphere API
> International Standard Atmosphere (ISA) maths as an API, computed locally and deterministically. The properties endpoint gives the air temperature, pressure, density and speed of sound at any altitude from sea level to 20 km — using the standard troposphere lapse rate (T = T0 − 0.0065·h) and the isothermal lower stratosphere above 11 km — along with the density, pressure and temperature ratios relative to sea level. The density-altitude endpoint computes the density altitude — the ISA altitude with the same air density — from a pressure altitude and the actual outside-air temperature, the figure pilots use because heat and low pressure rob an aircraft of lift, engine power and propeller thrust; it also reports the ISA temperature deviation. The pressure-altitude endpoint turns a barometric reading (in hectopascals or pascals) into the pressure altitude, the ISA altitude at which the standard pressure equals your reading. Altitudes accept metres or feet, temperature °C or kelvin. Everything is computed locally and deterministically, so it is instant and private. Ideal for aviation, drone, ballooning, HVAC and meteorology app developers, flight-planning and performance tools, and physics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the ISA atmospheric model; for the acoustic and relativistic Doppler effect use a Doppler 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/atmosphere-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 30,000 calls/Mo, 5 req/s
- **Pro** ($24/Mo) — 200,000 calls/Mo, 15 req/s
- **Mega** ($72/Mo) — 1,500,000 calls/Mo, 40 req/s

## Endpoints

### Atmosphere

#### `GET /v1/density-altitude` — Density altitude

**Parameters:**
- `pressure_altitude` (query, required, string) — Pressure altitude (m) Example: `0`
- `pressure_altitude_ft` (query, optional, string) — Or pressure altitude (ft)
- `temperature` (query, required, string) — Outside-air temperature (°C) Example: `30`
- `temperature_k` (query, optional, string) — Or temperature (K)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atmosphere-api/v1/density-altitude?pressure_altitude=0&temperature=30"
```

**Response:**
```json
{
    "data": {
        "note": "Density altitude is the ISA altitude with the same air density. Heat and low pressure raise it, degrading lift, engine power and propeller thrust.",
        "inputs": {
            "temperature_c": 30,
            "pressure_altitude_m": 0,
            "pressure_altitude_ft": 0
        },
        "isa_deviation_c": 15,
        "isa_temperature_c": 15,
        "density_altitude_m": 525.4552,
        "density_altitude_ft": 1723.9343,
        "static_pressure_hpa": 1013.25,
        "actual_density_kg_m3": 1.16438646
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:09.327Z",
        "request_id": "45f8f047-0572-4601-8109-e86fc586786f"
    },
    "status": "ok",
    "message": "Density altitude",
    "success": true
}
```

#### `GET /v1/pressure-altitude` — Pressure altitude

**Parameters:**
- `pressure_hpa` (query, required, string) — Station/QNH pressure (hPa) Example: `1000`
- `pressure_pa` (query, optional, string) — Or pressure (Pa)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atmosphere-api/v1/pressure-altitude?pressure_hpa=1000"
```

**Response:**
```json
{
    "data": {
        "note": "Pressure altitude is the ISA altitude at which the standard pressure equals your reading. 1013.25 hPa ⇒ 0; lower pressure ⇒ higher altitude.",
        "inputs": {
            "pressure_hpa": 1000
        },
        "pressure_altitude_m": 110.8844,
        "pressure_altitude_ft": 363.7941
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:09.476Z",
        "request_id": "a36141e3-c335-4d9b-8e60-2fd8f4c8a767"
    },
    "status": "ok",
    "message": "Pressure altitude",
    "success": true
}
```

#### `GET /v1/properties` — ISA properties at altitude

**Parameters:**
- `altitude` (query, required, string) — Altitude (m) Example: `5000`
- `altitude_ft` (query, optional, string) — Or altitude (ft)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atmosphere-api/v1/properties?altitude=5000"
```

**Response:**
```json
{
    "data": {
        "note": "ISA model. Troposphere uses T = T0 − 0.0065·h; above 11 km is isothermal at 216.65 K.",
        "layer": "troposphere",
        "inputs": {
            "altitude_m": 5000,
            "altitude_ft": 16404.1995
        },
        "pressure_pa": 54019.8882,
        "pressure_hpa": 540.198882,
        "density_kg_m3": 0.736115547,
        "density_ratio": 0.600910651,
        "temperature_c": -17.5,
        "temperature_k": 255.65,
        "pressure_ratio": 0.533134845,
        "speed_of_sound_ms": 320.529394,
        "temperature_ratio": 0.887211522
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:09.582Z",
        "request_id": "891871de-d2b0-451c-b923-6e2748fa44fc"
    },
    "status": "ok",
    "message": "ISA properties",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Altitudes in metres (or *_ft for feet), temperature in °C (or temperature_k), pressure in hPa/Pa. Valid 0–20 km (troposphere + lower stratosphere); density/pressure-altitude inversions assume the troposphere.",
        "service": "atmosphere-api",
        "formulae": {
            "density": "ρ = P/(R·T),  R = 287.053 J/(kg·K)",
            "pressure": "P = P0·(T/T0)^n,  n = g/(R·L) ≈ 5.2559",
            "temperature": "T = T0 − L·h  (T0 = 288.15 K, L = 0.0065 K/m)",
            "speed_of_sound": "a = √(γ·R·T),  γ = 1.4"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/properties": "ISA temperature, pressure, density, speed of sound and ratios at an altitude.",
            "GET /v1/density-altitude": "Density altitude from a pressure altitude and the actual temperature.",
            "GET /v1/pressure-altitude": "Pressure altitude from a station/QNH pressure."
        },
        "description": "International Standard Atmosphere (ISA) calculator: air temperature, pressure, density and speed of sound at altitude, density altitude from pressure altitude and temperature, and pressure altitude from a barometric reading."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:09.694Z",
        "request_id": "0ed62cb4-35a5-4924-a196-860b4b42eb63"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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