# Facebook Profile Scraper (`neuro-scraper/facebook-profile-scraper`) Actor

Facebook Profile Scraper SD - Facebook Profile Scraper is a social media data tool that extracts public Facebook profiles and pages: name, id, bio, category, followers, verified badge, work, education, places, websites, email, phone, photos and recent posts, no login.

- **URL**: https://apify.com/neuro-scraper/facebook-profile-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

### Facebook Profile Scraper - public profiles and pages

Facebook Profile Scraper reads public Facebook profiles (public figures, creators) and Facebook
Pages without logging in: name, numeric id, username, profile or page type, category, bio, follower,
following and "talking about" counts, verified badge, work, education, current city, hometown,
relationship, websites, email, phone, address, opening hours, services, Instagram link, profile and
cover pictures - and, if you want, their recent public posts. Export to JSON, CSV or Excel or use the
Apify API and integrations (Make, Zapier, n8n, Google Sheets, webhooks).

#### How it works

The logged-out profile page embeds its header, its intro card and the first timeline post. Every intro
line carries Facebook's own type (WORK, EDUCATION, CURRENT_CITY, PROFILE_EMAIL ...), so fields are
read by type, not by guessing from text. Recent posts come from the profile's timeline query: its id
and variables are read from the page's JavaScript bundles on every run, and the cursor from each page.

#### Input

| Field | What it does |
|---|---|
| `startUrls` | Profile or page URLs (www, m., profile.php?id=, /people/Name/123), usernames or numeric ids |
| `maxPosts` | Recent posts per profile (0 = profile only) - newest first, 3 per request |
| `onlyPostsNewerThan` / `onlyPostsOlderThan` | Date window for posts (`2026-09-01`, ISO, `30 days`) |
| `postKeywords` | Keep only posts containing any of these words |
| `maxComments`, `commentsSort`, `maxRepliesPerComment` | Attach comments to every post |
| `minFollowers`, `maxFollowers`, `accountTypes`, `verifiedOnly`, `onlyWithContact`, `emailDomains` | Filters |
| `onlyChanged` | Return a profile again only when one of its fields changed since the last run |
| `checkAdsLibrary` | For Pages: open the public Meta Ad Library and add `hasActiveAds` (one extra request) |
| `includeTransparency` | For Pages: creation date, "running ads" status and confirmed owner from the transparency tab (about 16 MB per Page) |
| `outputPreset` | `full`, `compact` (identity + counts) or `contacts` (identity + contact fields) |
| `includeFailedRows` | Also output a row (status + error) for inputs that cannot be read logged out |
| `maxPostPages`, `maxTotalItems`, `proxyConfiguration` | Safety stop, total limit and proxy (RESIDENTIAL by default) |

#### Output (one row per profile)

`id`, `username`, `url`, `name`, `accountType` (profile / page), `category`, `bio`, `isVerified`,
`followersCount`, `followingCount`, `likesCount`, `talkingAboutCount`, `checkinsCount`, `work[]`,
`education[]`, `currentCity`, `hometown`, `relationship`, `websites[]`, `email`, `emails[]`, `phone`,
`phones[]`, `address`, `hours`, `priceRange`, `rating`, `services[]`, `otherAccounts[]`,
`instagramUrl`, `responsibleEntity`, `gender` (people only), `profilePictureUrl`,
`profilePictureSmallUrl`, `coverPhotoUrl`, `pageId` (classic page id - the one the Ad Library uses),
`isBusinessPageActive`, `hasActiveAds`, `pageCreationDate`, `adStatus`, `isRunningAds`,
`confirmedOwner`, `posts[]`, `postsScraped`, `changedFields`, `isChanged`, `status`, `inputUrl`,
`scrapedAt`. Each post in `posts` has the same fields as
the Facebook Hashtag Scraper rows (text, date, reactions by type, comments, shares, media ...).

#### Measured limits (local runs, 2026-10-03, see TEST_REPORT.md)

- Only profiles that are public to logged-out visitors can be read: public figures (zuck, sheryl) and
  Pages. Ordinary personal profiles answer "This content isn't available at the moment" logged out
  (2 of 2 measured) - they are reported in the log, not charged.
- Friends lists, friend counts and the /about tab details beyond the intro card are not used: the
  /about page is 18.6 MB and adds only dates. The Page transparency tab (creation date, ad status)
  is about 16 MB, so it is opt-in (Katz's Delicatessen: created 2009-06-12, running ads).
- Posts: 3 per request (Facebook ignores larger page sizes logged out); zuck 20 posts + 3 comments each
  took 103 s.
- `followersCount` is exact when Facebook prints it in the page description (e.g. 121,435,697),
  otherwise rounded from "2.1M followers".

#### Example

```json
{"startUrls": ["https://www.facebook.com/zuck", "NASA", "katzsdeli"], "maxPosts": 5}
```

# Actor input Schema

## `startUrls` (type: `array`):

Profile/page URLs (www, m., profile.php?id=, /people/Name/123), usernames (zuck) or numeric ids (4), one per line.

## `maxPosts` (type: `integer`):

Also read this many recent public posts (newest first, 3 per request) into "posts".

## `onlyPostsNewerThan` (type: `string`):

Keep posts published on or after this date: 2026-09-01, a full ISO time, or a relative period such as "7 days", "2 weeks", "3 months", "1 year". Empty = no limit.

## `onlyPostsOlderThan` (type: `string`):

Keep posts published on or before this date (same formats). Empty = no limit.

## `postKeywords` (type: `array`):

Keep only posts whose text contains any of these words (one per line).

## `maxComments` (type: `integer`):

Also read up to this many public comments of every post and attach them as "comments". Each comment page is one extra request (about 10 comments per request).

## `commentsSort` (type: `string`):

Order of the comments Facebook returns.

## `maxRepliesPerComment` (type: `integer`):

Also read replies of each comment (nested under "replies").

## `minFollowers` (type: `integer`):

Skip profiles with fewer followers (0 = no filter).

## `maxFollowers` (type: `integer`):

Skip profiles with more followers (0 = no filter).

## `accountTypes` (type: `array`):

Keep only "profile" (people) and/or "page" (businesses, brands). Empty = both.

## `verifiedOnly` (type: `boolean`):

Skip profiles without the verified badge.

## `onlyWithContact` (type: `boolean`):

Skip profiles that publish no email, phone or website.

## `emailDomains` (type: `array`):

Keep only profiles whose public email is on one of these domains (gmail.com, company.com), one per line. Empty = no filter.

## `onlyChanged` (type: `boolean`):

Remember each profile (named key-value store "facebook-profile-scraper-state") and return it again only when a field changed; changed fields are listed.

## `checkAdsLibrary` (type: `boolean`):

For Pages: open the public Ad Library and add hasActiveAds (one extra request per Page).

## `includeTransparency` (type: `boolean`):

For Pages: read the Page transparency tab - creation date, "running ads" status, confirmed owner. One extra request of about 16 MB per Page.

## `outputPreset` (type: `string`):

Which fields each row keeps.

## `includeFailedRows` (type: `boolean`):

Also add a row (status + error) for inputs that cannot be read logged out. Off = they are only reported in the log.

## `maxPostPages` (type: `integer`):

Safety stop for the timeline (3 posts per page).

## `maxTotalItems` (type: `integer`):

Stops the whole run after this many dataset rows (all inputs together).

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

Facebook limits logged-out visitors per IP address. Residential proxies (the default) give the most reliable results; the Actor switches to a fresh IP when Facebook refuses one.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/NASA"
  ],
  "maxPosts": 0,
  "maxComments": 0,
  "commentsSort": "relevant",
  "maxRepliesPerComment": 0,
  "minFollowers": 0,
  "maxFollowers": 0,
  "verifiedOnly": false,
  "onlyWithContact": false,
  "onlyChanged": false,
  "checkAdsLibrary": false,
  "includeTransparency": false,
  "outputPreset": "full",
  "includeFailedRows": false,
  "maxPostPages": 400,
  "maxTotalItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "startUrls": [
        "https://www.facebook.com/zuck",
        "https://www.facebook.com/NASA"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/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 = {
    "startUrls": [
        "https://www.facebook.com/zuck",
        "https://www.facebook.com/NASA",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/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 '{
  "startUrls": [
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/NASA"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call neuro-scraper/facebook-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuro-scraper/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/botAIFdCFr4JzXlQc/builds/YbMWVQg1Sxy7rtlsJ/openapi.json
