Skip to content
GET /v1/resistor

Single LED resistor

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/ledresistor-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/ledresistor-api/v1/resistor" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/ledresistor-api/v1/resistor", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/ledresistor-api/v1/resistor");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/ledresistor-api/v1/resistor",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "R = (Vsupply − Vf)/I. The nearest E12 is rounded up so the LED current stays at or below the target.",
        "inputs": {
            "current_ma": 20,
            "led_voltage": 2,
            "supply_voltage": 5
        },
        "led_power_w": 0.04,
        "resistance_ohm": 150,
        "nearest_e12_ohm": 150,
        "resistor_power_w": 0.06,
        "recommended_resistor_rating_w": "0.25 W"
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:12.707Z",
        "request_id": "b38f314e-533b-4812-92c4-07b7572258bc"
    },
    "status": "ok",
    "message": "LED resistor",
    "success": true
}