# Facebook page scraper (`curious_coder/facebook-profile-scraper`) Actor

Scrape facebook page and profiles in bulk and get important details such as email, social media urls, website and contact info.

- **URL**: https://apify.com/curious_coder/facebook-profile-scraper.md
- **Developed by:** [Curious Coder](https://apify.com/curious_coder) (community)
- **Categories:** Social media
- **Stats:** 3,993 total users, 18 monthly users, 100.0% runs succeeded, 65 bookmarks
- **User rating**: 3.16 out of 5 stars

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### How it works

The Facebook profile scraper is an Apify actor designed to extract information about profiles and pages. You can get all available information in a profile.

Here are some of the key information extracted by the scraper:

| 🏠 Address | 🌐 Website | 🖼️ Cover Photo |
|------------|------------|-----------------|
| 📘 Facebook Page | 🚹 Gender | 🆔 ID |
| ✉️ Email | 📱 Mobile | 🖼️ Profile Photo |
| 👍 Likes | 👥 Followers | 🏆 Category |
| ⭐ Ratings | ⏰ Hours | 💵 Price |
| 🛎️ Services | 🔗 Social media URLs | |

### Main Features

**Proxy Support:** To enhance reliability and avoid rate limiting issues, the actor supports proxy usage. You can provide a list of proxies that will be rotated automatically to ensure smooth and uninterrupted scraping.

**Cookies Support:** To view most of the Facebook profiles, you need to be logged in. This scraper scrapes public profiles and for profiles that requires login, It allows you to input cookies to use your Facebook account session information to scrape profiles on behalf of you.

**Scalability and Performance:** The actor is built on the Apify platform, which ensures scalability and excellent performance. It utilizes parallel processing to scrape multiple pages simultaneously, maximizing efficiency and minimizing the overall scraping time.

**Safety of facebook account** When using cookies for scraping, Scraper uses fixed proxy, disables parallel scraping and enables random delays to ensure the safety of your Facebook account. The cookies will be used only for profiles which require you to login to view them

**Data Export and Integration:** Once the scraping process is complete, you can easily export the extracted data in various formats such as JSON, CSV, or Excel. This allows for seamless integration with other tools and platforms for further analysis and utilization.

**Automatic Retry and Error Handling:** In case of temporary issues like network failures or timeouts, the actor has built-in automatic retry functionality. It intelligently handles errors to ensure a smooth and uninterrupted scraping experience.

### Sample data

Here is the sample json output of this actor:

```json
{
	"bio": "Aurora coffee shop offering locally roasted coffee, fresh house made coffee syrups and food options.",
	"influencer_category": "Page · Coffee shop",
	"address": "15600 E. Alameda Parkway, Aurora, CO, United States, 80017",
	"website": "http://www.millyscommunitycafe.com/",
	"name": "Milly's",
	"cover_photo": "https://scontent.fblr1-6.fna.fbcdn.net/v/t39.30808-6/271417086_3108154856125242_5661858805938538268_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=5f2048&_nc_ohc=CFd3Mypx7a8Q7kNvgEBaXsO&_nc_ht=scontent.fblr1-6.fna&oh=00_AYCAMvCu2g_fCByY4JM9JRKf98Jj11n-8zMK-dtzhZmz8w&oe=6644EA12",
	"url": "https://www.facebook.com/millyscommunitycafe",
	"gender": "NEUTER",
	"id": "100055273847808",
	"alternate_name": "",
	"username_for_profile": null,
	"profile_video": null,
	"is_verified": false,
	"email": "smiller@millyscommunitycafe.com",
	"mobile": "+1 720-830-5166",
	"profile_photo": "https://www.facebook.com/photo/?fbid=583803090138814&set=a.583803063472150",
	"likes": "1.4K",
	"followers": "1.8K",
	"category": "Coffee shop",
	"ratings": "Rating · 4.4 (95 reviews)",
	"hours": "Closed now",
	"price": "Price range · £",
	"services": "Dine in · Outdoor seating · In-store collection"
}
```

### Use cases

Here are some common use cases for Facebook profile data:

1. **Lead Generation:** Extracting profile details allows businesses to identify potential leads and prospects. By analyzing member profiles, businesses can identify individuals who are likely to be interested in their products or services, enabling targeted lead generation efforts.

2. **Influencer Marketing:** By analyzing member profiles, businesses can identify individuals with a significant following and high engagement rates, enabling them to establish partnerships for influencer marketing campaigns.

3. **Personalised cold outreach email content:** With the help of complete profile details you can write personalised emails that results in high open rate. You can pass the profile details to AI to generate personalized emails in bulk.

# Changelog

This Actor's version history is a separate document: https://apify.com/curious_coder/facebook-profile-scraper/changelog.md

# Actor input Schema

## `cookies` (type: `array`):

Cookie used to authorize actor with facebook.com. Install [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) chrome extension. Login to your facebook.com account. Click on the extension and export the facebook.com cookies. Insert the contents here

## `profileUrls` (type: `array`):

No description

## `count` (type: `integer`):

Leave this field empty if you want to scrape all items.

## `proxy` (type: `object`):

You can use proxy from your account's country if needed for extra safety.

## Actor input object example

```json
{
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("curious_coder/facebook-profile-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "proxy": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
    } }

# Run the Actor and wait for it to finish
run = client.actor("curious_coder/facebook-profile-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}' |
apify call curious_coder/facebook-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,curious_coder/facebook-profile-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/mlTO6kyEd7ZLgalf1/builds/gvNeDTxF6tPFxbolg/openapi.json
