# Maple Syrup API
> Maple-syrup making maths as an API, computed locally and deterministically — the sap-to-syrup yield and finishing numbers a sugarmaker plans a season around. The yield endpoint takes the volume of sap and its sugar content in °Brix and returns the syrup it makes from the sugar balance (syrup = sap × sap °Brix / finished °Brix, finishing at 66.9 °Brix), the water that has to boil off, the sap-to-syrup ratio, and the classic Jones' Rule of 86 (86 ÷ sap °Brix) — the field rule that famously gives about 43 litres of 2 % sap per litre of syrup. The finish endpoint gives the boil-off finishing temperature: syrup is done about 4 °C (7.1 °F) above the boiling point of water, so at sea level that is ~104 °C / 219 °F — calibrate to your own water boiling point, which drops with altitude, and finish that many degrees higher; it also returns the finished density (~66.9 °Brix, SG ≈ 1.337). Everything is computed locally and deterministically, so it is instant and private. Ideal for maple-sugaring, homestead, craft-food and farm app developers, evaporator and yield-planning tools, and sugaring education. Pure local computation — no key, no third-party service, instant. Consistent volume units; temperatures in °C or °F. Live, nothing stored. 2 compute endpoints. A planning aid — a hydrometer or refractometer confirms the finish.

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

## Pricing
- **Free** (Free) — 6,950 calls/Mo, 2 req/s
- **Starter** ($3/Mo) — 65,500 calls/Mo, 6 req/s
- **Pro** ($8/Mo) — 258,000 calls/Mo, 15 req/s
- **Mega** ($27/Mo) — 1,470,000 calls/Mo, 40 req/s

## Endpoints

### Maple

#### `GET /v1/finish` — Finishing temperature

**Parameters:**
- `unit` (query, optional, string) — c or f (default c) Example: `c`
- `water_boiling` (query, optional, string) — Local water boiling point (default 100/212)
- `offset` (query, optional, string) — Degrees above water (default 4/7.1)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/maple-api/v1/finish?unit=c"
```

**Response:**
```json
{
    "data": {
        "note": "Syrup is done at ~66.9 °Brix, which boils about 4 °C (7.1 °F) above water. Calibrate to your own water boiling point (it drops with altitude), then finish that many degrees higher.",
        "inputs": {
            "unit": "c",
            "offset": 4,
            "water_boiling": 100
        },
        "finish_brix": 66.9,
        "syrup_density_sg": 1.337,
        "syrup_g_per_liter": 1337,
        "finish_temperature": 104
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:11.047Z",
        "request_id": "d834b440-3b0e-4f0b-8671-03c67812befc"
    },
    "status": "ok",
    "message": "Finishing temp",
    "success": true
}
```

#### `GET /v1/yield` — Sap → syrup yield

**Parameters:**
- `sap_volume` (query, required, string) — Sap volume Example: `100`
- `sap_brix` (query, required, string) — Sap sugar content °Brix Example: `2`
- `syrup_brix` (query, optional, string) — Finished °Brix (default 66.9)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/maple-api/v1/yield?sap_volume=100&sap_brix=2"
```

**Response:**
```json
{
    "data": {
        "note": "Sugar balance: syrup = sap × (sap °Brix / syrup °Brix), finished at ~66.9 °Brix. Jones' Rule of 86 (86 ÷ sap °Brix) is the classic field estimate of sap-per-syrup; 2% sap is the famous ~43:1.",
        "inputs": {
            "sap_brix": 2,
            "sap_volume": 100,
            "syrup_brix": 66.9
        },
        "syrup_volume": 2.9895,
        "rule_of_86_ratio": 43,
        "sap_to_syrup_ratio": 33.45,
        "water_to_evaporate": 97.0105
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:11.143Z",
        "request_id": "0799afc1-fd52-49eb-949b-b31ff1eef5e6"
    },
    "status": "ok",
    "message": "Sap to syrup",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Consistent volume units (litres or gallons). Finished syrup ≈ 66.9 °Brix. Rule of 86 = 86 ÷ sap °Brix is a quick field estimate. A planning aid; a hydrometer or refractometer confirms the finish.",
        "service": "maple-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/yield": "Syrup volume, boil-off and sap:syrup ratio from a sap volume and sugar content.",
            "GET /v1/finish": "Finishing temperature above your water's boiling point, and finished-syrup density."
        },
        "description": "Maple-syrup making maths: sap-to-syrup yield (sugar balance + Rule of 86), boil-off, and finishing temperature/density."
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:11.244Z",
        "request_id": "1bf7a75e-fb33-42ea-b8a1-3b1e6ccaded9"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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