# Angle API
> Convert and normalize plane angles. The convert endpoint moves a value between degrees, radians, gradians (gons), turns/revolutions, arcminutes, arcseconds, milliradians and DMS (degrees-minutes-seconds) — parse a DMS string like 12°34'56" or format a decimal angle as DMS. The normalize endpoint wraps any angle into the 0–360° or the −180–180° range. Perfect for graphics and game maths, CAD and surveying, robotics, astronomy and navigation headings. This covers plane angles specifically — a category general unit converters leave out. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. Distinct from general unit conversion and from geographic-coordinate conversion.

## 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/angle-api/..."
```

## Pricing
- **Free** (Free) — 1,055 calls/Mo, 2 req/s
- **Starter** ($1/Mo) — 8,950 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 140,500 calls/Mo, 20 req/s
- **Mega** ($59/Mo) — 740,000 calls/Mo, 50 req/s

## Endpoints

### Angle

#### `GET /v1/convert` — Convert an angle

**Parameters:**
- `value` (query, required, string) — Amount or DMS string Example: `180`
- `from` (query, optional, string) — deg|rad|grad|turn|arcmin|arcsec|mrad|dms (default deg) Example: `deg`
- `to` (query, optional, string) — Target unit (default rad) Example: `rad`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/angle-api/v1/convert?value=180&from=deg&to=rad"
```

**Response:**
```json
{
    "data": {
        "to": "rad",
        "from": "deg",
        "value": "180",
        "result": 3.141592654
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:45.409Z",
        "request_id": "00bac4cd-c703-4921-ae21-47399da8a2ce"
    },
    "status": "ok",
    "message": "Convert an angle",
    "success": true
}
```

#### `GET /v1/normalize` — Normalize an angle

**Parameters:**
- `value` (query, required, string) — Angle Example: `450`
- `unit` (query, optional, string) — Unit (default deg) Example: `deg`
- `range` (query, optional, string) — 360 or 180 (default 360) Example: `360`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/angle-api/v1/normalize?value=450&unit=deg&range=360"
```

**Response:**
```json
{
    "data": {
        "unit": "deg",
        "range": "360",
        "value": "450",
        "result": 90
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:45.502Z",
        "request_id": "b4e05927-279f-4a06-bb21-56dd08e03980"
    },
    "status": "ok",
    "message": "Normalize an angle",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "name": "Angle API",
        "notes": "Use from=dms to parse 12°34'56\" (or \"12 34 56\"), and to=dms to format. This is for plane angles (maths, graphics, navigation), not geographic coordinates.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/convert",
                "params": {
                    "to": "target unit (default rad)",
                    "from": "deg|rad|grad|turn|arcmin|arcsec|mrad|dms (default deg)",
                    "value": "amount or a DMS string (required)"
                },
                "returns": "the converted value (or a DMS object when to=dms)"
            },
            {
                "path": "/v1/normalize",
                "params": {
                    "unit": "default deg",
                    "range": "360 or 180 (default 360)",
                    "value": "angle (required)"
                },
                "returns": "the angle wrapped into range"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Convert plane angles between degrees, radians, gradians (gons), turns, arcminutes, arcseconds, milliradians and DMS (degrees-minutes-seconds), and normalize an angle into the 0–360° or −180–180° range. Pure local, no key."
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:45.598Z",
        "request_id": "ac37e9fd-
…(truncated, see openapi.json for full schema)
```


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