Facebook Profile Scraper

Collect valuable information you need from Facebook profiles

Share:  
Table of Contents

Collect information from Facebook profiles

You have a list of Facebook profiles and need to quickly extract information from them? Don't waste your time copy/pasting anymore. Retrieve all the data you need of the specific Facebook profiles you're targeting in a CSV file, like:

  1. Facebook profile URLs
  2. Names
  3. Profile pictures
  4. Current and previous jobs & location
  5. Contact information
  6. Family members
  7. Life events

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 profile URLs in it, or the direct link of a Facebook profile.

(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. Easy & safe authentication

This automation will connect to Facebook on your behalf. The safest and most efficient way for Phantombuster to authenticate as yourself is by using your session cookies.

To make that process as easy as possible you can use Phantombuster's browser extension. It's a 2-click installation.

If you're operating from another browser and/or want to do it manually, here is how to do it.

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 Profile 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 profile URL directly in the field.

6. Additional pages to scrape

Facebook displays various data from the main Overview page of a Facebook profile (like the current job, city, and education background), but there's more detailed information to gather by visiting the other tabs:

  • Work and Education
  • Places they've lived
  • Contact and Basic Info
  • Family and Relationships
  • Details
  • Life Events
    Just tick their checkbox to have these pages also visited. Please note that visiting too many pages on multiple profiles will increase the chance that Facebook may temporarily block profile viewing on your account.

⚙️️Repetition setup ⚙️

Now that your API is ready, you can customize it to make it work repetitively.

Use to 'Number of profiles to process per launch' field to configure how many profiles you want to scrape per launch (5 for instance will make it 5 profiles each launch then stop). Then set a repetition setup:

To do so, simply hit the “Settings” button to define when your API is launched.

Then, select a frequency:

Now that this is set, click 💾 Save at the bottom of the page.

There you go, the scraping will be made for you without you doing anything!

Click on Launch & Enjoy!

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

Limits

Please be aware that this API will manipulate your own account on your behalf.

Since Phantombuster's servers are located on the west coast of the USA, Facebook might to consider those login attempts as unusual activities. It's likely that they'll then temporarily lock your account and ask you to confirm your login.

In order to use the Facebook APIs to their max potential, we recommend using a proxy close to you.

Also Facebook tends to notice when too many profiles viewings are done in a short period of time. We recommend spreading your scraping (like 5 profiles every 30min rather than 100 profiles in one go). Also if you're scraping more pages for additionnal data (like the Work and Education or Places tabs), you should reduce that amount even further.
If too many viewing actions are done, Facebook will warn you and temporarily block profile viewing on your account for about one hour. If that happens, you should be careful and reduce your scraping frequency the next time.

Output

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

  • profileURL (Facebook profile URL)
  • profilePictureUrl (Profile picture URL)
  • name (Full name)
  • status (Friend or not)
  • uid (Facebook ID)
  • work
  • education
  • cities
  • contactInfo
  • familyMembers
  • lifeEvents

Share this API

Your friends & colleagues need to know about this!