<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[macadress Blog]]></title><description><![CDATA[macadress Blog]]></description><link>https://macadress.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 18:25:14 GMT</lastBuildDate><atom:link href="https://macadress.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[MAC vendor lookup in 5 languages (curl, JS, Python, Go, PowerShell)]]></title><description><![CDATA[Look up a MAC address vendor from curl, JavaScript, Python, Go and PowerShell with a free no-key API, plus batch and self-hosted options.]]></description><link>https://macadress.hashnode.dev/mac-vendor-lookup-in-5-languages-curl-js-python-go-powershell</link><guid isPermaLink="true">https://macadress.hashnode.dev/mac-vendor-lookup-in-5-languages-curl-js-python-go-powershell</guid><category><![CDATA[networking]]></category><category><![CDATA[api]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[golang]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[samy]]></dc:creator><pubDate>Wed, 07 Oct 2026 14:08:31 GMT</pubDate><content:encoded><![CDATA[<p>Network inventories, SIEM alerts and DHCP logs are full of MAC addresses, and the first question is usually "what made this device?". The answer is in the OUI, the first 24 bits, which the IEEE assigns to manufacturers. Here's how to resolve it from five languages using a free API, plus when to switch to bulk or self-hosted lookups.</p>
<h3>The endpoint</h3>
<p><code>GET https://api.macadress.com/v1/vendor/{mac}</code> returns the vendor name as plain text. No key is needed, and it allows 1,000 lookups per day per IP. It takes a full MAC in any common format: <code>3C:22:FB:12:34:56</code>, <code>3c-22-fb-12-34-56</code> or <code>3C22FB123456</code>.</p>
<h3>curl</h3>
<pre><code class="language-bash">curl https://api.macadress.com/v1/vendor/3C:22:FB:12:34:56
</code></pre>
<h3>JavaScript (Node 18+ or the browser)</h3>
<pre><code class="language-js">const vendor = await fetch(
  "https://api.macadress.com/v1/vendor/3C:22:FB:12:34:56"
).then(r =&gt; r.text());
console.log(vendor); // Apple, Inc.
</code></pre>
<h3>Python</h3>
<pre><code class="language-python">import requests
print(requests.get("https://api.macadress.com/v1/vendor/3C:22:FB:12:34:56").text)
</code></pre>
<h3>Go</h3>
<pre><code class="language-go">resp, err := http.Get("https://api.macadress.com/v1/vendor/3C:22:FB:12:34:56")
if err != nil { log.Fatal(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
</code></pre>
<h3>PowerShell</h3>
<pre><code class="language-powershell">Invoke-RestMethod "https://api.macadress.com/v1/vendor/3C:22:FB:12:34:56"
</code></pre>
<h3>When you need more than a name</h3>
<p>The keyed endpoint <code>GET /v1/mac/{mac}</code> returns JSON with the IEEE block type (MA-L, MA-M or MA-S), country, unicast/multicast, local/universal and a randomization estimate. <code>POST /v1/mac/batch</code> takes up to 100 addresses at once, which suits enriching a DHCP lease table or a SIEM export. A free key includes 1,000 lookups per month, and there are official clients for PHP, JS, Python, Go, PowerShell and C#. Details are in the <a href="https://macadress.com/mac-address-api">API docs</a>.</p>
<h3>A note on MA-M and MA-S blocks</h3>
<p>Many lookup scripts only match the first 6 hex characters. That fails for vendors with smaller IEEE blocks (MA-M is 28 bits, MA-S is 36 bits), where several companies share the same first 24 bits. A good lookup matches the longest block first. That's why a local copy of just the MA-L list gives wrong answers for some industrial and IoT devices.</p>
<h3>Offline or air-gapped?</h3>
<p>If MAC addresses can't leave your network, a <a href="https://macadress.com">self-hosted license</a> runs the same API on your own infrastructure.</p>
]]></content:encoded></item></channel></rss>