Blog

How to Scrape Instagram Followers | With Python or No-Code

By October 4, 2020 September 8th, 2021 No Comments

This article teaches you how to scrape Instagram followers with and without python.

 

Important note: Please be advised that automatically scraping Instagram is against their terms of service.

 

This is just an educational resource and for those of you who don’t have the time, resources, and want to be 100% on the legal side of things, get in touch with us and just buy email addresses from Instagram.

Instagram is the most popular platform for sharing photos that has more than one billion monthly active users. Having that many users means that the platform is also rich with tons of data that can be collected and analyzed, mostly for marketing purposes.

By having validated data from Instagram, a platform where most people spend 30 – 60 minutes every day, you can gain valuable consumer sentiment insights, connect with users & influencers, and discover the ideal audience you want to reach.

What is Instagram Scraping?

Instagram scraping is the process of automatic extraction of data from the platform with the help of a scraping tool or service.

In our article we are going to share multiple ways of how you can go about scraping data from Instagram.

Later in our article we will share how to scrape Instagram using Python, but having to deal with code, programming languages, and compilers can be one of the most frustrating things for people that don’t have a coding background.

If you are one of those people, don’t worry and continue reading our article, because our first method of scraping Instagram followers is a solution for you that requires zero technical knowledge.

Influencers Club is a service that provides you with validated Instagram data without you having to worry about anything programming-related. We can find emails of Instagram users and we supplement that contact information with 26 other data points.

In no-time, we will send you a .csv file containing the information from the followers of that account, including their: usernames, email addresses, Instagram bio, number of followers, numbers of posts and 22 more data points!

How to Find Emails and Phone Numbers from Instagram Followers

Not many people know this information, but about 40% of all Instagram users have their contact information such as email address and phone number publicly available on their profile.

There are two ways that you can find an email address or a phone number of an Instagram users:

  • Instagram Biography

10% of all Instagram users add their contact details in their bio. Businesses, influencers, and even regular users add their contact information in their biography, hoping that someone will reach out to them. They leave their contact information publicly available because they want to be contacted.

  • Instagram Business Accounts (Special “Email” Button)

30% of the total number of Instagram users have an Instagram business account.

Users with a business account have access to additional statistics that can help them in growing their brand or business, but at the same time, by creating a business account they also agree to make their personal contact information publicly available.

If you want to manually find the email address of a business account, you should open the targeted account from your Instagram mobile application and click the “Email” button shown on their profile

There will be two parts to this article:

 

  1. How to scrape Instagram followers with other tools and services – For non-technical people
  2. How to scrape Instagram followers with Python – For developers

 

How (and why) to scrape Instagram data – For non-technical people

By following a certain Instagram influencer people reveal their interests. 

For example, I’m following the number 1 chess player in the world Magnus Carlsen. Even if you don’t know anything else about me, you can guess that I like playing chess or at least am interested in chess.

 

A business that sells chess clocks might make a small fortune by extracting & reaching out to all of 340k followers of Magnus Carlsen since most of these people are probably interested in chess.

To find Influencers that your audience follows, answer these questions:

 

1. What’s the most common interest & behavior among your current customers?

Gaming, traveling, reading books, fitness, blogging, etc…

After you determine the ones that are closest to your customer’s interests, find the most popular influencers on that topic. To do that visit the following article:

Then you can talk to our team and our research team can get you the emails (along with 27 other data points) of everyone following that influencer, without you having to worry about any of the technical stuff. Check out our pricing on this link.

 

2. What’s the most common characteristic among your customers?

For example, if you’re selling beard oil products (and you can’t find an influencer around that topic) you can still reach everyone that’s growing a beard. How?

 

Instagram #Hashtags 

People use hashtags to describe their Instagram posts & if you click on a certain hashtag, you can see everyone that used that hashtag.

 

As you can see in the image above, there are +600 000 posts with the hashtag #beardlifestyle. Sending a promo email of a new beard oil line to all of these people you will get new customers no matter what.

If you’re still not sure what influencers your audience follows or the hashtags that they use, you can always go after the followers of your competitors.

If you have any additional questions or want to get verified customer email lists feel free to reach out using this link.

 

 

Email Or Run Targeted Facebook Ads Against Your Competitor Followers 

50 percent of all our clients reach out to us with one goal in mind. They want to go after the customers of their competitors. It’s the safest option to contact people that you know are interested in the products or services you offer.

For example, imagine what would Rebook do if they had email addresses of everyone that follows nike_shoes (235k followers).

 

 

Export Instagram followers (No-Code)

If you want to only export your Instagram followers and not scrape, then IGExport is an extension developed that lets you easily export your followers.

Here are some of its features:

 

  • Scraping less than 500 followers is completely FREE
  • The maximum amount of followers you can scrape with this tool is 50 000 users
  • For every scraped follower you get their:
    • User ID & Username
    • Full Name
    • Whether you followed them back
    • Is the account verified
    • URL to the profile
    • Avatar URL

 

 

How to scrape Instagram followers with IGExport

 

  1. Add to Chrome
  2. Sign in with your Google Account
  3. Insert the Instagram username of the profile whose followers you want to get
  4. Click Export Followers

 

Alternatives?

If this one doesn’t work for you, you can check out some other Instagram scrapers like WebRobots, or Scrapy Gram.

Again, if you don’t want to do any work at all, we have this solution done for you over at Influencers Club. Just fill in the form below and let’s rock!
We’ve heavily invested in our research team that vets Instagram creators + influencers that personally sign up to be in our database. This way we help you be 100% on the safe side, both from an Instagram ToS perspective and GDPR / CCPA / ACMA.

If you have any additional questions or want to get verified customer email lists in 24 hours (no matter how long the email list is) feel free to reach out using this link.

 

2. How to scrape Instagram followers with Python

Scraping anything is really best done with Python. So if you don’t know Python and yet you somehow landed on this article, I am sure you will find your way around it. It’s super easy to do so. Scraping Instagram followers with Python comes down to two main things:

 

  1. 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)
  2. Scraping additional details (email, category, etc) for all usernames/ids collected

 

How to scrape an Instagram follower list

For a) here is a code sample written by a user named @tonoli on Github:

 

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 should be enough to gather a list of all Instagram followers for a specific account. PLEASE keep in mind that accounts with a huge following are a lot harder to scraping using this method. That’s because Instagram has limits that you need to respect and they are somewhat super hard to crack. But for a small account, it should do the job.

You need to have Python 3 and PIP installed. You also need to have Chrome installed as Selenium uses the chrome driver contained in the drivers’ folder. Finally, you’ll need your Instagram credentials to log in. At this time the dialog with the list of followers cannot be opened as an anonymous user.

 

How to scrape Instagram followers emails (+ additional details)

If you only needed to export a  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:

 

from requests import get
from bs4 import BeautifulSoup
import sys
import re
import json
from datetime import datetime
URL = 'https://www.instagram.com'
def get_data(username):
    url = '%s/%s/' % (URL, username)
    page = get(url, timeout=5)
    soup = BeautifulSoup(page.content, 'html.parser')
    data = soup.find_all('meta', attrs={'property': 'og:description'})
    photo = soup.find_all('meta', attrs={'property': 'og:image'})
    text = data[0].get('content').split()
    retext = re.findall(
        '<script type="text/javascript">([^{]+?({.*profile_pic_url.*})[^}]+?)</script>', str(soup))[0][1]
    jsontext = json.loads(retext)['entry_data']['ProfilePage'][0]
    print(jsontext)
    media_likes = 0
    media_comments = 0
    media_views = 0
    media_count = 0
    media_videos = 0
    media_list = []
    for media in jsontext['graphql']['user']['edge_owner_to_timeline_media']['edges']:
        media_count += 1
        media_likes += media['node']['edge_liked_by']['count']
        media_comments += media['node']['edge_media_to_comment']['count']
        if media['node']['is_video']:
            media_videos += 1
            media_views += media['node']['video_view_count']
            media_list.append({
                'id': '2042452950535483363',
                'img_url': media['node']['thumbnail_src'],
                'date_posted': datetime.fromtimestamp(media['node']['taken_at_timestamp']),
                'likes': media['node']['edge_liked_by']['count']  
            })
        else:
            media_list.append({
                'id': '2042452950535483363',
                'img_url': media['node']['thumbnail_src'],
                'date_posted': datetime.fromtimestamp(media['node']['taken_at_timestamp']),
                'likes': media['node']['edge_liked_by']['count'],
            })
    media_video_like_engagement = 0
    media_video_comment_engagement = 0
    if media_videos != 0:
        media_video_like_engagement = (
            ig_tv_likes / ig_tv_videos) / (ig_tv_views / ig_tv_videos)
    return ....

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 our API and we’ll enrich it and give you the email address if we have it. It’s free to sign up and you’ll also get 1500 credits.

 

What Can You Do With Emails From a List of Instagram Followers?

 

  • Email Marketing Campaigns

The most obvious one is also the most profitable. If you’re familiar with the craft of sending bulk emails then you’re surely going to love this. Having emails of targeted people turns out the be one of the biggest marketing revelations of 2020.

One example is the impact of this strategy on the CBD industry. Several CBD giants are allocating all of their advertising budgets to purchasing email database of Instagram followers (ps. we know this because we provide them the data). CBD clients experience an average x12 ROI, meaning they made $12  for every $ spent.

And that’s not the case only with CBD. Any business that has an online store can benefit from having contact info of people that are interested or consume products they sell.

Another success story is an eCommerce brand that sells bikinis using only our emails. Without any previous experience in sending emails at scale, they managed to figure that out and reach an incredible 2.5M in ARR. Read here about their whole setup for sending 100k cold emails per day.

 

  • Custom Audiences on Facebook 

Sending that amount of emails at once can be a pain, so you might consider plugging the emails in as custom audiences on Facebook and run ads against your competitor followers?

Why is Cleaning the Scraped Data so Important?

Web-scraping is good and all that, but because the process is completely automatic, you will get a lot of trash in your data, such as spam traps, catchall emails, or fake emails.

The email lists that you have from Instagram can be used in two different ways:

  • For Cold Emailing

If you haven’t sent cold emails at scale, you might think to yourself that having some bad emails in your datasheet isn’t a big problem, but bad emails actually make a big problem when sending cold emails. Let me explain why:

When you create your cold email campaign, if you have a lot of bad email addresses, the emails you send to those addresses will “bounce” – which means that they won’t end up in any inbox folder.

All email marketers know that having their bounce rate at the lowest level possible is very important, because if your bounce rate is high, Google will mark the domain from which you are sending your emails as “spam” and your emails will end up in the spam folder of your customers, and we don’t want that.

That’s why we are so invested and have multiple processes where we make sure that all the emails we share with our customers are 100% validated.

  • For Facebook Custom Audiences

If you haven’t heard about “Custom Audiences”, that’s a feature in Facebook ads where you can manually select every single user that you want to see your ads, by importing their email addresses.

Importing a list with a lot of bad emails in the Custom Audiences feature in Facebook ads will result in a permanent ban because Facebook’s algorithm will notice that many of your contacts are invalid.

 

 

Conclusion

We really hope that this article helped people that wanted to find a way to export Instagram followers as well as businesses that want to go after the followers of a certain Instagram profile.

Instagram with its massive user base is the holy grail for any marketing team and their goals because the platform has users which are interested in every possible offer. Web scraping, the automatic extraction of data from any web page, makes finding tons of information related to any subject much easier than doing everything manually.

Influencers Club gives you the opportunity to acquire lots of valuable data from your targeted Instagram audience without having the technical knowledge and skills to do that on your own. One of the most important factors of our work is the fact that we also validate the data we share with you.

We do that in order to prevent your accounts from being marked as “spam” while you are using Facebook Custom Audiences or Cold Emailing for your marketing purposes.

If you are interested in learning more about how you can get validated Instagram data, make sure to schedule a quick call with our team, where you can discuss the details related to your targeting.

Leave a Reply

Hey, wait!

Before you go, check out a free data sample with the 20+ data points on every contact.