# Stress, Strain & Young's Modulus API
> Axial stress, strain and Young's modulus as an API, computed locally and deterministically. The stress endpoint relates the three quantities of an axially loaded member — the stress σ = F/A, the strain ε = ΔL/L and Young's modulus E = σ/ε — and solves for whichever you leave out, taking the modulus directly, in gigapascals, or from a built-in material table (steel, aluminium, copper, titanium, concrete, glass and more), with stress reported in pascals, MPa and GPa. The elongation endpoint computes how much a bar stretches under an axial load, δ = F·L/(A·E), from the force, length and cross-section (area or diameter) and the material or modulus, along with the stress, strain and the axial stiffness k = A·E/L. The poisson endpoint works with Poisson's ratio ν: the lateral strain that accompanies an axial strain, and the shear modulus G = E/(2(1+ν)) and bulk modulus K = E/(3(1−2ν)) derived from the Young's modulus. Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical, civil and materials-engineering tools, structural and machine-design apps, materials testing and education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is axial material deformation; for the 2D state of stress (principal stresses, Mohr's circle) use a Mohr-circle API and for column buckling use a buckling 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/youngmodulus-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 30,000 calls/Mo, 5 req/s
- **Pro** ($22/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($69/Mo) — 600,000 calls/Mo, 40 req/s

## Endpoints

### Elasticity

#### `GET /v1/elongation` — Bar elongation under axial load

**Parameters:**
- `force` (query, required, string) — Axial force F (N) Example: `10000`
- `length` (query, required, string) — Length L (m) Example: `2`
- `area` (query, optional, string) — Area A (m²) Example: `0.001`
- `diameter` (query, optional, string) — Or diameter (m)
- `material` (query, optional, string) — Material for E Example: `steel`
- `youngs_modulus_gpa` (query, optional, string) — Or Young's modulus (GPa)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/youngmodulus-api/v1/elongation?force=10000&length=2&area=0.001&material=steel"
```

**Response:**
```json
{
    "data": {
        "strain": 5.0e-5,
        "area_m2": 0.001,
        "force_n": 10000,
        "formula": "δ = F·L/(A·E); stiffness k = A·E/L.",
        "length_m": 2,
        "stress_mpa": 10,
        "elongation_m": 0.0001,
        "elongation_mm": 0.1,
        "youngs_modulus_gpa": 200,
        "axial_stiffness_n_m": 100000000
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:41.951Z",
        "request_id": "26f7e24b-1dbc-4318-bfa7-5ac59ab7b327"
    },
    "status": "ok",
    "message": "Bar elongation under load",
    "success": true
}
```

#### `GET /v1/poisson` — Poisson's ratio & elastic moduli

**Parameters:**
- `poisson_ratio` (query, optional, string) — Poisson's ratio ν Example: `0.3`
- `material` (query, optional, string) — Or a material Example: `steel`
- `youngs_modulus_gpa` (query, optional, string) — Young's modulus (GPa) for G and K Example: `200`
- `axial_strain` (query, optional, string) — Axial strain for the lateral strain

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/youngmodulus-api/v1/poisson?poisson_ratio=0.3&material=steel&youngs_modulus_gpa=200"
```

**Response:**
```json
{
    "data": {
        "formula": "ν = −ε_lateral/ε_axial; G = E/(2(1+ν)); K = E/(3(1−2ν)).",
        "material": "steel",
        "poisson_ratio": 0.3,
        "bulk_modulus_gpa": 166.66666667,
        "shear_modulus_gpa": 76.92307692,
        "youngs_modulus_gpa": 200
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:42.022Z",
        "request_id": "c45ffc8a-2572-41c2-bb3d-f46151ca3ad1"
    },
    "status": "ok",
    "message": "Poisson's ratio & moduli",
    "success": true
}
```

#### `GET /v1/stress` — Axial stress, strain & modulus

**Parameters:**
- `force` (query, optional, string) — Axial force F (N) Example: `10000`
- `area` (query, optional, string) — Cross-section area A (m²) Example: `0.001`
- `stress` (query, optional, string) — Or stress σ (Pa)
- `elongation` (query, optional, string) — Elongation ΔL (m) Example: `0.0001`
- `length` (query, optional, string) — Original length L (m) Example: `2`
- `strain` (query, optional, string) — Or strain ε directly
- `material` (query, optional, string) — Material (steel, aluminium…) for E
- `youngs_modulus_gpa` (query, optional, string) — Or Young's modulus (GPa)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/youngmodulus-api/v1/stress?force=10000&area=0.001&elongation=0.0001&length=2"
```

**Response:**
```json
{
    "data": {
        "strain": 5.0e-5,
        "stress": {
            "gpa": 0.01,
            "mpa": 10,
            "pascal": 10000000
        },
        "area_m2": 0.001,
        "force_n": 10000,
        "formula": "σ = F/A; ε = ΔL/L; E = σ/ε.",
        "strain_percent": 0.005,
        "youngs_modulus": {
            "gpa": 200,
            "mpa": 200000,
            "pascal": 200000000000
        }
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:42.109Z",
        "request_id": "d50d125f-e675-45a8-be32-1a72376d6723"
    },
    "status": "ok",
    "message": "Axial stress, strain & modulus",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "youngmodulus",
        "note": "Axial stress-strain & Young's modulus — computed locally and deterministically, no key, no third-party service.",
        "endpoints": [
            "/v1/stress",
            "/v1/elongation",
            "/v1/poisson",
            "/v1/meta"
        ],
        "materials": [
            "steel",
            "stainless_steel",
            "aluminium",
            "aluminum",
            "copper",
            "brass",
            "bronze",
            "titanium",
            "cast_iron",
            "concrete",
            "glass",
            "wood",
            "oak",
            "nylon",
            "rubber",
            "gold",
            "lead",
            "diamond"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:42.193Z",
        "request_id": "aa64ca96-ea42-4f95-9606-9860ec13c38d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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