# Facebook Page Scraper (`codenest/facebook-page-scraper`) Actor

Extract complete Facebook page data - page names, profile/cover photos, follower counts, bios, contact details (email/phone/address), business hours, and all social media links (Instagram/YouTube/WhatsApp).

- **URL**: https://apify.com/codenest/facebook-page-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 6 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 📘 Facebook Page Scraper - Complete Page Data Extraction Tool

**Extract comprehensive Facebook page data with our powerful **Facebook Page Scraper**! This Apify actor enables you to scrape page profiles, engagement metrics, contact details, and complete social presence information.**

***

### 📋 Overview

Need to analyze competitors, monitor brands, or collect market intelligence? This **Facebook Page Scraper** delivers:

- 🏢 **Complete Page Profiles** - Names, bios, categories, and photos
- 📊 **Engagement Metrics** - Follower counts, following counts
- 📞 **Contact Information** - Emails, phones, addresses, websites
- 🔗 **Social Links** - Instagram, YouTube, TikTok, WhatsApp integration
- ⏰ **Business Hours** - Operating schedules and availability
- 🏷️ **Additional Data** - Anniversary dates, screen names, verified badges

Perfect for market researchers 📈, brand managers 🏷️, sales teams 💼, and data analysts 🔬!

***

### ⭐ Core Capabilities of Facebook Page Scraper

#### 📇 Profile Extraction

- **Page Identity** - Names, usernames, profile IDs
- **Visual Assets** - Profile photos, cover images
- **Page Categories** - Business types and classifications
- **About Sections** - Complete page descriptions

#### 📊 Engagement Analytics

- **Follower Count** - Total page followers
- **Following Count** - Pages this page follows
- **Review Data** - Rating scores and review counts

#### 📞 Contact & Location

- **Physical Address** - Complete location details
- **Phone Numbers** - Primary and WhatsApp numbers
- **Email Addresses** - Contact email addresses
- **Website URLs** - Official and associated sites
- **Service Areas** - Geographic coverage zones

#### 🔗 Social Presence

- **Linked Accounts** - Instagram, YouTube, TikTok, Twitter
- **WhatsApp Integration** - Direct chat links
- **Screen Names** - Alternative usernames
- **Verified Badges** - Official page verification status

#### 🏷️ Additional Metadata

- **Anniversary Dates** - Page creation milestones
- **Operating Hours** - Daily/weekly business schedules
- **Additional Info** - Special page attributes

***

### ⚙️ Input Configuration

Configure your **Facebook Page Scraper** with these options:

```json
{
  "pageUrls": [
    "https://web.facebook.com/banglanewsmagazine"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "maxConcurrency": 3,
  "minDelayMs": 1500,
  "maxDelayMs": 4000,
  "cookies": []
}
```

#### 📝 Input Specifications

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `pageUrls` | Array | ✅ Yes | - | Facebook page URLs to scrape |
| `proxyConfiguration` | Object | ❌ No | - | Proxy settings for reliable access |
| `useApifyProxy` | Boolean | ❌ No | true | Enable Apify proxy rotation |
| `apifyProxyGroups` | Array | ❌ No | \["RESIDENTIAL"] | Proxy group preferences |
| `maxConcurrency` | Integer | ❌ No | 3 | Parallel page processing (1-5) |
| `minDelayMs` | Integer | ❌ No | 1500 | Minimum delay between requests |
| `maxDelayMs` | Integer | ❌ No | 4000 | Maximum delay between requests |
| `cookies` | Array | ❌ No | \[] | Session cookies for authentication |

***

### 📤 Output Structure

Your **Facebook Page Scraper** produces comprehensive page data:

```json
[
  {
    "title": "Bangla Magazine",
    "profile_photo": "https://scontent.fkul16-3.fna...",
    "cover_photo": "https://scontent.fkul16-2.fna...",
    "followers": "746K followers",
    "following": "4 following",
    "bio": "বাংলাদেশের প্রতিটি খবর, প্রতিটি ঘটনা – সবার আগে আপনার কাছে।",
    "details": {
      "category": "News & media website",
      "address": "১৬ , পুরানা পল্টন, 1216",
      "service_area": null,
      "email": "banglamagazines.com@gmail.com",
      "phone": "+880 1707-168167",
      "website": "https://www.banglamagazinenews.com/",
      "instagram": "https://www.instagram.com/banglamagazine",
      "services": null,
      "hours": "Always open",
      "reviews": null,
      "lives_in": null,
      "from": null,
      "social_links": {
        "instagram": "https://www.instagram.com/banglamagazine",
        "youtube": "https://youtube.com/@banglamagazine.official",
        "tiktok": null,
        "twitter": null,
        "whatsapp": "https://api.whatsapp.com/send?phone=..."
      },
      "additional_info": {
        "whatsapp_number": ["+880 1707-168167"],
        "screenname": ["banglamagazinenews", "banglamagazine"],
        "anniversary": ["10 September 2017"],
        "INTRO_CARD_WEBSITE": ["banglamagazinenews.com"]
      }
    }
  }
]
```

#### 📖 Output Field Documentation

**🔹 Page Identity**
| Field | Description |
|-------|-------------|
| `title` | Official page name |
| `profile_photo` | Profile picture URL (high resolution) |
| `cover_photo` | Cover/banner image URL |
| `bio` | Page description and mission statement |

**🔹 Engagement Metrics**
| Field | Description |
|-------|-------------|
| `followers` | Total follower count (human-readable) |
| `following` | Number of pages followed by this page |
| `reviews` | Review/rating information when available |

**🔹 Business Information**
| Field | Description |
|-------|-------------|
| `category` | Page classification (News, Entertainment, etc.) |
| `address` | Physical location details |
| `service_area` | Geographic coverage zones |
| `email` | Contact email address |
| `phone` | Primary phone number |
| `website` | Official website URL |
| `hours` | Business operating hours |
| `from` | Page's listed location/city |

**🔹 Social Connections**
| Field | Description |
|-------|-------------|
| `social_links` | All linked social media accounts |
| `instagram` | Instagram profile URL |
| `youtube` | YouTube channel URL |
| `tiktok` | TikTok profile URL |
| `twitter` | Twitter/X profile URL |
| `whatsapp` | WhatsApp business link |

**🔹 Additional Metadata**
| Field | Description |
|-------|-------------|
| `additional_info` | Page attributes and special fields |
| `screenname` | Alternative/previous usernames |
| `anniversary` | Page creation date |
| `INTRO_CARD_*` | Standard page information fields |

***

### 🔧 Technical Features of This Facebook Page Scraper

#### 🚀 Performance Optimization

- **Concurrent Scraping** - Process multiple pages simultaneously
- **Smart Throttling** - Configurable delays to avoid detection
- **Proxy Integration** - Residential IP rotation for reliability
- **Cookie Support** - Session persistence for complex pages

#### 🛡️ Anti-Detection Measures

- **Natural Delays** - Randomized timing between requests
- **Browser Simulation** - Realistic request headers
- **Rotating Proxies** - Rotate IPs to prevent blocking
- **Rate Limiting** - Built-in request limiting

#### 📊 Data Quality Features

- **Complete Extraction** - Gets all visible page data
- **URL Normalization** - Handles various Facebook URL formats
- **Error Resilience** - Continues despite individual page failures
- **Human-Readable** - Formats follower counts naturally

***

### 💡 Use Cases for Facebook Page Scraper

- **📈 Competitor Analysis** - Track competitor followers and content
- **🏷️ Brand Monitoring** - Monitor brand presence and engagement
- **💼 Lead Generation** - Extract business contact information
- **🔬 Market Research** - Analyze industry page statistics
- **📊 Social Audits** - Evaluate page performance metrics
- **🤝 Partnership Discovery** - Find potential business partners
- **📱 Influencer Identification** - Discover relevant content creators

***

### ✨ Why Choose Our Facebook Page Scraper?

- **⚡ Complete Profile Data** - Gets every visible piece of information
- **🎯 Production Ready** - Battle-tested with thousands of pages
- **🔄 Regular Updates** - Adapts to Facebook interface changes
- **📦 Organized Output** - Clean JSON structure with labeled fields
- **🛡️ Safe Scraping** - Respects robots.txt and rate limits
- **💰 Cost Efficient** - Optimized request patterns minimize costs

***

### ⚠️ Limitations

- Requires valid Facebook page URLs (public pages only)
- Some data may vary based on page's privacy settings
- Very high concurrency may trigger rate limits
- Requires proper proxy configuration for best results
- Some pages may have incomplete additional\_info fields

***

### 📧 Need Customization for Your Facebook Page Scraper?

Want **specific fields**, **custom formats**, **historical data**, or **advanced filtering**?

✉️ Email **<codenest2.0@gmail.com>** for tailored enterprise solutions!

***

# Actor input Schema

## `pageUrls` (type: `array`):

Enter one or more Facebook page URLs or usernames to scrape. You can enter the full URL (e.g., https://web.facebook.com/FamousSL) or just the username (e.g., FamousSL).

## `maxConcurrency` (type: `integer`):

Maximum number of pages to scrape in parallel. Lower values are safer against rate-limiting or blocks. Default is 3.

## `minDelayMs` (type: `integer`):

Minimum random delay in milliseconds between requests to mimic human behavior. Default is 1500ms.

## `maxDelayMs` (type: `integer`):

Maximum random delay in milliseconds between requests. Default is 4000ms.

## `proxyConfiguration` (type: `object`):

Specifies proxies that will be used by the scraper. Using a proxy (especially residential) is highly recommended when running on the Apify platform.

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

Optional Facebook session cookies in JSON format (array of cookie objects or a key-value dictionary). Paste your exported cookies here to log in and bypass Login Wall redirects on datacenter IPs.

## Actor input object example

```json
{
  "pageUrls": [],
  "maxConcurrency": 3,
  "minDelayMs": 1500,
  "maxDelayMs": 4000,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "cookies": []
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/facebook-page-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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call codenest/facebook-page-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=codenest/facebook-page-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/1fqQhAYW6m4YNG9KC/builds/y9bfMXgbcm95giGur/openapi.json
