How to Extract Email Address from a Website

Extracting email addresses from websites is one of the most common ways to find email addresses of prospective clients and it powers the marketing and sales strategies of countless businesses.

If you are familiar with coding then you’ll probably know that we can extract email addresses by using something known as regular expressions (regex). However, they are pretty tricky to write and even harder to debug, and even experienced coders run into numerous issues when trying to write a regex for something as complicated as an email address.

However, if you are a coder and got here just to find an email regex than, look no further; the regex for extracting email is shown below. For the rest of you, read on to find simple and free methods to extract email addresses.

\A(?:[a-z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_‘{|}~-]+)*
 |  "(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]
      |  \\[\x01-\x09\x0b\x0c\x0e-\x7f])*")
@ (?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
  |  \[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}
       (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:
          (?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]
          |  \\[\x01-\x09\x0b\x0c\x0e-\x7f])+)
     \])\z
     

Extracting Email Address from a Webpage or URL

In this section, we will discuss how to extract email addresses found on one webpage or URL. We will use the extract email addresses from webpage API from Algorithmia. You will need to signup with Algorithmia but it’s free (no credit card required) and you get 10,000 free credits which are more than enough for thousands of API calls a month.

  • Step 1: specify the webpage URL from where you need to extract email addresses in the left input pane and hit the “run example button” (circled in red). You will get the extracted email addresses in the right pane.

Extracting Email Address from Entire Website or Domain Address

In this case, you want to extract all the email addresses found on a particular website or pertaining to a particular domain address. Let’s say that you need to get email addresses for everyone associated with the Wall Street Journal website and not just one email address we extracted above.

  • Step 2: Go to JSONtoCSV converter and paste the JSON text to the top box circled in red. Once you preview that the extraction looks OK, simply download the results by clicking on “Download CSV”.
  • Step 3: Finally, open the downloaded CSV file in Excel or OpenOffice and check it.
  • Step 4: As you probably noticed, you only get 10 email addresses per API call. You can make multiple calls by changing the “page” parameter, or alternately, just contact us and we will increase the limit as per your requirements. In case you cannot find enough email addresses for a domain, then we can schedule a custom crawler to fetch all the email addresses associated with that domain.