# 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:** 2 total users, 1 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Page Scraper",
        "description": "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).",
        "version": "0.0",
        "x-build-id": "y9bfMXgbcm95giGur"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codenest~facebook-page-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codenest-facebook-page-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/codenest~facebook-page-scraper/runs": {
            "post": {
                "operationId": "runs-sync-codenest-facebook-page-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/codenest~facebook-page-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-codenest-facebook-page-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "pageUrls"
                ],
                "properties": {
                    "pageUrls": {
                        "title": "Page URLs / Usernames",
                        "type": "array",
                        "description": "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).",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape in parallel. Lower values are safer against rate-limiting or blocks. Default is 3.",
                        "default": 3
                    },
                    "minDelayMs": {
                        "title": "Minimum Delay (ms)",
                        "minimum": 500,
                        "type": "integer",
                        "description": "Minimum random delay in milliseconds between requests to mimic human behavior. Default is 1500ms.",
                        "default": 1500
                    },
                    "maxDelayMs": {
                        "title": "Maximum Delay (ms)",
                        "minimum": 500,
                        "type": "integer",
                        "description": "Maximum random delay in milliseconds between requests. Default is 4000ms.",
                        "default": 4000
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Specifies proxies that will be used by the scraper. Using a proxy (especially residential) is highly recommended when running on the Apify platform.",
                        "default": {
                            "useApifyProxy": true
                        }
                    },
                    "cookies": {
                        "title": "Cookies (JSON)",
                        "type": "array",
                        "description": "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.",
                        "default": []
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
