# Colligative Properties API
> Colligative-properties chemistry maths as an API, computed locally and deterministically. The freezing-point endpoint computes the freezing-point depression ΔTf = i·Kf·m and the resulting lowered freezing point of a solution, from the molality, the cryoscopic constant (1.86 °C·kg/mol for water) and the van 't Hoff factor i — which is 1 for a non-electrolyte like sugar, about 2 for sodium chloride and about 3 for calcium chloride. The boiling-point endpoint computes the boiling-point elevation ΔTb = i·Kb·m and the raised boiling point, with the ebullioscopic constant (0.512 °C·kg/mol for water). The osmotic-pressure endpoint computes the van 't Hoff osmotic pressure Π = i·M·R·T from the molarity, the temperature and the van 't Hoff factor, the pressure that drives osmosis across a semipermeable membrane, returned in atmospheres, kilopascals and bar. Molality is in mol per kg of solvent, molarity in mol per litre of solution and temperature in kelvin. Everything is computed locally and deterministically, so it is instant and private. Ideal for chemistry-education, food-science, antifreeze, desalination and biology app developers, solution and de-icing tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is colligative properties of solutions; for a compound's molar mass use a molar-mass API and for dilution concentrations a dilution 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/colligative-api/..."
```

## Pricing
- **Free** (Free) — 3,800 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 33,000 calls/Mo, 6 req/s
- **Pro** ($14/Mo) — 218,000 calls/Mo, 15 req/s
- **Mega** ($46/Mo) — 1,290,000 calls/Mo, 40 req/s

## Endpoints

### Colligative

#### `GET /v1/boiling-point` — Boiling-point elevation

**Parameters:**
- `molality` (query, required, string) — Molality (mol/kg) Example: `1`
- `vant_hoff_factor` (query, optional, string) — van 't Hoff factor i Example: `2`
- `kb` (query, optional, string) — Ebullioscopic constant Example: `0.512`
- `normal_boiling_point` (query, optional, string) — Solvent boiling point (°C) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colligative-api/v1/boiling-point?molality=1&vant_hoff_factor=2&kb=0.512&normal_boiling_point=100"
```

**Response:**
```json
{
    "data": {
        "note": "Boiling-point elevation ΔTb = i·Kb·m raises the boiling point. For water Kb = 0.512 °C·kg/mol.",
        "inputs": {
            "kb": 0.512,
            "molality": 1,
            "vant_hoff_factor": 2,
            "normal_boiling_point_c": 100
        },
        "new_boiling_point_c": 101.024,
        "boiling_point_elevation_c": 1.024
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:32.839Z",
        "request_id": "3a35ed11-3c74-4b63-a1f9-0bb43ae7a6c6"
    },
    "status": "ok",
    "message": "Boiling point elevation",
    "success": true
}
```

#### `GET /v1/freezing-point` — Freezing-point depression

**Parameters:**
- `molality` (query, required, string) — Molality (mol/kg) Example: `1`
- `vant_hoff_factor` (query, optional, string) — van 't Hoff factor i Example: `2`
- `kf` (query, optional, string) — Cryoscopic constant Example: `1.86`
- `normal_freezing_point` (query, optional, string) — Solvent freezing point (°C) Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colligative-api/v1/freezing-point?molality=1&vant_hoff_factor=2&kf=1.86&normal_freezing_point=0"
```

**Response:**
```json
{
    "data": {
        "note": "Freezing-point depression ΔTf = i·Kf·m lowers the freezing point. For water Kf = 1.86 °C·kg/mol; i is 1 for non-electrolytes, ~2 for NaCl, ~3 for CaCl₂.",
        "inputs": {
            "kf": 1.86,
            "molality": 1,
            "vant_hoff_factor": 2,
            "normal_freezing_point_c": 0
        },
        "new_freezing_point_c": -3.72,
        "freezing_point_depression_c": 3.72
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:32.917Z",
        "request_id": "c7ce3322-e118-4574-bf2a-28b47aff64d6"
    },
    "status": "ok",
    "message": "Freezing point depression",
    "success": true
}
```

#### `GET /v1/osmotic-pressure` — Osmotic pressure

**Parameters:**
- `molarity` (query, required, string) — Molarity (mol/L) Example: `0.1`
- `vant_hoff_factor` (query, optional, string) — van 't Hoff factor i Example: `1`
- `temperature` (query, optional, string) — Temperature (K) Example: `298.15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/colligative-api/v1/osmotic-pressure?molarity=0.1&vant_hoff_factor=1&temperature=298.15"
```

**Response:**
```json
{
    "data": {
        "note": "Van 't Hoff osmotic pressure Π = i·M·R·T, with R = 0.082057 L·atm/(mol·K) and T in kelvin. Drives osmosis across a semipermeable membrane.",
        "inputs": {
            "molarity": 0.1,
            "temperature_k": 298.15,
            "vant_hoff_factor": 1
        },
        "osmotic_pressure_pa": 247895.703,
        "osmotic_pressure_atm": 2.44654,
        "osmotic_pressure_bar": 2.478957,
        "osmotic_pressure_kpa": 247.895703
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.000Z",
        "request_id": "7567b134-bd07-4414-956f-66e813e81e22"
    },
    "status": "ok",
    "message": "Osmotic pressure",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Molality in mol/kg, molarity in mol/L, temperature in K. Defaults are water (Kf = 1.86, Kb = 0.512, fp 0 °C, bp 100 °C). The van 't Hoff factor i defaults to 1 (non-electrolyte).",
        "service": "colligative-api",
        "formulae": {
            "boiling_point": "ΔTb = i·Kb·m",
            "freezing_point": "ΔTf = i·Kf·m",
            "osmotic_pressure": "Π = i·M·R·T"
        },
        "constants": {
            "gas_constant_l_atm_mol_k": 0.0820573661
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/boiling-point": "Boiling-point elevation and new boiling point from molality.",
            "GET /v1/freezing-point": "Freezing-point depression and new freezing point from molality.",
            "GET /v1/osmotic-pressure": "Osmotic pressure from molarity and temperature."
        },
        "description": "Colligative-properties calculator: freezing-point depression, boiling-point elevation and osmotic pressure of a solution, with the van 't Hoff factor for electrolytes."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.077Z",
        "request_id": "6a320ea8-d7bf-4324-a455-409c4da5b937"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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