Empower Your Network Management with Python MAC Address Lookup.

MAC Address API use case.

Sometimes you just need to get explicit data for any given MAC Address for your network administration or DEVOPS activities and you can use free RESTful APIs provided by "WhoisXML API" - don't forget to get your API KEY.

With one API call you will obtain ready to use parsed JSON file with a MAC Address data such as OUI vendor information, manufacturer data and location details, detect virtual machines, and read the information encoded in a given MAC address.

Lookup MAC Address.

Coding: The Silent Symphony. - Updated: 2024-05-19 by Andrey BRATUS, Senior Data Analyst.

How does it work ?

This Python script below will use information from "WhoisXML API" and provide you a result in a JSON format without the need to use web a browser.
The process of performing MAC data Lookup for specified Address can be easily automated now !

Python code to perform MAC Address Lookup using API:

# MAC Address Lookup API USE

import requests

MAC = '00:00:5e:00:53:ab'

APIKEY ='your-api-key'

MACAddressLookupURL = f'https://mac-address.whoisxmlapi.com/api/v1?apiKey={APIKEY}&macAddress={MAC}&outputFormat=JSON'

r = requests.get(MACAddressLookupURL)

MACAddressLookup = r.json()

print(f'MAC Address Lookup info for {MAC} .\n')

MAC Address Lookup output:

MAC Address Lookup info for 00:00:5e:00:53:ab .

{'vendorDetails': {'oui': '00005E',
  'isPrivate': False,
  'companyName': 'Icann, Iana Department',
  'companyAddress': "INTERNET ASS'NED NOS.AUTHORITY Los Angeles CA 90094-2536 US",
  'countryCode': 'US'},
 'blockDetails': {'blockFound': True,
  'borderLeft': '00005E000000',
  'borderRight': '00005EFFFFFF',
  'blockSize': 16777216,
  'assignmentBlockSize': 'MA-L',
  'dateCreated': '1980-01-01',
  'dateUpdated': '2015-09-27'},
 'macAddressDetails': {'searchTerm': '00:00:5e:00:53:ab',
  'isValid': True,
  'virtualMachine': 'Microsoft Virtual PC / Virtual Server',
  'applications': ['Assigned for use in documentation'],
  'transmissionType': 'unicast',
  'administrationType': 'UAA',
  'wiresharkNotes': 'No details',
  'comment': ''}}

See also related topics:

Security, network administration and EH - DevOps Plus:

Python, the double-edged sword of security and ethical hacking, where you can defend systems with one hand and penetrate them with the other. It's like being a cybersecurity superhero who walks the fine line between good and mischievous.