With this API, you can get all CIDRs within the ASN.
To use this API, you need an authentication token. You can generate a token below:
You can send a request using the following format. (Example)
import requests
headers = {
'Authorization': 'Bearer Generated_Token',
}
response = requests.get('https://imsleepy.pythonanywhere.com/asn-cidr/api/<ASN>', headers=headers)
print(response.text)