api_key = 'your_api_key'
email = 'email@example.com'
url = 'https://api.emailvalidation.com/v1/validate?api_key=' + api_key + '&email=' + email
response = requests.get(url)
if response.status_code == 200:
data = response.json()
print(email + ' is a valid email')
print(email + ' is not a valid email')
print('Error while validating the email')
As you can see in the above code we are importing the
requests module and after that you need to copy paste the
api_key and after that you need to validate the
given email address and after that we are printing the
status of the validity of the email.