A lot of you want to know how to scrape data from your Instagram followers or anyone else's followers cough-competitors-cough.
The reason being, it's an awesome way to get contact information like emails and phone numbers from a targeted audience.
In this guide I'll share how you can scrape follower data yourself or completely outsource the scraping.
First things first, other than email addresses and phone numbers what other data you can extract from one Instagram account?
• Instagram Bio
• Number of Followers
• Location (10% of all users have country/city/street)
• Instagram Username
• Instagram Category (1 out of 1500)
• Number of Posts
• Whether it's a business or a regular Instagram account
All of these data points will help you further analyze your database. For example if you want to find influencers among your followers (or competitors) you can simply sort your dataset by number of followers. That way you'll instantly see which Instagram users are popular and can be used to spread the word about your brand.
Few people know this but 30-40% of all Instagram users have their contact information right on their profile.
Some of them add it willingly and some not...let me explain.
There are two ways to find an email address or phone number on Instagram:
10% of all users intentionally add their contact details in their bio. Businesses, influencers and even regular users hope someone will reach out to them when they leave their email and contact number in bio.
Instagram Business Accounts
Another 30% of all Instagram users have a so-called Instagram business account. With this type of profile they access additional statistics about their followers such as engagement %.
However, what they (probably) don't know is that when creating a business account they also agree to make their personal contact information publicly available.
There are a lot of data providers that collect Instagram user data and can scrape anyone's Instagram followers instantly.
Before I continue explaining how you can do this yourself I want to explain why is sometimes better to simply outsource the scraping.
I use this Instagram email scraper because all of their data is validated upon scraping and they offer advanced targeting options like gender, age, location, interest.
Here's why that's important:
Although scraping Instagram followers is pretty targeted you still end up with a lot of people that are not relevant to your business.
• 10% or 90 million Instagram profiles are fake accounts
• A lot of people will simply don't fall in your ideal niche (no gender, location, age or other types of targeting)
And if you plan on scraping emails for cold email marketing then this will negatively affect your campaigns i.e. very high bounce rates.
Web-scraping means a lot of trash in your net. Some examples would be:
• Catch all emails
• Fake emails
Here's how this affects your plans:
Scraped email lists from Instagram can be used in two ways - either for cold emailing or using them as custom audiences in Facebook Ads.
When you create your cold email campaign and reach out to so many invalid emails, there's a good chance your company domain will end up in SPAM. This means that even regular emails will be considered spam and not reach the desired destination.
Or, if you import the list as Custom Audiences, Facebook will notice that a lot of your contacts are invalid which may result in permanent ban.
That's why the Instagram scraper I use also validates the emails and offers additional targeting like gender, age, location or emails based on keywords in user bio.
If you have less than 1000 followers you can extract data manually. Note that to see more information on a profile you need to visit all users with the Instagram application i.e. from a mobile device.
Collect the data by copy-pasting it in a spreadsheet.
PS. I really don't recommend visiting more than 1k profiles manually (at least not with your personal profile) because you will get your account suspended.
Python is the best way to scrape anything really.
Extracting data from Instagram followers with Python comes down to two simple things.
- Scraping the usernames (or user IDs) that follow a given profile (yours, your competitor’s followers etc), hashtag or location (yes you can do that too)
- Scraping additional details (email, category, etc) for all usernames/ids collected
If you only want to scrape follower usernames, here's a code sample by @tonoli
from datetime import datetime from modules import compare from modules import file_io from modules import stats from modules.scraper import Scraper from modules.utils import ask_input, ask_multiple_option groups = ['followers', 'following'] # Ask for input target = ask_input('Enter the target username: ') group = ask_multiple_option(options = groups + ['both']); print('\nEnter your Instagram credentials') username = ask_input('Username: ') password = ask_input(is_password = True) def scrape(group): differs = False scraper = Scraper(target) startTime = datetime.now() scraper.authenticate(username, password) users = scraper.get_users(group, verbose=True) scraper.close() last_users = file_io.read_last(target, group) if last_users: differs = bool(compare.get_diffs(users, last_users)) if (differs or not last_users): file_io.store(target, group, users) # Stats stats.numbers(len(users), scraper.expected_number) if (differs): stats.diff(users, last_users) print('Took ' + str(datetime.now() - startTime)) if (group == 'both'): for group in groups: scrape(group) else: scrape(group)
This is enough to extract the followers of specific Instagram account.
One thing worth mentioning is that profiles with huge follower base will be harder to scrape with this method (Instagram is pretty strict with call-limits). But for a small account, it should do the job.
Here's all you'll need to execute this:
• Python 3
• Chrome installed (Selenium uses the chromedriver contained in the drivers folder)
• and, Instagram credentials to log in
If you only needed to scrape list of Instagram usernames, that follow a specific account, then you’ll be done with the first part. But if you want to market to those people, then you’ll need to scrape additional details, like email addresses, phone numbers, category of the profile etc.
This is a bit harder to do as you’ll need Instagram accounts and log them through the mobile API. Here is a sample on how to do that with the browser, but again, you are limited and PLEASE don’t do any scraping with your main Instagram account:
Full code available here.
If you don’t want to bother with that, you can just upload the list of usernames you already got to this API and enrich it with the email addresses. It’s free to sign up and you’ll also get 1500 credits so use it to speed up the process.
If you have no previous experience with Python but want to export a list of your followers (without contact data) you can use IGExport. If you are targeting less than 500 followers you can export the list for free. The max amount of followers you can download is 50k.
And for those of you who also want to get valid & targeted emails and phone numbers from anyone's followers, visit Influencers Club.