# Facebook Profile Extractor (`kawsar/facebook-profile-extractor`) Actor

Facebook profile and Page data extractor that pulls names, photos, categories, likes, and bio text from a username or URL, so you get clean structured records instead of copying details by hand.

- **URL**: https://apify.com/kawsar/facebook-profile-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (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

from $2.99 / 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?

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 Profile Extractor

Extract public Facebook profile and Page data from a username or URL, no login required. Give it a handle like `zuck` or a full link like `facebook.com/nike`, and it returns the display name, profile photo, page category, verified status, likes and "talking about" counts, and bio text as clean, structured JSON.

Point it at business Pages, personal profiles, brand accounts, or a whole list of them, and get consistent, ready-to-export data back in seconds instead of opening each profile by hand.

### Why use this actor

Checking Facebook profiles one at a time doesn't scale. Whether you're building a prospect list, doing competitive research, or keeping an eye on how a brand's page is trending, copying names, photos, and follower counts by hand eats up time that should go toward the actual analysis.

This actor automates that step. Feed it a single URL or a batch of hundreds, and every result lands in the same dataset with the same fields, ready for a spreadsheet, a CRM import, or a downstream pipeline.

### What it extracts

| Field | Description |
|---|---|
| Display name | The profile or Page's public name |
| Profile photo | Direct URL to the current profile picture |
| Page category | Business category, for Pages only (e.g. "Sporting goods company") |
| Page ID | The numeric Facebook Page ID, when available |
| Likes count | Total Page likes |
| Talking about count | People currently engaging with the Page |
| Verified status | Whether the blue verification badge is present |
| Bio / intro text | The short description shown on the profile or Page |
| Access status | Whether the item was public, private/restricted, or failed to load |
| Canonical profile URL | The resolved facebook.com URL for the item |

Personal profiles and business Pages don't expose the same fields. A personal profile won't have a category or Page ID, for example, and this actor reflects that instead of forcing empty data into fields that don't apply.

### Who it's for

- **Marketers and growth teams** building lead lists from public Facebook Pages
- **Recruiters** checking a candidate's public presence before an interview
- **SEO and social media researchers** auditing competitor pages or tracking a brand's Facebook footprint over time
- **Agencies** running periodic checks across a portfolio of client or competitor Pages
- **Analysts** who need Facebook profile metadata in a spreadsheet without manual copy-pasting

### How to use it

1. Open the actor and paste a Facebook username or URL into **Facebook username or profile URL**, or add several into **Facebook usernames or URLs (batch)**.
2. Set **Max items** if you're running a large batch and want to cap how many get processed.
3. Click **Start** and watch results appear in the dataset as each item finishes.
4. Export the dataset to JSON, CSV, Excel, or push it straight to Google Sheets.

You can also run it through the Apify API or any of the official SDKs (Python, JavaScript) as part of a larger automation.

### Input

| Field | Type | Description |
|---|---|---|
| `usernameOrUrl` | string | A single Facebook username or profile/Page URL |
| `usernamesOrUrls` | array of strings | A list of usernames or URLs to process in one run |
| `maxItems` | integer | Maximum number of items to process per run (default 100, max 1000) |
| `requestTimeoutSecs` | integer | Per-request timeout in seconds (default 30) |

`usernameOrUrl` and `usernamesOrUrls` can be used together. Duplicates are removed automatically before the run starts.

#### Example input

```json
{
  "usernamesOrUrls": [
    "zuck",
    "https://www.facebook.com/nike",
    "facebook.com/coca-cola"
  ],
  "maxItems": 100
}
```

### Output

Each processed item is pushed to the dataset as one record. A public business Page looks like this:

```json
{
  "inputValue": "nike",
  "accessStatus": "public",
  "profileUrl": "https://www.facebook.com/nike",
  "profileName": "Nike",
  "pageId": "105430189038451",
  "pageCategory": "Sporting goods company",
  "profilePictureUrl": "https://scontent.fna.fbcdn.net/...",
  "likesCount": 34500000,
  "talkingAboutCount": 12000,
  "isVerified": true,
  "bioText": "Sport has the power to change the world.",
  "errorMessage": null,
  "scrapedAt": "2026-08-16T09:12:00.000Z"
}
```

A personal profile returns the same structure, with `pageId`, `pageCategory`, `likesCount`, and `talkingAboutCount` left as `null` since those fields don't exist on personal profiles.

Results export directly to CSV, Excel, JSON, XML, or Google Sheets from the Apify dataset view, or can be pulled via the Apify API for automated workflows.

### Access status values

Every record includes an `accessStatus` field so you can tell at a glance what happened with each item:

- `public` — the profile or Page loaded normally and data was extracted
- `private_or_restricted` — the profile exists but its content isn't publicly viewable
- `invalid_input` — the provided value couldn't be parsed as a username or URL
- `fetch_error` — a temporary network or access issue prevented the page from loading

A batch run always finishes and produces one record per input item, whatever the outcome, so nothing silently disappears from the results.

### Frequently asked questions

**Does this require a Facebook login or API key?**
No. It reads the same public information anyone can see by visiting the profile or Page while logged out.

**Can it extract data from private profiles?**
No. Private profiles and anything hidden behind a login wall stay inaccessible, and the actor reports that in `accessStatus` rather than returning partial or guessed data.

**What's the difference between a Page and a personal profile in the results?**
Pages carry business fields like category, Page ID, likes, and "talking about" count. Personal profiles typically only return a name, photo, bio, and URL.

**How many profiles can I process in one run?**
Up to 1000 per run via `maxItems`, though you can queue multiple runs for larger lists.

### Tips for best results

- Use full URLs (`facebook.com/username`) when a plain handle is ambiguous or contains dots and periods.
- Run large batches during off-peak hours for more consistent response times.
- Combine this actor with a scheduler to track how a Page's likes or category change week over week.
- Re-run the same list on a schedule and diff the results over time to catch rebrands, new categories, or sudden follower jumps.

### Performance and reliability

- Each item in a batch is processed independently. One failed or restricted profile never stops the rest of the run.
- Every input produces exactly one dataset record, whether it succeeded, was private, or failed, so batch counts always match.
- Typical processing time is a few seconds per profile, depending on Facebook's response time and the configured request timeout.
- Runs scale from a single lookup to a 1000-item batch without any change in setup.

### Data accuracy and limitations

- Only publicly visible profile and Page information is extracted. Nothing behind a login wall is accessed or guessed at.
- Facebook periodically changes its page markup. If a field stops appearing in results, it usually means Facebook changed how that data is rendered, not that the profile lacks it.
- Counts like likes and "talking about this" reflect what Facebook displays publicly at the time of the run and can lag slightly behind real-time numbers.
- This actor does not create fake engagement, bypass privacy settings, or access anything a logged-out visitor couldn't already see on facebook.com.

### Compliance

This actor only collects data that Facebook already serves to logged-out, public visitors. It does not attempt to access private profiles, groups, messages, or any content behind authentication. Use it in line with Facebook's terms of service and applicable data protection laws in your jurisdiction, especially if you plan to store or process personal data extracted from public profiles.

### Support and feedback

Found a field that stopped working, or want a new field added to the output? Open an issue on the actor's Apify page or reach out through Apify's support channel with a sample input and the run ID, and it'll get looked at.

# Actor input Schema

## `usernameOrUrl` (type: `string`):

A single Facebook username or full profile/Page URL, e.g. facebook.com/zuck or just zuck.

## `usernamesOrUrls` (type: `array`):

A list of Facebook usernames or profile/Page URLs to process in one run.

## `maxItems` (type: `integer`):

Maximum number of items to process per run.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "usernameOrUrl": "facebook.com/zuck",
  "usernamesOrUrls": [],
  "maxItems": 100,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `properties` (type: `string`):

Extract public Facebook profile and Page data (name, photo, category, likes, followers, verified status, bio) from a username or URL. Fast, structured JSON output for leads, monitoring, and SEO research.

# 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 = {
    "usernameOrUrl": "facebook.com/zuck"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/facebook-profile-extractor").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 = { "usernameOrUrl": "facebook.com/zuck" }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/facebook-profile-extractor").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 '{
  "usernameOrUrl": "facebook.com/zuck"
}' |
apify call kawsar/facebook-profile-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/xIwf33uzK5DKKUd3Z/builds/zC0arHnO5iBO8X3p8/openapi.json
