# Tire Size API
> Tyre-size geometry as an API, computed locally and deterministically. The dimensions endpoint parses a metric tyre code such as 205/55R16 — or separate width, aspect ratio and rim values — into its full geometry: the sidewall height (width·aspect/100), the overall diameter (rim·25.4 + 2·sidewall) in millimetres and inches, the rolling circumference, and the revolutions per kilometre and per mile; a 205/55R16 works out to a 112.75 mm sidewall and a 631.9 mm (24.88 in) outside diameter. The compare endpoint takes an original and a replacement size and computes the speedometer error and ground-clearance change of swapping between them: because the speedometer is calibrated to the original rolling diameter, a larger tyre makes it read low, so true speed = indicated · OD_new/OD_old, and a tyre that is 2 % bigger means an indicated 100 is really about 102 km/h. Staying within ±3 % keeps the error and clearance change small. Tyre codes use the metric P-metric/Euro-metric form. Everything is computed locally and deterministically, so it is instant and private. Ideal for automotive, tyre-shop, fitment, car-enthusiast, fleet and vehicle-spec app developers, plus-sizing and speedo-error tools, and garage software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 endpoints. This is metric tyre geometry; for fuel economy use a fuel-economy 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/tiresize-api/..."
```

## Pricing
- **Free** (Free) — 7,200 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 72,000 calls/Mo, 6 req/s
- **Pro** ($13/Mo) — 320,000 calls/Mo, 15 req/s
- **Mega** ($40/Mo) — 1,700,000 calls/Mo, 40 req/s

## Endpoints

### TireSize

#### `GET /v1/compare` — Speedometer error between sizes

**Parameters:**
- `original_size` (query, required, string) — Original tyre (e.g. 205/55R16) Example: `205/55R16`
- `new_size` (query, required, string) — New tyre (e.g. 225/45R17) Example: `225/45R17`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tiresize-api/v1/compare?original_size=205%2F55R16&new_size=225%2F45R17"
```

**Response:**
```json
{
    "data": {
        "note": "Speedometer is calibrated to the original rolling diameter. A larger new tyre makes the speedo read low: true speed = indicated · OD_new/OD_old. Stay within ±3 % to keep the error small.",
        "inputs": {
            "original": "205/55R16",
            "replacement": "225/45R17"
        },
        "speedometer": {
            "reads": "slow (you are going faster than shown)",
            "true_speed_at_indicated_100": 100.3798
        },
        "new_diameter_mm": 634.3,
        "original_diameter_mm": 631.9,
        "diameter_difference_mm": 2.4,
        "ground_clearance_change_mm": 1.2,
        "diameter_difference_percent": 0.3798
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:20.881Z",
        "request_id": "5222a9cb-e8cd-496b-9295-74268ea4de78"
    },
    "status": "ok",
    "message": "Tyre comparison / speedo error",
    "success": true
}
```

#### `GET /v1/dimensions` — Tyre geometry from a size

**Parameters:**
- `size` (query, optional, string) — Tyre code (e.g. 205/55R16) Example: `205/55R16`
- `width` (query, optional, string) — Or section width (mm)
- `aspect` (query, optional, string) — Aspect ratio (%)
- `rim` (query, optional, string) — Rim diameter (in)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tiresize-api/v1/dimensions?size=205%2F55R16"
```

**Response:**
```json
{
    "data": {
        "note": "Sidewall = width·aspect/100 (mm); overall diameter = rim·25.4 + 2·sidewall. 205/55R16 ≈ 631.9 mm (24.88 in) outside diameter.",
        "inputs": {
            "size": "205/55R16"
        },
        "revs_per_km": 503.7346,
        "aspect_ratio": 55,
        "revs_per_mile": 810.6822,
        "circumference_m": 1.985172,
        "rim_diameter_in": 16,
        "circumference_mm": 1985.1724,
        "section_width_mm": 205,
        "sidewall_height_mm": 112.75,
        "overall_diameter_in": 24.87795,
        "overall_diameter_mm": 631.9
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:20.979Z",
        "request_id": "008af342-fa7d-412f-8501-428bfef7463e"
    },
    "status": "ok",
    "message": "Tyre dimensions",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Tyre codes like 205/55R16, or width (mm) + aspect (%) + rim (in). Section width and sidewall in mm, rim and diameters also in inches. Geometry only — actual rolling radius is a little smaller under load.",
        "service": "tiresize-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/compare": "Speedometer error and clearance change between two tyre sizes.",
            "GET /v1/dimensions": "Parse a tyre size (e.g. 205/55R16) into its full geometry."
        },
        "description": "Tyre size geometry: overall diameter, circumference and revolutions from a tyre code, and speedometer error when changing size."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:21.095Z",
        "request_id": "ba2cc2d6-1b69-482a-8dd3-d1bc9825c2f0"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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