# Facebook ID Finder (`neuro-scraper/facebook-id-finder`) Actor

Facebook ID Finder SD - Facebook ID Finder is a social media data tool that converts any Facebook URL (page, profile, post, video, reel, photo, event, group, share link) into its numeric id, type, canonical URL and name, read from the page itself, no login.

- **URL**: https://apify.com/neuro-scraper/facebook-id-finder.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Social media, Developer tools
- **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 ID Finder - any Facebook URL to its numeric id

Facebook ID Finder converts any Facebook link into its numeric id, its type, the canonical URL and a
name, read from the page Facebook itself serves - no login, no guessing from the URL. It works for
pages, profiles, `profile.php?id=` links, posts (including `pfbid` links and `permalink.php`), group
posts, videos, reels, photos, events, groups (vanity names too), hashtags and `/share/` short links.
Optional rich metadata (followers, category, verified badge, website, email, phone ...) costs no extra
request, and an optional Meta Ad Library check tells whether a page runs ads. Export JSON, CSV or
Excel, or call it from the Apify API, Make, Zapier or n8n.

#### How it works

Every Facebook page carries its route definition: the entity type and the property that holds the
entity id (`entityKeyConfig`), plus the route parameters. The Actor reads that for each URL. Post
story ids are decoded into owner id + post id; Pages also give the classic page id (the id the Ad
Library and Graph tools use). Short links are followed to their target first.

#### Input

| Field | What it does |
|---|---|
| `startUrls` | Any Facebook URLs, one per line (www, m., fb.com, fb.watch, /share/ links) |
| `extractMetadata` | Add name, category, followers, likes, verified, websites, contacts, pictures (default on) |
| `checkAdsLibrary` | For pages: open the public Ad Library and add `hasActiveAds` (one extra request) |
| `includeFailedRows` | Also output rows for URLs without an id (dead links, private content) |
| `maxTotalItems`, `proxyConfiguration` | Total limit and proxy (RESIDENTIAL by default) |

#### Output (one row per URL)

`inputUrl`, `status` (ok / not_found / invalid / error), `entityType` (page, profile, group, post,
group_post, video, reel, photo, event, hashtag), `facebookId`, `name`, `username`, `pageId`,
`ownerId`, `ownerName`, `ownerUsername`, `groupId`, `albumId`, `storyId`, `postId`, `resolvedUrl`,
`canonicalUrl`, `routeName`, `extractionMethod`, and with metadata: `category`, `isVerified`,
`followersCount`, `followingCount`, `likesCount`, `websites`, `email`, `phone`, `address`, `bio`,
`profilePictureUrl`, `coverPhotoUrl`, `privacy`, `membersText`, `membersCount`, `publishedAt`,
`durationSec`, `thumbnailUrl`; with the ad check: `hasActiveAds`, `adLibraryUrl`.

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

- 14 URL types in 35 s including one Ad Library check; about 1 request per URL (pages are 0.5-2.7 MB).
- Ordinary personal profiles that are not public answer "This content isn't available at the moment"
  logged out - status `not_found`. Expired `fb.watch` links open the generic Watch page - `not_found`.
- `/search/...` URLs answer HTTP 404 logged out.

#### Example

```json
{"startUrls": ["https://www.facebook.com/NASA", "https://www.facebook.com/share/v/1HDNKQAZTN/",
 "https://www.facebook.com/groups/uscitizenshipwithugo/"], "checkAdsLibrary": true}
```

# Actor input Schema

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

Any facebook.com / m.facebook.com / fb.com / fb.watch URL: pages, profiles, profile.php?id=, posts (incl. pfbid links), videos, reels, photos, events, groups, hashtags, /share/ links. One per line.

## `extractMetadata` (type: `boolean`):

Also return name, category, followers, likes, verified badge, website, email, phone, address and pictures (same request - no extra cost).

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

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

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

Also add a row (status + error) for URLs that have no id: dead links, removed or private content, non-Facebook URLs. Off = they are only reported in the log.

## `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/NASA",
    "https://www.facebook.com/zuck",
    "https://www.facebook.com/groups/359370103235663/",
    "https://www.facebook.com/reel/1549207066583030"
  ],
  "extractMetadata": true,
  "checkAdsLibrary": false,
  "includeFailedRows": false,
  "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/NASA",
        "https://www.facebook.com/zuck",
        "https://www.facebook.com/groups/359370103235663/",
        "https://www.facebook.com/reel/1549207066583030"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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

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/UqqKxGvBLPPCSdsAb/builds/5O3pxokIaN5vPX69o/openapi.json
