Autonomous System Number Documentation
An autonomous system is a collection of connected Internet Protocol routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain, that presents a common and clearly defined routing policy to the Internet.
We offer api to help find the ASN of a given ip.
import requests
headers= {"X-Auth-Email":"youremail@something-here-re.com"}
# or if you want to use api X-AUTH-KEY and api X-AUTH-SECRET
headers = {"X-AUTH-SECRET":"", "X-AUTH-KEY":""}
url="https://api.nmmapper.com/api/v1/asn/?ip=37.120.208.36"
res = requests.get(url, headers=headers)
#
res.json()
{'autonomous_system_number': 9009,
'autonomous_system_organization': 'M247 Ltd',
'ip_address': '37.120.208.36',
'prefix_len': 21,
'network': '37.120.208.0/21'}
#