# MAC Address API
> Validate, reformat and analyse MAC (EUI-48) addresses — entirely locally. The format endpoint accepts a MAC in any common notation — colon (aa:bb:cc:dd:ee:ff), hyphen (aa-bb-…), Cisco dotted (aabb.ccdd.eeff) or bare (aabbccddeeff) — and returns it in the notation you ask for plus all the others, in upper or lower case, normalising messy input into a clean canonical form. The info endpoint analyses an address: it splits the OUI (the manufacturer prefix) from the NIC portion, reports whether the address is unicast or multicast (the I/G bit) and whether it is universally or locally administered (the U/L bit), flags the broadcast address, and derives the Modified EUI-64 interface identifier and the matching IPv6 link-local address (fe80::…) per RFC 4291. Everything is computed locally and deterministically, so it is instant and private — no lookups, no third-party calls. Ideal for network automation and IPAM, switch/router and firewall tooling, device inventory and asset management, DHCP and provisioning, and IPv6 SLAAC work. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This formats and analyses the address; to look up the manufacturer behind a MAC use a MAC-vendor 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/macaddr-api/..."
```

## Pricing
- **Free** (Free) — 3,235 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 12,750 calls/Mo, 8 req/s
- **Pro** ($25/Mo) — 178,500 calls/Mo, 20 req/s
- **Mega** ($63/Mo) — 935,000 calls/Mo, 50 req/s

## Endpoints

### MAC

#### `GET /v1/format` — Reformat a MAC address

**Parameters:**
- `mac` (query, required, string) — A MAC address in any notation Example: `00:1a:2b:3c:4d:5e`
- `format` (query, optional, string) — colon (default), hyphen, dot (cisco), or bare Example: `colon`
- `case` (query, optional, string) — lower (default) or upper

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/macaddr-api/v1/format?mac=00%3A1a%3A2b%3A3c%3A4d%3A5e&format=colon"
```

**Response:**
```json
{
    "data": {
        "mac": "00:1a:2b:3c:4d:5e",
        "case": "lower",
        "format": "colon",
        "formats": {
            "dot": "001a.2b3c.4d5e",
            "bare": "001a2b3c4d5e",
            "colon": "00:1a:2b:3c:4d:5e",
            "hyphen": "00-1a-2b-3c-4d-5e"
        }
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:01.273Z",
        "request_id": "450ad1db-60a1-45ad-ab3a-ae692a382d40"
    },
    "status": "ok",
    "message": "Reformat a MAC address",
    "success": true
}
```

#### `GET /v1/info` — Analyse a MAC address

**Parameters:**
- `mac` (query, required, string) — A MAC address Example: `00:1a:2b:3c:4d:5e`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/macaddr-api/v1/info?mac=00%3A1a%3A2b%3A3c%3A4d%3A5e"
```

**Response:**
```json
{
    "data": {
        "mac": "00:1a:2b:3c:4d:5e",
        "nic": "3c:4d:5e",
        "oui": "00:1a:2b",
        "cast": "unicast",
        "eui64": "02:1a:2b:ff:fe:3c:4d:5e",
        "valid": true,
        "broadcast": false,
        "multicast": false,
        "administration": "universally administered (OUI)",
        "link_local_ipv6": "fe80::021a:2bff:fe3c:4d5e",
        "locally_administered": false
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:01.379Z",
        "request_id": "72d52daa-194b-4c1f-8b96-b2ef7f37feff"
    },
    "status": "ok",
    "message": "Analyse a MAC address",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "name": "MAC Address API",
        "notes": "Accepts aa:bb:cc:dd:ee:ff, aa-bb-…, aabb.ccdd.eeff or aabbccddeeff. EUI-64 flips the U/L bit and inserts FF-FE, per RFC 4291. This formats and analyses the address — to look up the manufacturer behind a MAC use a MAC-vendor API. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/format",
                "params": {
                    "mac": "a MAC address in any notation (required)",
                    "case": "lower (default) or upper",
                    "format": "colon (default), hyphen, dot (cisco), or bare"
                },
                "returns": "the MAC in the chosen notation and all common formats"
            },
            {
                "path": "/v1/info",
                "params": {
                    "mac": "a MAC address (required)"
                },
                "returns": "OUI/NIC, unicast/multicast, U/L scope, EUI-64 and link-local IPv6"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Validate, reformat and analyse MAC (EUI-48) addresses. The format endpoint accepts a MAC in any common notation — colon, hyphen, Cisco dotted or bare — and returns it in the notation you want plus all the others, in upper or lower case. The info endpoint analyses an address: its OUI (manuf
…(truncated, see openapi.json for full schema)
```


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