# Child Height Predictor API
> Predicted-adult-height maths as an API, computed locally and deterministically. The midparental endpoint applies the Tanner mid-parental method — for a boy (father + mother + 13)/2 and for a girl (father + mother − 13)/2 in centimetres — and returns the target height together with the ±8.5 cm range within which most children fall. The double endpoint uses the well-known rule of thumb that a child's adult height is about twice their height at age two. The remaining endpoint takes a child's current height and a predicted adult height (given directly or worked out from the parents) and returns the remaining growth and the percentage of adult height already reached. Everything is computed locally and deterministically, so it is instant and private. Ideal for parenting, paediatric and family-health app developers, growth-tracking and milestone tools, and wellness dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. Population estimates with wide individual variation — not medical advice. 3 endpoints. This is adult-height prediction; for BMI and body composition use a BMI 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/childheight-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 20,000 calls/Mo, 5 req/s
- **Pro** ($11/Mo) — 120,000 calls/Mo, 15 req/s
- **Mega** ($39/Mo) — 600,000 calls/Mo, 40 req/s

## Endpoints

### Height

#### `GET /v1/double` — Double-the-height-at-2

**Parameters:**
- `height_at_2` (query, required, string) — Height at age 2 (cm) Example: `88`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/childheight-api/v1/double?height_at_2=88"
```

**Response:**
```json
{
    "data": {
        "note": "A common rule of thumb: adult height ≈ 2 × the height at age 2 (girls are often estimated from age 18 months). Approximate only.",
        "inputs": {
            "height_at_2": 88
        },
        "predicted_height_cm": 176
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:19.379Z",
        "request_id": "17636020-4375-4453-9b61-bc86de8bad95"
    },
    "status": "ok",
    "message": "Double-at-2 estimate",
    "success": true
}
```

#### `GET /v1/midparental` — Mid-parental height

**Parameters:**
- `father_height` (query, required, string) — Father height (cm) Example: `180`
- `mother_height` (query, required, string) — Mother height (cm) Example: `165`
- `sex` (query, required, string) — boy/male | girl/female Example: `boy`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/childheight-api/v1/midparental?father_height=180&mother_height=165&sex=boy"
```

**Response:**
```json
{
    "data": {
        "note": "Mid-parental (Tanner): boy = (father + mother + 13)/2, girl = (father + mother − 13)/2. Most children land within ±8.5 cm.",
        "inputs": {
            "sex": "male",
            "father_height": 180,
            "mother_height": 165
        },
        "range_max_cm": 187.5,
        "range_min_cm": 170.5,
        "predicted_height_cm": 179
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:19.469Z",
        "request_id": "1c75e9c5-987a-405f-8a74-5df57aa20a0d"
    },
    "status": "ok",
    "message": "Mid-parental height",
    "success": true
}
```

#### `GET /v1/remaining` — Remaining growth

**Parameters:**
- `current_height` (query, required, string) — Current height (cm) Example: `150`
- `predicted_height` (query, optional, string) — Predicted adult height (cm) Example: `179`
- `father_height` (query, optional, string) — Or father height (cm)
- `mother_height` (query, optional, string) — and mother height (cm)
- `sex` (query, optional, string) — and sex

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/childheight-api/v1/remaining?current_height=150&predicted_height=179"
```

**Response:**
```json
{
    "data": {
        "note": "Remaining = predicted − current; percent of adult height reached = current/predicted. Growth slows toward the end and stops after puberty.",
        "inputs": {
            "current_height": 150,
            "predicted_height": 179
        },
        "remaining_growth_cm": 29,
        "percent_of_adult_height": 83.8
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:19.570Z",
        "request_id": "971c2a4e-eddd-493e-8d0c-3c6ab423c804"
    },
    "status": "ok",
    "message": "Remaining growth",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Heights in cm. These are population estimates with wide individual variation — not medical or growth-disorder advice.",
        "service": "childheight-api",
        "formulae": {
            "double": "2 × height at age 2",
            "remaining": "predicted − current",
            "midparental_boy": "(father + mother + 13)/2",
            "midparental_girl": "(father + mother − 13)/2"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/double": "Adult-height estimate as twice the height at age 2.",
            "GET /v1/remaining": "Remaining growth and percent of adult height reached from a current height.",
            "GET /v1/midparental": "Mid-parental target height from the parents' heights and the child's sex, with the ±8.5 cm range."
        },
        "description": "Predicted-adult-height calculator: mid-parental (Tanner) target height, the double-the-height-at-2 rule, and remaining growth from a current height."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:19.684Z",
        "request_id": "d458f3b6-45c2-47f1-b7e3-09f38b0fb5b1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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