Introduction
Welcome to the MAC Vendors API! Our goal is to make our data accessible to anyone that wants to use it, so we made the API as easy to use as possible. Send an HTTP GET with a MAC address and we send back the vendor. There are two ways to call it.
Just send the address. You get the vendor's name back as plain text. It suits scripts, one-off checks and anything that only looks up a few addresses.
Sign up, get a key, and call the
/v1
endpoint. You get the full registration as JSON or plain text, your own limits with a usage dashboard, and paid plans up to a million requests a day.
Making a request
Both endpoints take one MAC address in the path. Any of the usual formats work, and only the prefix matters, so the first six characters are enough for most vendors.
00-11-22-33-44-55
00:11:22:33:44:55
00.11.22.33.44.55
001122334455
0011.2233.4455
00:11:22
Without a key
https://api.macvendors.com/{mac_address}
$ curl https://api.macvendors.com/FC:FB:FB:01:FA:21
Cisco Systems, Inc
With an API key
https://api.macvendors.com/v1/lookup/{mac_address}
Send your key in an
Authorization: Bearer
header. Keys are created on your account page after you sign up. Responses are JSON unless you ask for
text/plain
in the
Accept
header, in which case you get just the name.
$ curl https://api.macvendors.com/v1/lookup/FC:FB:FB:01:FA:21 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"assignment": "FCFBFB",
"organization_name": "Cisco Systems, Inc",
"organization_address": "80 West Tasman Drive San Jose CA US 94568",
"registry": "MA-L"
}
}
Responses
- 200 Found. The vendor's name as plain text, or the JSON above with a key.
-
404
Not found.
No vendor has registered that prefix. The body is a JSON error that says why, such as
Not FoundorLocally Administered Address. This counts as a request. -
429
Slow down.
Over the per-second or daily limit. Comes with a
Retry-Afterheader. A per-second 429 does not count against your daily quota. - 401 Bad key. Keyed endpoint only: the key is missing, wrong or revoked. Not counted.
Code examples
The anonymous endpoint in each language. Keyed examples are in your account's docs once you sign up.
mac_address="FC:FB:FB:01:FA:21"
response=$(curl -s -w "\n%{http_code}" "https://api.macvendors.com/$mac_address")
status=${response##*$'\n'}
body=${response%$'\n'*}
case "$status" in
200) echo "Vendor: $body" ;;
404) echo "Not Found" ;;
# 429: rate limited (1 request/second, 1,000/day without an API key)
*) echo "Request failed with status $status" ;;
esac