# Facebook Page & Profile Finder by Keyword or URL (`vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url`) Actor

Find Facebook Pages or public profiles by keyword, or scrape a list of Facebook URLs directly, and get back contact info, category, ratings, follower counts, reviews, and recent posts.

- **URL**: https://apify.com/vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (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 $0.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 Page & Profile Finder by Keyword or URL

Find Facebook Pages and public profiles by keyword, or read a list of Facebook URLs, IDs and handles. Each row can include the verified badge, category, phone, email, address, website, followers, ratings and reviews — plus optional Page Transparency and the latest visible post. No login, cookies or proxy setup.

### What this actor does

- **Two ways in:** search Facebook by keyword, or read Pages/profiles you already have via URLs, `profile.php?id=`, `/people/`, `/p/`, numeric IDs and `@handles`.
- **Pages, profiles or both:** one search can return Facebook Pages, public profiles, or a deduplicated mix of the two.
- **Deep, paginated results:** follow Facebook's own result pages up to your `maxResults` limit, instead of stopping at a handful of search-engine hits.
- **Enrichment on demand:** turn `fetchPageDetails` on for contact details, category, followers and ratings; add reviews, Page Transparency and the latest visible post when you need them.
- **Verified filtering:** keep only Pages/profiles Facebook marks as verified with `verifiedOnly`.
- Empty fields are omitted — the actor never fills a missing value with `null`, `0`, or a placeholder.

### Output per Page or profile

| Field | Description |
|---|---|
| `facebookUrl` / `pageUrl` | Normalized URL of the Page or profile. |
| `pageName` | Display name. |
| `pageId` / `facebookId` | Facebook identifier (numeric or `pfbid…` for some profiles). |
| `title` | Page title. |
| `verified` | `true`/`false` when Facebook exposes the badge. |
| `entityType` | `page` or `profile` when search identifies it. |
| `searchQuery` / `searchRank` | Keyword that found the row and its 1-based position (reset per UID slice). |
| `searchLocationUid` | The location UID slice that produced the row, when `locationUids` is used. |
| `category` / `categories` | Primary category and full list. |
| `intro` / `info` | Page introduction and up to 5 description lines. |
| `likes` | Likes count (exact when Facebook exposes it). |
| `followers` / `followings` | Follower and following counts (exact when `og:description` carries them, otherwise Facebook's rounded number). |
| `talkingAboutCount` / `checkins` | "Talking about this" and "were here" counts. |
| `phone` / `email` / `messenger` | Contact details when published. |
| `address` / `addressUrl` | Address text and a Google Maps link. |
| `website` / `websites` | Linked website(s). |
| `priceRange` | Price marker such as `££` or `$$`. |
| `business_hours` / `openNowStatus` | Published hours and the current open/closed label when shown. |
| `ratingOverall` / `ratingCount` / `ratingText` / `recommendPercentage` | Rating and recommendation data. |
| `ownerOrganization` | Organization Facebook discloses as responsible for the Page. |
| `profilePictureUrl` / `coverPhotoUrl` | Profile and cover image URLs (signed; ~5-day expiry unless `rehostImages` is on). |
| `profilePictureUrlOriginal` / `coverPhotoUrlOriginal` | Original signed URLs retained when rehosting. |
| `pageAdLibrary` | Link to the Page's Ad Library listing. |
| `pageCreatedDate` / `isRunningAds` / `pageTransparencyId` | Added by `addDetail`. |
| `reviews` | Up to 10 `{reviewerName, recommends, reviewText, reviewDate}` objects. |
| `posts` | Up to `maxPosts` recent posts: `post_text`, `post_timestamp`, `post_url`, `media_urls`, `reaction_count`, `comment_count`, `share_count`. |
| `instagram` / `instagramFollowers` / `instagramVerified` | Linked Instagram profile when the Ad Library index knows it. |
| `scrapedAt` | Collection timestamp (ISO 8601 UTC). |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | `search` (find by keyword) or `urls` (read URLs/IDs/handles). |
| `searchQueries` | string list | – | Keywords for `mode=search`; a Facebook search URL is accepted. |
| `searchType` | select | `pages` | `pages`, `people` or `all`. |
| `location` | string | – | City/country added to each keyword; relevance hint, not a strict filter. |
| `locationUids` | array | – | Numeric Facebook Place IDs. Runs one page search per UID, splits `maxResults` across them, dedupes by page ID and adds `searchLocationUid`; nearby results can appear. |
| `categoryFilter` | string | – | Case-insensitive category text filter (e.g. `dentist`); requires page details. |
| `startUrls` | URL list | – | Facebook Page/profile URLs for `mode=urls`. |
| `startIds` | ID/handle list | – | Numeric IDs or `@handles` for `mode=urls`; combine with `startUrls` when needed. |
| `maxResults` | integer | `50` | 1–5000 rows per query (or in total for `urls`). |
| `fetchPageDetails` | boolean | `true` | Add category, contacts, followers and ratings. Off = fast identity-only list. |
| `includeReviews` | boolean | `true` | Add up to 10 published reviews per Page. |
| `addDetail` | boolean | `false` | Add Page creation date, ad status and Transparency ID. |
| `includePosts` | boolean | `false` | Add up to `maxPosts` recent timeline posts. |
| `maxPosts` | integer | `5` | 1–20; only used with `includePosts`. |
| `verifiedOnly` | boolean | `false` | Keep only verified results. |
| `rehostImages` | boolean | `false` | Copy profile/cover images to Apify storage; signed Facebook CDN links expire in about five days. |

#### Example: search Pages and profiles

```json
{
  "mode": "search",
  "searchQueries": ["coffee shop", "dentist Berlin"],
  "searchType": "all",
  "maxResults": 100,
  "fetchPageDetails": true,
  "includeReviews": true
}
```

#### Example: read a list of URLs, IDs and handles

```json
{
  "mode": "urls",
  "startUrls": [
    { "url": "https://www.facebook.com/McDonalds" },
    { "url": "https://www.facebook.com/profile.php?id=100064458773195" }
  ],
  "startIds": ["100064458773195", "@Starbucks"],
  "includePosts": true,
  "maxPosts": 1
}
```

#### Example: verified-only identity list

```json
{
  "mode": "search",
  "searchQueries": ["nike", "starbucks"],
  "searchType": "pages",
  "maxResults": 50,
  "fetchPageDetails": false,
  "verifiedOnly": true
}
```

### Limits

- `maxResults` is a ceiling. A single keyword query has its own finite index; add keywords, or use `locationUids` to partition a pages search across several Place IDs and merge the slices.
- Facebook does not expose a server-side category filter to logged-out search. `categoryFilter` filters the enriched rows locally and requires `fetchPageDetails`.
- Profile follower counts are returned only when Facebook shows them publicly; hidden/zero counts are omitted rather than guessed.
- Exact likes in URL mode are filled when the page matches Meta's Ad Library typeahead; otherwise Facebook does not expose the count and it is omitted.
- Facebook image URLs are signed and expire after about five days. Turn on `rehostImages` for durable profile/cover images; the original URLs are kept in `profilePictureUrlOriginal` and `coverPhotoUrlOriginal`.
- `locationUids` partitions page searches by Facebook Place IDs; each row records its slice in `searchLocationUid`. Results can include nearby businesses, not only a strict city boundary.

### Use cases

- **Lead generation** — find local businesses by keyword and collect the phone, email, address and website they publish.
- **Brand research** — compare Pages in a category by followers, rating and verified status.
- **Competitor discovery** — find every Page and public profile active around a keyword.
- **Bulk enrichment** — feed a CRM export of URLs or numeric IDs and add contact and engagement data.
- **Reputation monitoring** — pull published reviews and the latest post for a set of Pages.

### FAQ

**Do I need a Facebook account or cookies?** No. The actor reads only what Facebook serves to logged-out visitors. There is no login, cookie or API-key field.

**What is the difference between `pages` and `people`?** `pages` returns business/brand/organization Pages; `people` returns public personal profiles; `all` returns both and removes duplicates.

**Why are some fields missing?** The Page owner did not publish that information, or Facebook does not show it to logged-out visitors. The actor omits missing fields instead of guessing.

**Does the output include verified badges?** Yes. `verified` is filled when Facebook shows the badge. Use `verifiedOnly` to keep only verified results.

**Why do image URLs stop working after a few days?** Facebook serves signed CDN links that expire. Turn on `rehostImages` to copy profile and cover images into Apify storage; the originals remain in `profilePictureUrlOriginal` and `coverPhotoUrlOriginal`.

**Can I filter by category?** Set `categoryFilter` to a word from the category, such as `dentist`, `restaurant` or `clinic`. It filters the enriched rows after page details are read; with `fetchPageDetails` off, rows without a category are dropped.

**Can I filter by city?** Add a city or country to `location` or include it in the keyword (e.g. "dentist Berlin"). Facebook search is relevance-ranked, so this is a hint, not a strict filter. For Facebook’s Place filter on Pages, set `locationUids` to numeric Place IDs from `facebook.com/places/<id>/` URLs. Multiple UIDs partition the search; nearby businesses can still appear.

**How many reviews and posts can I get?** Up to 10 published reviews per Page and up to `maxPosts` recent timeline posts. Facebook does not expose the full review history or an unlimited timeline without a login.

**Can I use `profile.php?id=`, numeric IDs or handles?** Yes. `startUrls` accepts full URLs, `profile.php?id=…`, `/people/…` and `/p/…`; `startIds` accepts numeric IDs and `@handles`.

**Is this affiliated with Facebook or Meta?** No. This is an independent tool and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc.

# Actor input Schema

## `mode` (type: `string`):

Choose whether to discover Pages/profiles by keyword or read the Facebook URLs you already have.

## `searchQueries` (type: `array`):

Keywords to search on Facebook (mode=search), e.g. 'coffee shop', 'dentist Berlin'. A pasted facebook.com/search/pages/?q=... URL is accepted too. Either this or startUrls is required.

## `searchType` (type: `string`):

Search for Pages, public profiles, or both. Applies to mode=search.

## `location` (type: `string`):

A city or country added to every keyword, e.g. 'Berlin' or 'Kansas City, Missouri'. Facebook search is relevance-ranked, so this narrows results toward that place; it is not a strict geographic filter.

## `locationUids` (type: `array`):

Optional numeric Facebook Place IDs, one page search per UID, e.g. 108591349161413 from facebook.com/places/<id>/. maxResults is distributed across the UIDs and duplicate pages are removed. Results can include nearby businesses; this is not a strict city boundary.

## `categoryFilter` (type: `string`):

Optional case-insensitive text filter on a page's category, e.g. 'dentist' or 'restaurant'. Applied after page details are read; leave empty for all categories.

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

Direct Facebook Page or profile URLs to read (mode=urls), e.g. https://www.facebook.com/McDonalds, https://www.facebook.com/profile.php?id=..., /people/... or /p/.... Either startUrls, startIds or searchQueries is required.

## `startIds` (type: `array`):

Numeric Facebook IDs or @handles to read (mode=urls), e.g. 100064458773195 or @McDonalds. Combine with startUrls if you have both. Either startUrls, startIds or searchQueries is required.

## `maxResults` (type: `integer`):

Upper bound on rows per search query (mode=search) or in total (mode=urls). Facebook may return fewer when the index is exhausted. Deep searches use extra networking automatically.

## `fetchPageDetails` (type: `boolean`):

Open each result to add category, contact details, follower counts, ratings and reviews links. Turn off for a fast identity-only list of names, URLs, IDs and verification badges.

## `includeReviews` (type: `boolean`):

Fetch up to 10 real reviews per page when Facebook publishes them. Adds one request per result.

## `addDetail` (type: `boolean`):

Add creation date, whether the Page is currently running ads, and its public Page Transparency ID. Adds one request per result.

## `includePosts` (type: `boolean`):

Add up to maxPosts recent posts from the Page/profile timeline (text, timestamp, permalink, media and engagement when visible).

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

Maximum recent posts to keep per result when includePosts is on. Facebook may serve fewer when the timeline is empty or restricted.

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

Keep only results Facebook marks as verified. Unverified or unknown results are dropped.

## `rehostImages` (type: `boolean`):

Copy profile and cover images into Apify storage so their URLs stay valid, instead of returning Facebook's signed CDN links (which expire after about five days). Adds one download per image.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "McDonald's"
  ],
  "searchType": "pages",
  "maxResults": 1,
  "fetchPageDetails": true,
  "includeReviews": true,
  "addDetail": false,
  "includePosts": false,
  "maxPosts": 3,
  "verifiedOnly": false,
  "rehostImages": false
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with extracted Facebook Page and profile records

# 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 = {
    "mode": "search",
    "searchQueries": [
        "McDonald's"
    ],
    "searchType": "pages",
    "maxResults": 1,
    "fetchPageDetails": false,
    "includeReviews": false,
    "addDetail": false,
    "includePosts": false,
    "maxPosts": 3,
    "verifiedOnly": false,
    "rehostImages": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url").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 = {
    "mode": "search",
    "searchQueries": ["McDonald's"],
    "searchType": "pages",
    "maxResults": 1,
    "fetchPageDetails": False,
    "includeReviews": False,
    "addDetail": False,
    "includePosts": False,
    "maxPosts": 3,
    "verifiedOnly": False,
    "rehostImages": False,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url").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 '{
  "mode": "search",
  "searchQueries": [
    "McDonald'\''s"
  ],
  "searchType": "pages",
  "maxResults": 1,
  "fetchPageDetails": false,
  "includeReviews": false,
  "addDetail": false,
  "includePosts": false,
  "maxPosts": 3,
  "verifiedOnly": false,
  "rehostImages": false
}' |
apify call vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/facebook-page-and-profile-finder-by-keyword-or-url"
        }
    }
}
```

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/CJq13RwjCKKPE9rcc/builds/QgeIPeYymvYKKgS13/openapi.json
