If you're looking to scrape WhatsApp group members and export them into a CSV file, you're in the right place.

WhatsApp group members scraping is perfect for lead generation. It helps you easily gather contact details from targeted groups.

Imagine having a treasure trove of potential clients right at your fingertips! By scraping member info from relevant groups, you can build a valuable contact list tailored to your business.

This means you can directly reach out to people already interested in your niche, making your marketing efforts more effective and personalized. It's like having a head start in the race to connect with the right audience.

In this tutorial, you will learn:

Set up the WhatsApp Group members scraper

The script is a JavaScript code that scrapes data when you open the group members modal in the WhatsApp web client.

First, open WhatsApp Web Client on Chrome. Visit web.whatsapp.com and log in using your WhatsApp credentials.

Open Chrome Developer Console
Open Chrome Developer Console

Open Chrome Developer Console using Ctrl + Shift + J (Windows) or Cmd + Option + J (Mac). Or go to the main menu and click "More Tools -> Developer Tools".

Then click on the "Console" tab.

Then paste the following script into the console. Ensure you do this before opening the group members modal.

Notes
The source code for the WhatsApp Group Members scraper is available on GitHub. The script detect HTML changes when scrolling the members list.

Copy/Paste Scraper Script
Copy/Paste Scraper Script

After pasting the script, press "Enter" to execute the script. A widget appears in the bottom-right corner.

Important - If this is the first time you open the Chrome Developer Console, you might see a Warning message and be prevented to copy/paste the text into the console. To enable copy/pasting, just write "allow pasting", and press "Enter".

Chrome Console warning
Chrome Console warning

Note: To store the script in a Chrome Extension and access it quickly, please read Put the scrapping script in a Chrome Extension.

Scrape WhatsApp Group members

To start scraping group members, click on "Group info" and then "View all" in the members listing to open the group members modal.

Open WhatsApp Group Modal
Open WhatsApp Group Modal
Open WhatsApp Group Modal - View All
Open WhatsApp Group Modal - View All

Scroll through the list to load new users. The script will count and scrape these users.

Then, scroll slowly to the bottom, then slowly back to the top. Members information are loaded as you scroll and if you scroll too fast, the UI won't have the time to display it.

If the counter in the widget text increases as you navigate, it's working!

Important - You must scroll several times between the top and the bottom. Once the counter stops increasing, the scraping is finished.

Scraper Screen
Scraper Screen

Scrapped Fields

The script extracts the following details from the group members:

  • Phone Number - The member's phone number.
  • Name - The name displayed on WhatsApp (if available).
  • Description - The member's description or status message (if available).
  • Source - The name of the WhatsApp group.

Download the members in a CSV file

Once scraping is complete, or to perform "export checkpoints", click on the "Download X users" button to download the CSV file containing the scraped data.

Export Scraped data as CSV
Export Scraped data as CSV

Edit and view your CSV file

To load and view the CSV file, use Datablist.com or any spreadsheet tools.

With Datablist, you can segment your leads into different collections. And enrich your contacts using LinkedIn Profile Scraper or Apollo.

You can also match similar leads across several groups using Datablist Duplicate Finder.

Store the scrapping script in a Chrome Extension

Copy-pasting the script each time on the Chrome Console is time-consuming. Good news! You can use a Chrome Extension to quickly inject the script on the page. It can be added automatically on WhatsApp pages, or injected on a click.

Quick Access using a Chrome Extension
Quick Access using a Chrome Extension

Clicking on it from the Chrome Extension directly adds it to your WhatsApp pages.

The Chrome Extension is called "Inject Code" and is available on the Chrome Extensions store: https://chromewebstore.google.com/detail/inject-code/jpbbdgndcngomphbmplabjginoihkdph

Chrome Store
Chrome Store

Once the Chrome Extension is installed, click to configure a new script.

Configure Inject Code
Configure Inject Code

Click on the "+" button to create a "Snipper (script)".

Click to add a New Snippet
Click to add a New Snippet

Then on the configuration page, use the following settings:

  • Name: WhatsApp Scraper
  • URL Filter: https://web.whatsapp.com/*
  • Type: js
  • AutoRun: Select on to automatically inject the script on WhatsApp pages. Or off to add it after clicking from the extension menu.
  • CodeSource: Custom Code

Click "Save".

Snippet Conf
Snippet Conf

Pin the extension to have it from your navigation bar. And this is it!

Snippet Conf
Snippet Conf

FAQ

What is a WhatsApp Group Scraper?

A WhatsApp group scraper is a tool that extracts information about members from a WhatsApp group. This tool runs in your browser, requiring no additional extensions or proxies. You can easily gather member details and export them to a CSV file for further use.

How to remove the "Download" button?

Just reload your WhatsApp page. Any javascript code added in Chrome Developer Console will be removed.

How many users can be extracted?

The script stores the extracted users in a database. There is no limit on the number of users you can extract.

Can I extract users from different groups

Yes. The exported CSV contains a "Source" attribute. You can extract users from different sources and use the "Source" attribute to segment your data later on.

What is the "Reset" button?

The users are stored in a cache in your browser. The cache is kept if your browser restarts the page (intentionally or after a crash). When you copy/paste the script, it loads the previous profiles from the cache. The "Reset" button clears the cache.

Is it free?

The script is free and open-source. You can also clean and parse the data with a free account on Datablist.

Use Cases for WhatsApp Group Scraper

Networking and Business Development

For professionals looking to expand their network, scraping member details from industry-specific WhatsApp groups can be invaluable. Imagine you're part of a group dedicated to digital marketing; scraping members' contact details can help you create a focused list of potential clients or collaborators.

Event Organization

Organizers of events can use this tool to gather attendee information from WhatsApp groups. This data can then be used for follow-up emails, feedback surveys, or promotional activities for future events.

Community Management

If you manage a large community, a WhatsApp group scraper can help you keep track of member information, segment users for targeted communication, and enhance community engagement.

Market Research

Researchers can gather demographic data from WhatsApp groups to analyze trends, behaviors, and preferences. For instance, joining a WhatsApp group related to fitness and health can provide insights into the type of content and products the members are interested in.

Real-Life Examples

Example 1: Freelancer Building a Client Base

Jane, a freelance graphic designer, is part of several WhatsApp groups for freelancers and small business owners. By using the WhatsApp group scraper, she gathers contact information and reaches out to potential clients with personalized messages showcasing her portfolio and services.

Example 2: NGO Organizing a Charity Event

An NGO organizing a charity run uses the scraper to collect information from a WhatsApp group created for participants. This information helps them send out event details, reminders, and post-event thank-you messages efficiently.

Example 3: Academic Researcher Collecting Data

Dr. Smith, an academic researcher, joins multiple WhatsApp groups related to his field of study. He uses the scraper to collect data on group members, helping him understand the community better and tailor his research accordingly.

Other Scrapers