# AC Impedance API
> AC complex-impedance maths as an API, computed locally and deterministically. The series endpoint computes the impedance of a series R-L-C circuit at a given frequency — the inductive reactance X_L = 2πf·L, the capacitive reactance X_C = 1/(2πf·C), the complex impedance Z = R + j(X_L − X_C), its magnitude |Z| = √(R²+X²) and phase angle φ = atan(X/R) — and classifies the circuit as inductive (current lags), capacitive (current leads) or resistive. The parallel endpoint computes a parallel R-L-C impedance through its admittance Y = 1/R + j(ωC − 1/ωL) and Z = 1/Y, with magnitude and phase. The ac-ohm endpoint applies Ohm's law for AC, I = V / |Z|, to give the RMS current and apparent power from an RMS voltage and an impedance specified either as resistance and reactance or as a magnitude, and the real power when the phase is known. Resistance and reactance are in ohms, inductance in henries, capacitance in farads, frequency in hertz and voltage RMS in volts; phase is in degrees. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, audio, RF-filter, power-supply and motor-control app developers, AC-circuit and phasor tools, and electrical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is AC complex impedance; for the resonant frequency and reactance alone use a resonance API and for power-factor correction a power-factor 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/impedance-api/..."
```

## Pricing
- **Free** (Free) — 2,500 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 44,000 calls/Mo, 6 req/s
- **Pro** ($21/Mo) — 260,000 calls/Mo, 15 req/s
- **Mega** ($68/Mo) — 1,550,000 calls/Mo, 40 req/s

## Endpoints

### Impedance

#### `GET /v1/ac-ohm` — AC Ohm law

**Parameters:**
- `voltage` (query, required, string) — RMS voltage (V) Example: `120`
- `resistance` (query, optional, string) — Resistance R (Ω) Example: `10`
- `reactance` (query, optional, string) — Net reactance X (Ω) Example: `-22.756`
- `impedance_magnitude` (query, optional, string) — Or |Z| (Ω)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/impedance-api/v1/ac-ohm?voltage=120&resistance=10&reactance=-22.756"
```

**Response:**
```json
{
    "data": {
        "note": "AC Ohm's law: I = V / |Z|. Apparent power S = V·I (in volt-amps). Supply R and X to also get the phase angle.",
        "inputs": {
            "voltage_v": 120,
            "reactance_ohm": -22.756,
            "resistance_ohm": 10,
            "impedance_magnitude_ohm": null
        },
        "phase_deg": -66.277174,
        "real_power_w": 233.071734,
        "current_rms_a": 4.82775,
        "apparent_power_va": 579.330042,
        "impedance_magnitude_ohm": 24.856298
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:37.739Z",
        "request_id": "b8224321-fce6-4038-bcff-560a664b0587"
    },
    "status": "ok",
    "message": "AC Ohm law",
    "success": true
}
```

#### `GET /v1/parallel` — Parallel RLC impedance

**Parameters:**
- `resistance` (query, optional, string) — Resistance R (Ω) Example: `10`
- `inductance` (query, optional, string) — Inductance L (H) Example: `0.01`
- `capacitance` (query, optional, string) — Capacitance C (F) Example: `0.0001`
- `frequency` (query, required, string) — Frequency (Hz) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/impedance-api/v1/parallel?resistance=10&inductance=0.01&capacitance=0.0001&frequency=60"
```

**Response:**
```json
{
    "data": {
        "note": "Parallel R-L-C: Y = 1/R + j(ωC − 1/ωL); Z = 1/Y. Susceptance sign is opposite to reactance — a net inductive susceptance (B<0) gives an inductive Z with positive phase.",
        "inputs": {
            "frequency_hz": 60,
            "inductance_h": 0.01,
            "capacitance_f": 0.0001,
            "resistance_ohm": 10
        },
        "nature": "inductive",
        "phase_deg": 66.277093,
        "conductance_s": 0.1,
        "susceptance_net_s": -0.22755913,
        "admittance_magnitude_s": 0.24856218,
        "impedance_magnitude_ohm": 4.023138
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:37.844Z",
        "request_id": "96e0844c-76f6-4ea5-93e2-f9a7dffefa82"
    },
    "status": "ok",
    "message": "Parallel impedance",
    "success": true
}
```

#### `GET /v1/series` — Series RLC impedance

**Parameters:**
- `resistance` (query, optional, string) — Resistance R (Ω) Example: `10`
- `inductance` (query, optional, string) — Inductance L (H) Example: `0.01`
- `capacitance` (query, optional, string) — Capacitance C (F) Example: `0.0001`
- `frequency` (query, required, string) — Frequency (Hz) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/impedance-api/v1/series?resistance=10&inductance=0.01&capacitance=0.0001&frequency=60"
```

**Response:**
```json
{
    "data": {
        "note": "Series R-L-C: Z = R + j(X_L − X_C). |Z| = √(R²+X²); the phase φ = atan(X/R) is positive (current lags) when inductive, negative when capacitive.",
        "inputs": {
            "frequency_hz": 60,
            "inductance_h": 0.01,
            "capacitance_f": 0.0001,
            "resistance_ohm": 10
        },
        "nature": "capacitive",
        "phase_deg": -66.277093,
        "net_reactance_ohm": -22.755913,
        "impedance_imag_ohm": -22.755913,
        "impedance_real_ohm": 10,
        "impedance_magnitude_ohm": 24.856218,
        "reactance_inductive_ohm": 3.769911,
        "reactance_capacitive_ohm": 26.525824
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:37.942Z",
        "request_id": "2d082f70-54d9-4224-9470-a81675036713"
    },
    "status": "ok",
    "message": "Series impedance",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Resistance/reactance in Ω, inductance in H, capacitance in F, frequency in Hz, voltage RMS in V. Phase is in degrees (positive = inductive, current lags).",
        "service": "impedance-api",
        "formulae": {
            "ac_ohm": "I = V / |Z|",
            "series": "Z = R + j(X_L − X_C) ; |Z| = √(R²+X²) ; φ = atan(X/R)",
            "parallel": "Y = 1/R + j(ωC − 1/ωL) ; Z = 1/Y",
            "reactance": "X_L = 2πf·L ; X_C = 1/(2πf·C)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/ac-ohm": "RMS current and apparent power from voltage and impedance (R+jX or magnitude).",
            "GET /v1/series": "Series R-L-C complex impedance, magnitude, phase and reactances at a frequency.",
            "GET /v1/parallel": "Parallel R-L-C impedance via admittance, magnitude and phase."
        },
        "description": "AC complex-impedance calculator for R-L-C circuits: series impedance with magnitude and phase, parallel impedance via admittance, and AC Ohm's law for current and apparent power."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:38.069Z",
        "request_id": "5e4bc28c-d2af-499f-a391-75ed1ac0957a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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