MAC Vendors REST API

Automate MAC Address Lookup with our REST API.

API Endpoint

The public web UI is served separately from the REST API. Under the Apache proxy configuration, API requests are available below /api/.

Use the following URL to perform a MAC address lookup via the API:

https://macvendors.co.uk/api/mac_lookup/<mac_address>

Replace <mac_address> with the MAC address you want to query. For example:

https://macvendors.co.uk/api/mac_lookup/00:1B:2C:3D:4E:00

Response Format

The API will return a JSON response:

{
    "mac_prefix": "001B2C",
    "vendor": "ATRON electronic GmbH"
}
            

HTTP Status Codes

Accepted MAC Address Formats

Prefix Matching

When a full address is supplied, the API uses the most specific available IEEE assignment: MA-S (36-bit), MA-M (28-bit), then MA-L or CID (24-bit). The existing JSON response fields remain unchanged for compatibility.

Rate Limiting

To protect service availability, excessive automated traffic may be temporarily limited. Clients should use exponential backoff after a 429 Too Many Requests or 503 Service Unavailable response.

Command-line example

curl --fail-with-body --silent --show-error \
  'https://macvendors.co.uk/api/mac_lookup/001B2C3D4E00'

Python example

import json
from urllib.parse import quote
from urllib.request import Request, urlopen

mac_address = quote("00:1B:2C:3D:4E:00", safe="")
url = f"https://macvendors.co.uk/api/mac_lookup/{mac_address}"
request = Request(url, headers={
    "Accept": "application/json",
    "User-Agent": "my-network-tool/1.0",
})

with urlopen(request, timeout=10) as response:
    result = json.load(response)

print(result["vendor"])

PowerShell example

$MacAddress = [uri]::EscapeDataString('00:1B:2C:3D:4E:00')
$Uri = "https://macvendors.co.uk/api/mac_lookup/$MacAddress"
$Result = Invoke-RestMethod -Uri $Uri -TimeoutSec 10
$Result.vendor

OpenAPI document

The machine-readable OpenAPI 3.1 document describes the endpoint, path parameter, response fields and status codes for documentation, testing and client-generation tools.

When to Use the API

Use the API for scripts, monitoring systems, inventory tooling, and network automation where a browser lookup is not practical. For pasted switch or ARP output, the bulk lookup page is usually faster.