I maintain a small Apify actor that reads company websites and returns emails, phone numbers and social links. On 30 November 2026 I ran the same list of 200 company websites (many of them marketing and web agencies) through the old version and a new one, then compared the rows.

The new version read 171 of the 200. The other 29 could not be reached or refused the request, did not resolve, ruled out automated reading in robots.txt, or were social network links. It finished in 167 seconds and returned an email for 139 sites and a phone number for 97.

Five sites lost an entry compared with the old version. I opened the pages to see why.

1. A phone link that had been commented out

The page still contained the old header, wrapped in a comment:

<!--<li><a href="tel:+1 555 010 0100">Call us</a></li>--> 

A pattern that searches raw HTML for href="tel: reads it happily. No visitor can see it, and the number may be years out of date. (The digits above are made up.)

2. A template placeholder inside a live link

One site showed a real number as the link text, while the link itself pointed at tel:+00-123-456-7890. The old code trusted every tel: link. The new one rejects obvious placeholder sequences.

3. Pieces of IDs read as phone numbers

I stop reading a page at 1.5 MB. On two sites the cut fell inside a script or a tag, so the closing part never arrived. My cleanup only removed blocks that were properly closed, which left the half block in the "visible text". It was full of IDs shaped like 1f9d2c7b-6150-4821-9a3e-... (this one is made up), and the middle of an ID looks a lot like a phone number.

4. Email addresses that only existed in a comment

On one site, two addresses on the company's own domain appeared only inside an HTML comment. They may be dead inboxes. The new version skips them.

The fix

The part that mattered is treating an unclosed block the way a browser does: it runs to the end of the document.

function visibleText(html) { return html .replace(/<!--[\s\S]*?(-->|$)/g, ' ') .replace(/<(script|style|svg)\b[\s\S]*?(<\/\1\s*>|$)/gi, ' ') .replace(/<[^<>]*(>|$)/g, ' '); } 

Each pattern either finds its closing marker or consumes the rest of the string, so a hostile page with thousands of unclosed openers cannot make it back up and rescan.

This short version has one weakness: a <!-- inside a JavaScript string starts a fake comment. In the actor I walk the document once and skip over script and style content before looking for comments.

Two smaller rules came out of the same review:

  • A number found in page text counts toward the charge only if it starts with + and has at least 10 digits. This rule leaves out lists of years and "+12 500 000 downloads".
  • A website that redirects to a different domain is reported with the new address, and you are not charged for it.

Cost of the test run

The actor charges once per website, and only when it finds a qualifying contact. On this list that was 139 websites: 139 × $0.0015 = about $0.21 on the Free and Bronze plans, plus a start fee of a fraction of a cent. The exact rule and the output fields are on the actor page: Website Email & Contact Scraper.

The email check is a mail server (MX) lookup only, and each address carries its result. A pass shows the domain can receive mail, not that the mailbox exists. Contact data can be personal data, so check what your use requires before you send anything.

I wrote this with AI help. The numbers come from my own runs.