Facebook Group Extractor

Scrape Facebook profiles, names & information from members of Facebook groups

Share:  
Table of Contents

Collect information from any Facebook group

Get to know any Facebook member that shares the same interests as you. Use any Facebook group you have access to and gather:

  1. Facebook profile links
  2. Names
  3. Profile pictures
  4. Current job/location

What will you need? ⚙️

  • Session cookies c_user and xs: Your c_user and xs session cookies from Facebook.
  • Spreadsheet URL: The link of a Google Spreadsheet (or CSV) with Facebook groups URLs in it, OR the direct link of a Facebook group (unless they're public, you must be a member of these groups).
  • Number of members per group: The number of members you want to collect per group. If left empty, the API will scrape all group members.
  • Number of members per launch: If you want to scrape all members from a huge single group, you can choose to retrieve the data in several short launches instead of a long one.

(You already have all that? Click straight away on "Use this API")

What you need to do.

1. Create an account on Phantombuster.com 💻

If you haven't already, create a FREE account on Phantombuster. Our service will browse the web for you. It’s a website automator which runs in the cloud. Once done we'll follow up.

2. Use this API on your account.👌

We cooked up in our lab a script with first-class attention.
Now that you're connected to Phantombuster, Click on the following button (it will open a new tab).

3. Click on Configure me!

You'll now see the 3 configuration dots blinking. Click on them.

4. Facebook authentication 🔑

Because the script will manipulate Facebook for you, it needs to be logged on your Facebook account. For that you just need to copy paste two session cookies in the script argument:

  • Using Chrome, go to your Facebook homepage and open the inspector
    → Right click anywhere on the page and select “Inspect”
    CMD+OPT+i on macOS
    or
    F12 or CTRL+MAJ+i on Windows

  • Locate the “Application” tab

  • Select “Cookies” > “http://www.facebook.com” on the left menu.

  • Locate the “c_user” cookie.

  • Copy what’s under “Value” (Double click on it then Ctrl+C) and paste it into your script Argument)

  • Do the same for the “xs” cookie.

// How to access your cookies with Firefox and Safari//

5. Add a Google Spreadsheet 📑

Below your session cookies you’ll find Spreadsheet URL.

Add in the Spreadsheet URL textbox the link of a Google spreadsheet with this same format (Share option must be OPEN):

Your spreadsheet should contain a list of Facebook Group URLs (one link per row).

You can specify the name of the column that contains the profile links. Simply enter the column name in the next text field.
You can also enter a single Facebook group URL directly in the field.

Click on Launch & Enjoy!

It’s done! All that is left to do is to click on "launch" to try your script!

Output

This API will output CSV and/or JSON containing the following fields:

  • profileURL (Facebook profile URL)
  • imageURL (Profile picture URL)
  • name (Full name)
  • additionalData (Profile data such as job or location)
  • groupName (Name of the Facebook Group)

Developers

Like all APIs on Phantombuster, this API comes with an HTTP endpoint. Launch it from your computer, app or server with a simple HTTP request and get its result as JSON. Click Use this API above to create your new endpoint.

Clone this API

The script below is all that's required to make the API work. If you're a developer, click the button to clone the code into a new Custom API Agent in your Phantombuster account. This operation will allow you to customize the API to your exact needs. This will also create a custom HTTP endpoint.

Contribute on GitHub

Feeling adventurous? Unsatisfied with the current state of this API? Send us pull requests on GitHub to improve the API store! The script is here and you might be interested in reading our documentation here

You can also edit the page you're reading right now

(we reward contributions we like with free Phantombuster accounts :D)

Share this API

Your friends & colleagues need to know about this!