# Bearing Life API
> Rolling-element bearing life maths (ISO 281) as an API, computed locally and deterministically. The life endpoint computes the basic rating life of a ball or roller bearing, L10 = (C/P)^p — where p is 3 for ball bearings and 10/3 for roller bearings — from the dynamic load rating C and the equivalent load P, reporting the life in millions of revolutions and, given a speed in rpm, in hours and days; it also works backwards, solving the minimum dynamic load rating needed for a target life, or the maximum load a bearing can carry to still reach it. The load endpoint computes the equivalent dynamic load P = X·Fr + Y·Fa from the radial and axial loads and the bearing X and Y factors, the single load value the life formula needs. The reliability endpoint applies the ISO 281 life-modification factor a1 to give the adjusted rating life Lna = a1·L10 for any survival probability from 90 % up to 99.95 %, interpolated from the standard reliability table. Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical-engineering, maintenance and reliability tools, machine and drivetrain design, predictive-maintenance and lifetime-costing apps, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is rolling-bearing rating life; for shaft torsion stress use a torsion API and for rotational energy use a flywheel 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/bearing-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 15,000 calls/Mo, 6 req/s
- **Pro** ($24/Mo) — 80,000 calls/Mo, 18 req/s
- **Mega** ($74/Mo) — 400,000 calls/Mo, 50 req/s

## Endpoints

### Bearing

#### `GET /v1/life` — Basic rating life

**Parameters:**
- `dynamic_load_rating` (query, optional, string) — Dynamic load rating C (N) Example: `30000`
- `equivalent_load` (query, optional, string) — Equivalent load P (N) Example: `3000`
- `type` (query, optional, string) — ball | roller (default ball) Example: `ball`
- `rpm` (query, optional, string) — Speed (rpm) for life in hours Example: `1500`
- `target_life` (query, optional, string) — Or a target life (million rev) to solve C or P

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bearing-api/v1/life?dynamic_load_rating=30000&equivalent_load=3000&type=ball&rpm=1500"
```

**Response:**
```json
{
    "data": {
        "mode": "life",
        "inputs": {
            "rpm": 1500,
            "type": "ball",
            "exponent_p": 3,
            "equivalent_load": 3000,
            "dynamic_load_rating": 30000
        },
        "life_days": 462.963,
        "life_hours": 11111.11,
        "load_ratio": 10,
        "basic_rating_life_mrev": 1000
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:36.507Z",
        "request_id": "51a59b38-ffe6-4c38-9109-314cd2ad74b7"
    },
    "status": "ok",
    "message": "Bearing rating life",
    "success": true
}
```

#### `GET /v1/load` — Equivalent dynamic load

**Parameters:**
- `radial_load` (query, required, string) — Radial load Fr (N) Example: `2000`
- `axial_load` (query, optional, string) — Axial load Fa (N, default 0) Example: `1000`
- `x_factor` (query, optional, string) — Radial factor X (default 1) Example: `0.56`
- `y_factor` (query, optional, string) — Axial factor Y (default 0) Example: `1.5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bearing-api/v1/load?radial_load=2000&axial_load=1000&x_factor=0.56&y_factor=1.5"
```

**Response:**
```json
{
    "data": {
        "note": "P = X·Fr + Y·Fa. Default X=1, Y=0 gives a pure-radial load; supply the bearing's X and Y factors for combined loading.",
        "inputs": {
            "x_factor": 0.56,
            "y_factor": 1.5,
            "axial_load": 1000,
            "radial_load": 2000
        },
        "axial_to_radial_ratio": 0.5,
        "equivalent_dynamic_load": 2620
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:36.596Z",
        "request_id": "b6452e09-e0ba-4b2f-b3e9-e55892ed7fc4"
    },
    "status": "ok",
    "message": "Equivalent dynamic load",
    "success": true
}
```

#### `GET /v1/reliability` — Reliability-adjusted life

**Parameters:**
- `reliability` (query, required, string) — Survival probability (%, 90–99.95) Example: `99`
- `basic_life` (query, optional, string) — Basic rating life L10 (million rev) Example: `1000`
- `dynamic_load_rating` (query, optional, string) — Or C (N) to derive L10
- `equivalent_load` (query, optional, string) — and P (N)
- `type` (query, optional, string) — ball | roller (default ball) Example: `ball`
- `rpm` (query, optional, string) — Speed (rpm) for hours

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bearing-api/v1/reliability?reliability=99&basic_life=1000&type=ball"
```

**Response:**
```json
{
    "data": {
        "note": "Lna = a1·L10. a1 from the ISO 281 reliability table (interpolated). Reliability is the survival probability.",
        "inputs": {
            "basic_life_mrev": 1000,
            "reliability_pct": 99
        },
        "a1_factor": 0.25,
        "adjusted_life_mrev": 250,
        "failure_probability_pct": 1
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:36.700Z",
        "request_id": "c7599a03-706d-4d7e-9c75-8f3cffc6909e"
    },
    "status": "ok",
    "message": "Reliability-adjusted life",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Loads in newtons, speed in rpm. a1 from the ISO 281 reliability table (90–99.95 %). Idealised — excludes lubrication and contamination (a_ISO) factors.",
        "service": "bearing-api",
        "formulae": {
            "hours": "L10h = 1e6/(60·n) · (C/P)^p",
            "rating_life": "L10 = (C/P)^p,  p = 3 (ball), 10/3 (roller)",
            "adjusted_life": "Lna = a1 · L10",
            "equivalent_load": "P = X·Fr + Y·Fa"
        },
        "endpoints": {
            "GET /v1/life": "Basic rating life L10 = (C/P)^p in million revolutions and hours; solves C or P from a target life.",
            "GET /v1/load": "Equivalent dynamic load P = X·Fr + Y·Fa from radial and axial loads.",
            "GET /v1/meta": "This document.",
            "GET /v1/reliability": "Reliability-adjusted life Lna = a1·L10 for a chosen survival probability."
        },
        "description": "Rolling-element bearing life calculator (ISO 281): basic rating life, equivalent dynamic load, and reliability-adjusted life for ball and roller bearings."
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:36.803Z",
        "request_id": "44de388c-e073-4688-9280-e895bf9b0d34"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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