# Antenna Length API
> Antenna length maths as an API, computed locally and deterministically. The dipole endpoint gives the total and per-leg length of a half-wave dipole for a frequency, in metres, feet, inches and centimetres, applying a velocity factor (about 0.95 for wire) and also reporting the classic 468 ÷ f(MHz) feet rule of thumb. The quarterwave endpoint gives the element length of a quarter-wave vertical or monopole, with the 234 ÷ f(MHz) rule. The element endpoint computes the length of an element at any fraction of a wavelength — full-wave, half-wave, quarter-wave, fifth-wave, five-eighths or a custom fraction. Frequencies accept Hz, kHz, MHz and GHz, and the velocity factor is configurable. Everything is computed locally and deterministically, so it is instant and private. These are starting lengths: real antennas need trimming and tuning for the lowest SWR, as end effects and surroundings shift the resonant length. Ideal for amateur-radio and RF tools, antenna and IoT design, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is antenna geometry; for general wavelength, frequency and photon energy use a wavelength 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/antenna-api/..."
```

## Pricing
- **Free** (Free) — 11,735 calls/Mo, 2 req/s
- **Starter** ($13/Mo) — 21,350 calls/Mo, 8 req/s
- **Pro** ($33/Mo) — 263,500 calls/Mo, 20 req/s
- **Mega** ($71/Mo) — 1,360,000 calls/Mo, 50 req/s

## Endpoints

### Antenna

#### `GET /v1/dipole` — Half-wave dipole length

**Parameters:**
- `frequency` (query, required, string) — Frequency Example: `14.2`
- `frequency_unit` (query, optional, string) — hz|khz|mhz|ghz (default mhz) Example: `mhz`
- `velocity_factor` (query, optional, string) — default 0.95 Example: `0.95`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/antenna-api/v1/dipole?frequency=14.2&frequency_unit=mhz&velocity_factor=0.95"
```

**Response:**
```json
{
    "data": {
        "note": "Half-wave dipole = 0.5 · λ · velocity factor (≈0.95 for wire). Each leg is half the total. Rule of thumb: 468 ÷ f(MHz) feet.",
        "input": {
            "frequency_mhz": 14.2,
            "velocity_factor": 0.95
        },
        "each_leg": {
            "cm": 501.41,
            "feet": 16.4506,
            "inches": 197.407,
            "metres": 5.0141
        },
        "total_length": {
            "cm": 1002.83,
            "feet": 32.9011,
            "inches": 394.814,
            "metres": 10.0283
        },
        "full_wavelength_m": 21.1121,
        "rule_of_thumb_feet": 32.958
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:16.266Z",
        "request_id": "4d6e1f11-7e2e-4763-bdb7-64767e3339a3"
    },
    "status": "ok",
    "message": "Half-wave dipole",
    "success": true
}
```

#### `GET /v1/element` — Element of any wavelength fraction

**Parameters:**
- `frequency` (query, required, string) — Frequency Example: `146`
- `type` (query, optional, string) — fullwave|halfwave|quarterwave|fifthwave|5/8 Example: `halfwave`
- `fraction` (query, optional, string) — Or a custom fraction
- `frequency_unit` (query, optional, string) — hz|khz|mhz|ghz Example: `mhz`
- `velocity_factor` (query, optional, string) — default 0.95

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/antenna-api/v1/element?frequency=146&type=halfwave&frequency_unit=mhz"
```

**Response:**
```json
{
    "data": {
        "note": "Element length = fraction · λ · velocity factor. Pass type (fullwave/halfwave/quarterwave/fifthwave/5-8) or an explicit fraction.",
        "input": {
            "fraction": 0.5,
            "frequency_mhz": 146,
            "velocity_factor": 0.95
        },
        "element_length": {
            "cm": 97.54,
            "feet": 3.2,
            "inches": 38.4,
            "metres": 0.9754
        },
        "full_wavelength_m": 2.0534
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:16.359Z",
        "request_id": "7c4b9af9-78c8-46e8-b30e-ae4949fbb8b6"
    },
    "status": "ok",
    "message": "Arbitrary element",
    "success": true
}
```

#### `GET /v1/quarterwave` — Quarter-wave element length

**Parameters:**
- `frequency` (query, required, string) — Frequency Example: `14.2`
- `frequency_unit` (query, optional, string) — hz|khz|mhz|ghz Example: `mhz`
- `velocity_factor` (query, optional, string) — default 0.95 Example: `0.95`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/antenna-api/v1/quarterwave?frequency=14.2&frequency_unit=mhz&velocity_factor=0.95"
```

**Response:**
```json
{
    "data": {
        "note": "Quarter-wave vertical/monopole = 0.25 · λ · velocity factor. Needs a ground plane or radials. Rule of thumb: 234 ÷ f(MHz) feet.",
        "input": {
            "frequency_mhz": 14.2,
            "velocity_factor": 0.95
        },
        "element_length": {
            "cm": 501.41,
            "feet": 16.4506,
            "inches": 197.407,
            "metres": 5.0141
        },
        "full_wavelength_m": 21.1121,
        "rule_of_thumb_feet": 16.479
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:16.444Z",
        "request_id": "ee377d91-7b22-4643-86d9-aa71ac749036"
    },
    "status": "ok",
    "message": "Quarter-wave element",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Starting lengths only — trim and tune for lowest SWR; surroundings and end effects shift resonance.",
        "service": "antenna",
        "endpoints": {
            "/v1/dipole": "Half-wave dipole total and per-leg length (m/ft/in) for a frequency.",
            "/v1/element": "Element length for any fraction of a wavelength (full/half/quarter/fifth/5-8 or custom).",
            "/v1/quarterwave": "Quarter-wave vertical/monopole element length."
        },
        "description": "Antenna length maths: half-wave dipole, quarter-wave vertical and arbitrary elements from a frequency and velocity factor.",
        "velocity_factor_default": 0.95
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:16.541Z",
        "request_id": "1d8b9bc7-9ebf-4fcf-aac7-9d1d19755c6c"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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