# Beekeeping API
> Beekeeping and apiary maths as an API, computed locally and deterministically — the mite, brood and winter-stores numbers a beekeeper manages a hive with. The varroa endpoint turns an alcohol-wash or sugar-shake count into the infestation rate: mites per 100 bees = mite count ÷ bees sampled × 100, where a half-cup scoop is about 300 bees, and it flags when the colony crosses the treatment threshold (commonly 3 mites per 100 bees, or 3 %). The brood endpoint projects the development calendar from the day an egg is laid: it hatches around day 3, the cell is capped around day 8–10 and the adult emerges on day 16 for a queen, 21 for a worker and 24 for a drone — so a worker egg laid on the 1st emerges three weeks later. The stores endpoint sizes winter honey: how many kilograms the colony needs by climate (about 12 kg mild to 35 kg harsh), the equivalent full deep frames (~2.25 kg each), and the deficit and frames to feed against the current stores. Date arithmetic is exact. Everything is computed locally and deterministically, so it is instant and private. Ideal for beekeeping, apiary-management, homestead and agriculture app developers, hive-inspection and mite-monitoring tools, and beekeeping education. Pure local computation — no key, no third-party service, instant. Dates as YYYY-MM-DD; metric weights. Live, nothing stored. 3 compute endpoints. A planning aid — local conditions vary.

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

## Pricing
- **Free** (Free) — 7,150 calls/Mo, 2 req/s
- **Starter** ($3/Mo) — 67,000 calls/Mo, 6 req/s
- **Pro** ($8/Mo) — 262,000 calls/Mo, 15 req/s
- **Mega** ($26/Mo) — 1,490,000 calls/Mo, 40 req/s

## Endpoints

### Apiary

#### `GET /v1/brood` — Brood development dates

**Parameters:**
- `caste` (query, optional, string) — queen, worker or drone Example: `worker`
- `lay_date` (query, required, string) — Egg-lay date YYYY-MM-DD Example: `2026-05-01`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/apiary-api/v1/brood?caste=worker&lay_date=2026-05-01"
```

#### `GET /v1/stores` — Winter honey stores

**Parameters:**
- `climate` (query, optional, string) — mild, temperate, cold, harsh Example: `cold`
- `honey_needed_kg` (query, optional, string) — Or target honey kg
- `honey_per_frame_kg` (query, optional, string) — Honey per deep frame kg (default 2.25)
- `current_stores_kg` (query, optional, string) — Current stores kg

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/apiary-api/v1/stores?climate=cold"
```

#### `GET /v1/varroa` — Varroa infestation %

**Parameters:**
- `mite_count` (query, required, string) — Mites counted Example: `9`
- `bees_sampled` (query, optional, string) — Bees in sample (default 300) Example: `300`
- `threshold_percent` (query, optional, string) — Treatment threshold % (default 3)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/apiary-api/v1/varroa?mite_count=9&bees_sampled=300"
```

### Meta

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

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


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