# Wood Moisture API
> Wood-moisture maths as an API, computed locally and deterministically — the moisture-content, oven-dry-weight and drying-target numbers a woodworker, sawyer, kiln operator or firewood seller weighs timber by. The moisture-content endpoint takes a wet weight and an oven-dry weight and returns the moisture content on both conventions: the dry basis (water ÷ oven-dry weight × 100, the forestry and woodworking standard) and the wet/green basis (water ÷ wet weight × 100, common in agriculture and paper) — a board weighing 120 g that dries to 100 g holds 20 g of water and is 20 % dry-basis or 16.7 % wet-basis, so it always matters which is quoted. Above fibre saturation (~28–30 %) the wood is still shedding free water and has not begun to shrink. The dry-weight endpoint back-calculates the unchanging oven-dry weight from a current weight and a meter reading (wet ÷ (1 + MC/100)), the anchor for any drying plan because the wood substance does not change as water leaves. The target-weight endpoint uses that anchor to give the weight a piece should reach for a target moisture content and the water still to drive off — taking 120 g at 20 % down to 12 % means a 112 g target and 8 g of water to lose, so you simply weigh the piece down to that figure. Everything is computed locally and deterministically, so it is instant and private. Ideal for woodworking and lutherie tools, sawmill and kiln-drying apps, and firewood-seasoning calculators. Pure local computation — no key, no third-party service, instant. Mass-balance maths — pair it with a real moisture meter. 3 compute endpoints. For board feet use a lumber API; for a wood-stack volume a firewood 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/woodmoisture-api/..."
```

## Pricing
- **Free** (Free) — 7,000 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 59,000 calls/Mo, 6 req/s
- **Pro** ($24/Mo) — 245,000 calls/Mo, 15 req/s
- **Mega** ($74/Mo) — 1,130,000 calls/Mo, 40 req/s

## Endpoints

### Wood

#### `GET /v1/dry-weight` — Oven-dry weight from a reading

**Parameters:**
- `wet_weight_g` (query, required, string) — Current/wet weight (g) Example: `120`
- `moisture_content_pct` (query, required, string) — Moisture content, dry basis (%) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/woodmoisture-api/v1/dry-weight?wet_weight_g=120&moisture_content_pct=20"
```

**Response:**
```json
{
    "data": {
        "note": "From a current weight and a meter's moisture reading (dry basis), the oven-dry weight = the wet weight ÷ (1 + MC/100), and the rest is water. A 120 g board reading 20 % MC has 100 g of actual wood and 20 g of water. This back-calculated dry weight is the anchor for any drying target, because the wood substance does not change as the water leaves.",
        "inputs": {
            "wet_weight_g": 120,
            "moisture_content_pct": 20
        },
        "water_weight_g": 20,
        "oven_dry_weight_g": 100
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:53.743Z",
        "request_id": "2fa66f71-40a3-45c8-9033-372a59f9c8d3"
    },
    "status": "ok",
    "message": "Dry weight",
    "success": true
}
```

#### `GET /v1/moisture-content` — Moisture content from wet and dry

**Parameters:**
- `wet_weight_g` (query, required, string) — Wet weight (g) Example: `120`
- `dry_weight_g` (query, required, string) — Oven-dry weight (g) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/woodmoisture-api/v1/moisture-content?wet_weight_g=120&dry_weight_g=100"
```

**Response:**
```json
{
    "data": {
        "note": "Moisture content is the water in the wood as a percent of the wood's weight. The forestry/woodworking standard is the dry basis: water ÷ oven-dry weight × 100 — so a piece weighing 120 g that dries to 100 g holds 20 g of water and is 20 % MC. The wet (green) basis divides by the wet weight instead (here 16.7 %); paper and agriculture often use it, so always state which. Above ~28–30 % (fibre saturation) the wood is still losing free water and has not begun to shrink.",
        "inputs": {
            "dry_weight_g": 100,
            "wet_weight_g": 120
        },
        "water_weight_g": 20,
        "moisture_content_dry_basis_pct": 20,
        "moisture_content_wet_basis_pct": 16.667
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:53.842Z",
        "request_id": "9fb06e3b-41bd-4ae9-b8e3-d668cf5a9158"
    },
    "status": "ok",
    "message": "Moisture content",
    "success": true
}
```

#### `GET /v1/target-weight` — Weight to reach a target MC

**Parameters:**
- `current_weight_g` (query, required, string) — Current weight (g) Example: `120`
- `current_mc_pct` (query, required, string) — Current moisture content (%) Example: `20`
- `target_mc_pct` (query, required, string) — Target moisture content (%) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/woodmoisture-api/v1/target-weight?current_weight_g=120&current_mc_pct=20&target_mc_pct=12"
```

**Response:**
```json
{
    "data": {
        "note": "To dry wood to a target moisture content, find the unchanging oven-dry weight (current ÷ (1 + current MC/100)), then the target weight = dry × (1 + target MC/100); the difference is the water to drive off. Taking 120 g at 20 % down to 12 % means a 112 g target and 8 g of water to lose — weigh the piece down to that figure and it is there. A negative water-to-lose means the wood would instead gain moisture to reach the target.",
        "inputs": {
            "target_mc_pct": 12,
            "current_mc_pct": 20,
            "current_weight_g": 120
        },
        "target_weight_g": 112,
        "water_to_lose_g": 8,
        "oven_dry_weight_g": 100
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:53.933Z",
        "request_id": "93570c8d-5ecf-4fc1-81e9-9beea8ab78c4"
    },
    "status": "ok",
    "message": "Target weight",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Grams. Dry basis: MC = (wet−dry)/dry·100. dry = wet/(1+MC/100); target = dry·(1+target/100). Forestry/woodworking uses dry basis; agriculture often wet basis. For board feet use a lumber API; for a wood-stack volume a firewood API.",
        "service": "woodmoisture-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/dry-weight": "Oven-dry weight and water from a wet weight and a moisture content.",
            "GET /v1/target-weight": "Target weight and water to lose to reach a target moisture content.",
            "GET /v1/moisture-content": "Dry- and wet-basis MC and water weight from wet and oven-dry weights."
        },
        "description": "Wood-moisture maths: moisture content (dry and wet basis), oven-dry weight, and the weight and water to reach a target moisture content."
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:54.031Z",
        "request_id": "d6c8d39e-394e-4390-ab63-70a8bdf73c64"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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