How I Scraped 2,000 Emails from TikTok for Cold Email Outreach
Using a simple strategy, I scraped 2,000 emails from TikTok to advertise my micro SaaS side project over the weekend. To my surprise, the open rate of these cold emails was high. I haven’t fully optimized my email collection process, so I wrote this post to help you scrape even more emails from TikTok.
Scraping Emails from TikTok #
I decided to experiment with cold email outreach to advertise my my micro SaaS side project related to TikTok. Since I was focusing on TikTok, I figured the best place to find people to reach out to was on the platform itself.
After some digging, I discovered that many user-generated content (UGC) creators (i.e., people who create TikTok videos for brands) list their email addresses in their bios. These were my first set of target customers.
Attempt 1: Scraping the TikTok Accounts Search Tab #
I went to the TikTok accounts tab (example) to search for keywords like “ugc”, “creator” and “ugc content creators”.
It was great that many of the accounts I searched for listed their emails in the bio, making it easy to quickly scroll down the page to get what I needed.
Account Search Tab on TikTok
TikTok restricts the number of total accounts they display for any given search in the Accounts tab. Additionally, their Accounts search feature is fairly basic and only considers exact match. This made it challenging to scale the process, but I still managed to scrape 176 emails.
Thanks to the Watir library and an awesome course by Ryan Kulp, I was able to create an Account page scraper in Ruby that only took 57 lines of code.
Attempt 2: Scraping TikTok usernames from a Video Search Tab #
The next thing I did was to look at the accounts in the Videos tab of the search page.
TikTok showed me a wide variety of profiles, with videos related to my search query. Bingo! This means I can access even more profiles, as opposed to the exact match of the username I’d get in the account search tab.
Video Search Tab on TikTok
I used “ugc”, “personality”, “content” and “content creator” to scrape around 1240 unique usernames. I checked to see how many of them included an email address in their bio, and ended up with 414 emails (33% of the total). It was much better than the 10-20% I was expecting.
It’s important to note that if you open too many profiles in a short space of time, TikTok will temporarily stop displaying new pages. So be careful when scraping!
usernames = ; document.querySelectorAll('[data-e2e="search-card-user-unique-id"]').forEach(div => usernames.push(div.innerText));
I am leaving out the code to scrape the bio of individual usernames from code above as an exercise 🙂 (Hint look at the Ruby code I linked in the Attempt 1).
Final Attempt: Scraping TikTok usernames via Hashtags #
TikTok has been releasing their Top Ads, i.e. the categories and types of videos that convert the best on their platform.
TikTok’s Best Performing Ads
I reasoned that the people who post in these categories get contacted by the brands to advertise the product, and therefore are more likely to list an email in the bio.
I devised some hashtags based on the categories I saw on the TikTok Top Ads page at the time: #makeuptutorial, #selfcare, #cleanbeauty, #couplestiktok, #springcleaning, #skincare, #essential, #whatsinmybag, #whatsinmypurse, #fyp, #sportsequipment, #exercise
I used the same strategy and the code to scrape the usernames and their emails, as I did in the previous attempt. I managed to scape 2,879 usernames after removing duplicates leading to a total of 1,371 email scraped (48% of the total).
Total emails scraped: 1,961. Not bad, considering it took only a few hours of work during the weekend.
Further Ideas to Scrape Even More Emails #
I had a few other ideas in mind for scraping more emails, but I didn’t get around to trying them out since I already had enough emails to do cold email outreach. I am listing them here in case anyone else wants to give them a shot.
You could look into following the accounts that the accounts you’ve already scraped follow, since the creator likely follows another creator. Unfortunately, TikTok only allows you to view the accounts people follow on the mobile app. This requires more investigation to make it work on the desktop.
Some accounts list “linktr.ee” or “beacons.ai” which contains the email or other contact info. Worth scraping that as well.
Cold Email Outreach #
Disclaimer, I had no experience sending cold emails, so I was trying to figure out a way to do it at scale. I wanted a software that would automate the process of sending emails in bulk and also track the results.
My first thought was to use Postmark, an email service tool that I already use for the transactional emails. Unfortunately, after sending around 200 emails, Postmark noticed that I was running a cold email campaign and temporarily paused sending on my account. Apparently, Postmark doesn’t allow cold emails to be sent through their API.
Tracking few cold emails I sent with Postmark
By sending first 200 emails, I got an early glimpse of the results. On the good side, my emails had a high open rate of 75%. Unfortunately, very few people clicked on the website I linked in the email, and I could only get two registered users (1%) from this campaign.
I didn’t want to stop at sending 200 emails, since I had 1,800 more to send emails to; so I had to find a workaround. Luckily, I stumbled upon the Yet Another Mail Merge (YAMM) extension on Google (thanks to Ryan again). It allowed me to send out mass personalized emails with Gmail, without relying on any API provider. The only limitation was the number of emails Google allowed me to send out per day. Let’s go!
I ran a cold email campaign over a few days with YAMM, using various templates. The results I got were similar to what I’d seen with Postmark: a relatively high open rate (60%), with somewhat disappointing click-throughs (2%).
As a final note, one of the replies I got gave me an idea for a better target customer.
Lessons and Next Steps #
Scraping emails from TikTok is not hard - many accounts leave their email in their bio. Most of these people will open an email if you reach out to them.
If you have any questions about the code or run into any problems, don’t hesitate to reach out.