How to validate a large number of emails with SendGrid and Python?

365 Views Asked by At

I have a list of 50k+ email every month addresses that I need to validate using SendGrid'API. I am looking for a way to validate all of the emails at once, rather than sending individual requests for each email.

Can someone provide a Python code snippet or a step-by-step guide on how to use SendGrid's API to validate a large number of emails in bulk?

I have tried validating emails one by one, but that takes lot of time, so i am in search of a way to validate all of emails at one, to save time

1

There are 1 best solutions below

0
Swimburger On

Unfortunately, the SendGrid email validation API does not support batch validation at this time:

The API currently accepts one email address at a time. If for some reason you have multiple addresses you need to validate, please call the API once per email address. We do not currently have a batch API.

You'll have to iterate over all your email addresses and validate them one by one.