# Facebook Pages Directory Crawler (`alpha-scraper/facebook-pages-directory-crawler`) Actor

\[ 1k/1.49$ ] Facebook Pages Directory Crawler crawls the public Facebook Places directory by country and city and returns every Page found: URL, name, ID, category and rating, with crawl path and depth. Optional enrichment adds followers, address, phone, website and hours.

- **URL**: https://apify.com/alpha-scraper/facebook-pages-directory-crawler.md
- **Developed by:** [Alpha Scraper](https://apify.com/alpha-scraper) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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 Pages Directory Crawler

**Facebook Pages Directory Crawler** walks the public Facebook Places directory and returns the Facebook Pages it discovers for each country and city. Point Facebook Pages Directory Crawler at the directory root, a country page or a city page, and it returns every Page it finds with its URL, name, id, category and rating, plus the crawl path and depth that led to it.

Facebook Pages Directory Crawler works with publicly visible Facebook content only. You do not need a Facebook account, a login or an API key. Optional enrichment in Facebook Pages Directory Crawler adds followers, address, coordinates, phone, website and hours to each Page, so a directory crawl can become a ready-made list of local businesses.

> **📌 At a glance**
>
> - **Input:** the Facebook Places directory root, a country page or a city page
> - **Output:** one dataset record per discovered Facebook Page, with crawl path and depth
> - **Enrichment:** off, basic or full detail per Facebook Page, plus an optional deep mode
> - **Control:** `maxItems`, `maxCountries`, `citiesPerCountry` and `maxDepth` set the size of the crawl

Teams use Facebook Pages Directory Crawler for local business discovery, market mapping, lead list building and place research. A complete list of all Facebook Pages is not public without a login, so the crawler covers the curated Places directory.

### 🔹 Facebook Pages Directory Crawler – Key Features

Facebook Pages Directory Crawler focuses on discovery: turning the Places directory into structured Facebook Page data.

- **Three crawl levels:** the country list, the country pages with their highlighted Facebook Pages, and the city pages.
- **Flexible start points:** begin at the directory root, at one country page or at one city page.
- **Country filter:** list the countries you want, such as France or Japan, and skip the rest.
- **Curated place categories:** Facebook Pages come from tabs such as Eat, Drink, Cafe, Hotels, Museum, Nightlife, Outdoor, Shopping and Sightseeing.
- **Crawl path and depth:** every record shows where in the directory the Facebook Page was found.
- **Optional enrichment:** add the Facebook Page id, followers, likes and intro, or full contact and location details.
- **Deep mode:** with full enrichment, add the Facebook Page description, creation date, ad status and confirmed owner.
- **Event venues and nodes:** optionally return the venues of recommended events and the country and city entries themselves.

> **✅ Why use this Actor**
>
> Facebook Pages Directory Crawler replaces clicking through the Places directory by hand. Facebook Pages Directory Crawler opens countries and cities for you, stops at your limit and returns consistent fields you can export as JSON, CSV or Excel.

### 🔍 What Data Does Facebook Pages Directory Crawler Extract?

Each dataset item is a Facebook Page, a country or a city, marked by the `kind` field. The table groups the Page fields by purpose.

| Group | Fields | What you get |
|---|---|---|
| Identity | `kind`, `pageId`, `name`, `title`, `username`, `url`, `type`, `pageKind` | Ids, names and the address of the Facebook Page |
| Category | `category`, `categories`, `pageCategories`, `placeType`, `listing` | Facebook Page categories and the directory tab it was listed under |
| Rating | `rating`, `ratingScale`, `reviewsUrl`, `recommendPercent`, `reviewCount`, `ratingText` | Directory rating and review summary |
| Location | `city`, `cityId`, `cityUrl`, `country`, `countryId`, `address`, `latitude`, `longitude`, `serviceArea` | Where the Facebook Page sits |
| Crawl | `crawlDepth`, `crawlPath`, `directoryUrl`, `discoveredVia`, `number` | How the Facebook Page was discovered |
| Audience | `followers`, `likes`, `talkingAboutCount`, `wereHereCount`, `verified` | Public counters |
| Contact | `phone`, `email`, `website`, `websites`, `socialMedia`, `messenger` | Contact points from enrichment |
| Business | `hours`, `priceRange`, `services`, `intro` | Opening hours, price level and intro |
| Media | `profilePictureUrl`, `coverPhotoUrl` | Photo links shown in the directory |
| Deep | `about_me`, `creation_date`, `ad_status`, `confirmed_owner`, `transparencyPageId`, `details` | Description and transparency data in deep mode |
| Status | `enriched`, `enrichError`, `scrapedAt` | Enrichment result and collection time |

### 🚀 How to Use Facebook Pages Directory Crawler

Running Facebook Pages Directory Crawler takes a few steps in Apify Console.

- **Step 1 – Open the Actor:** start Facebook Pages Directory Crawler from the Apify Store and go to the Input tab.
- **Step 2 – Choose where to start:** keep the Places directory root in *Start URLs*, or paste a country or city page.
- **Step 3 – Size the crawl:** set *Max items*, *Max countries*, *Cities per country* and *Max depth*.
- **Step 4 – Pick the enrichment:** choose Off, Basic or Full, and switch on *Deep enrichment* only if you need it.
- **Step 5 – Run:** start Facebook Pages Directory Crawler and watch the dataset fill with Facebook Pages.
- **Step 6 – Export:** download the results as JSON, CSV or Excel, or read them through the Apify API.

> **💡 Tip:** the defaults crawl three countries and three cities per country, stop at 30 Pages and use Basic enrichment. That makes a good first test run for Facebook Pages Directory Crawler.

### 📥 Facebook Pages Directory Crawler Input

Facebook Pages Directory Crawler has twelve input fields. All of them are optional.

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Where to start: the directory root `https://www.facebook.com/places/`, a country page or a city page. Legacy `/directory/` URLs are skipped. Default is the directory root. |
| `countries` | array | Only crawl these countries by name, for example `France` or `Japan`. Case and accents are ignored. Applies to a root start URL. Empty means all countries up to `maxCountries`. |
| `includeEventVenues` | boolean | Also return the Facebook Page venues of events that a city page recommends. Default is `false`. |
| `emitDirectoryNodes` | boolean | Also return the country and city entries as records. `maxItems` counts Pages only. Default is `false`. |
| `enrich` | string | Detail per Facebook Page: `false` (directory data only), `ids` (Page id, followers, likes, intro) or `true` (also address, coordinates, phone, website, hours, reviews). Default is `ids`. |
| `deepEnrich` | boolean | Only with `enrich` set to `true`: add the description, creation date, ad status, confirmed owner and details. Default is `false`. |
| `maxCountries` | integer | How many countries to open from the root. Default is 3, minimum 1. |
| `citiesPerCountry` | integer | How many cities of each country to open, used when `maxDepth` is 3. Default is 3, minimum 1. |
| `maxDepth` | integer | `1` country list only, `2` also country pages, `3` also city pages. Default is 3, from 1 to 3. |
| `maxItems` | integer | Maximum number of Facebook Pages to discover, de-duplicated. Default is 30, minimum 1. |
| `workers` | integer | Parallel workers for enrichment, from 1 to 4. Default is 2. |
| `probeSurfaces` | boolean | Check whether the legacy directory pages are reachable and record the result in a crawl report. It does not change the Pages returned. Default is `true`. |

Higher enrichment levels visit more pages per Facebook Page, so they make Facebook Pages Directory Crawler slower. Facebook Pages Directory Crawler does not add the default directory root when you fill in `startUrls` yourself.

Here is a sample input for Facebook Pages Directory Crawler that crawls one country with full enrichment:

```json
{
  "startUrls": ["https://www.facebook.com/places/"],
  "countries": ["Canada"],
  "includeEventVenues": false,
  "emitDirectoryNodes": true,
  "enrich": "true",
  "deepEnrich": false,
  "maxCountries": 1,
  "citiesPerCountry": 2,
  "maxDepth": 3,
  "maxItems": 40,
  "workers": 2,
  "probeSurfaces": false
}
```

### 📤 Facebook Pages Directory Crawler Output

Facebook Pages Directory Crawler writes one record per Facebook Page to the default dataset. Fields without a value are returned as `null`. This is a Page record with full enrichment:

```json
{
  "kind": "page",
  "pageId": "100000000000002",
  "name": "Sample Coffee Roasters",
  "url": "https://www.facebook.com/samplecoffeeroasters",
  "username": "samplecoffeeroasters",
  "category": "Coffee shop",
  "categories": ["Coffee shop"],
  "placeType": "cafe",
  "rating": 4.8,
  "ratingScale": 5,
  "profilePictureUrl": "https://example.com/profile.jpg",
  "city": "Sampletown, Ontario",
  "cityId": "100000000000100",
  "country": "Canada",
  "listing": { "source": "city_tab_query", "tab": "cafe", "tabLabel": "Cafe", "position": 3 },
  "crawlDepth": 3,
  "crawlPath": ["Facebook Places directory", "Canada", "Sampletown, Ontario", "Cafe"],
  "directoryUrl": "https://www.facebook.com/places/Things-to-do-in-Sampletown-Ontario/100000000000100/",
  "discoveredVia": "city_tab_query",
  "scrapedAt": "2026-11-06T14:17:16.000Z",
  "pageKind": "business_page",
  "title": "Sample Coffee Roasters",
  "type": "page",
  "pageCategories": ["Coffee shop"],
  "verified": false,
  "followers": 4163,
  "talkingAboutCount": 12,
  "wereHereCount": 3322,
  "address": "12 Example Street, Sampletown, ON, Canada",
  "latitude": 43.6479,
  "longitude": -79.3883,
  "phone": "+1 555-010-0199",
  "email": "hello@example.com",
  "website": "example.com",
  "websites": ["https://example.com"],
  "hours": "Closed now",
  "priceRange": "Price Range · $$",
  "services": "Outdoor seating",
  "recommendPercent": 98,
  "reviewCount": 971,
  "intro": "Small-batch roasting and a cozy cafe in the city center.",
  "socialMedia": [{ "platform": "Instagram", "handle": "samplecoffeeroasters", "url": "https://www.instagram.com/samplecoffeeroasters" }],
  "messenger": "https://m.me/samplecoffeeroasters",
  "enriched": true,
  "number": 3
}
```

With `emitDirectoryNodes` on, country and city entries appear too:

```json
{
  "kind": "city",
  "name": "Sampletown, Ontario",
  "geoId": "100000000000100",
  "url": "https://www.facebook.com/places/Things-to-do-in-Sampletown-Ontario/100000000000100/",
  "crawlDepth": 2,
  "crawlPath": ["Facebook Places directory", "Canada", "Sampletown, Ontario"],
  "parentUrl": "https://www.facebook.com/places/Things-to-do-in-Canada/100000000000200/",
  "scrapedAt": "2026-11-06T14:14:17.000Z",
  "number": 2
}
```

#### 🧾 Output field guide

- `kind` is `page`, `country` or `city`, and `number` is the position in the dataset.
- `pageId`, `name`, `username` and `url` identify the Facebook Page.
- `placeType` and `listing` tell you which directory tab listed the Page, such as `cafe` or `hotels`.
- `crawlDepth` and `crawlPath` show the route from the directory root to the Facebook Page.
- `rating` is the directory rating out of `ratingScale`, and `reviewsUrl` links to the reviews.
- `followers`, `address`, `latitude`, `longitude`, `phone`, `website` and `hours` come from enrichment.
- `enriched` is `false` when enrichment is off or failed, and `enrichError` then explains why.
- Facebook Pages Directory Crawler also saves a short crawl report with the directory coverage next to the dataset.

### 🗺️ How to Crawl Facebook Pages by Country and City with Facebook Pages Directory Crawler

Set `countries` to the names you want, keep the root in `startUrls`, and raise `citiesPerCountry` to open more cities. Facebook Pages Directory Crawler takes cities round-robin across the countries, so every country gets coverage before any one country gets deep.

To focus on one place, paste a single city page into `startUrls`, and `maxItems` caps the result.

### 🎯 Facebook Pages Directory Crawler Use Cases

Facebook Pages Directory Crawler fits many discovery workflows.

- **Local business discovery:** build a starting list of restaurants, cafes, hotels and venues in chosen cities.
- **Market mapping:** see which kinds of places Facebook lists for a city, with ratings and categories.
- **Lead generation:** enrich discovered Facebook Pages with phone, website and email, then filter by city.
- **Tourism research:** collect hotels, museums, nightlife and sightseeing Facebook Pages by destination.
- **Competitor scouting:** find nearby businesses of one type and compare followers and ratings.

### 💰 Pricing

Facebook Pages Directory Crawler runs on the Apify platform. The current pricing is shown on the Actor page in the Apify Store, and your cost depends on the number of Pages and the resources used by the run.

> **💡 Cost tip:** set `maxItems` in Facebook Pages Directory Crawler to what you need and choose the lowest `enrich` level that works. Basic is lighter than Full, and `deepEnrich` is the heaviest. Set `probeSurfaces` to `false` to skip the extra checks.

### 💡 Tips and Best Practices

- **Start small:** run Facebook Pages Directory Crawler with `maxItems` at 20 or 30 to see the fields first.
- **Enrich only when needed:** the directory data that Facebook Pages Directory Crawler collects already has the name, id, category and rating.
- **Know the limit:** the Places directory is curated, so Facebook Pages Directory Crawler does not return every Facebook Page.
- **Expect public data only:** some Facebook Pages hide counters or contact details, and those fields stay `null`.
- **Schedule regular runs:** use Apify schedules to refresh a Facebook Page list.

> **⚠️ Important:** only collect data you are allowed to use. Facebook Pages can contain personal data such as emails and phone numbers, so follow Facebook's terms and the privacy rules that apply to you, such as GDPR. This Actor is not affiliated with or endorsed by Meta.

### ❓ Frequently Asked Questions

#### 🔎 What is Facebook Pages Directory Crawler?

Facebook Pages Directory Crawler is an Apify Actor that crawls the public Facebook Places directory by country and city and returns the Facebook Pages it discovers, with optional enrichment.

#### 🧭 How do I find Facebook Pages by city?

Paste a city page from the Places directory into *Start URLs*, set *Max items* and run Facebook Pages Directory Crawler. The Pages listed for that city appear in the dataset.

#### 📚 Can I get a list of all Facebook Pages?

No. Facebook does not offer a complete Page list without login. Facebook Pages Directory Crawler returns the curated Pages of the Places directory, which is a partial view.

#### 🔐 Does Facebook Pages Directory Crawler need a Facebook login?

No. Facebook Pages Directory Crawler reads publicly visible content, so no account, cookies or API key are required.

#### 📦 What data does Facebook Pages Directory Crawler return?

Each Facebook Page record has ids, name, URL, category, rating, city, country, crawl path and depth, and with enrichment followers, address, coordinates, phone, website and hours.

#### 🧪 What is the difference between Basic and Full enrichment?

In Facebook Pages Directory Crawler, Basic adds the Page id, followers, likes and intro. Full also adds address, coordinates, phone, website, email, hours and review data. Deep mode adds description and transparency data.

#### 🚫 Why were legacy directory URLs skipped?

Facebook blocks the old `/directory/` pages for logged-out visitors, so Facebook Pages Directory Crawler skips them and uses the Places directory instead.

#### 📊 Can I export the results to CSV or Excel?

Yes. Every Facebook Pages Directory Crawler dataset can be downloaded as JSON, CSV, Excel, XML or HTML, or read through the Apify API.

#### ⚖️ Is it legal to crawl the Facebook Places directory?

Facebook Pages Directory Crawler collects public Facebook content only. You are responsible for how you use the data, so check Facebook's terms, local laws and privacy rules before you store or share personal information.

### 📞 Support

If you have questions, ideas for new fields or find a city that does not return the expected Pages, send the start URL and the input you used with Facebook Pages Directory Crawler.

- Contact me by email: alphascraper69@gmail.com

# Actor input Schema

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

Where to start the crawl: the Places directory root (https://www.facebook.com/places/), a country page or a city page (https://www.facebook.com/places/Things-to-do-in-<name>/<id>/). Legacy /directory/ URLs are skipped because Facebook blocks them for logged-out visitors.

## `countries` (type: `array`):

Only crawl these countries, by name as listed in the Places directory (e.g. France, Japan; case and accents are ignored). Applies when a start URL is the directory root. Leave empty for all countries (up to 'Max countries').

## `includeEventVenues` (type: `boolean`):

Also return the Page venues of the events that a city page recommends.

## `emitDirectoryNodes` (type: `boolean`):

Also return the country and city entries themselves (kind = country or city) next to the Pages. 'Max items' counts Pages only.

## `enrich` (type: `string`):

How much detail to add for each discovered Page. 'Off' returns only what the directory lists. 'Basic' adds 1 request per Page (Page id, followers, likes, intro). 'Full' adds 2 requests per Page (also address, coordinates, phone, website, email, hours, reviews).

## `deepEnrich` (type: `boolean`):

Only with 'Enrichment' set to Full: 2 more requests per Page for the About description, creation date, ad status, confirmed owner and Page details.

## `maxCountries` (type: `integer`):

How many countries to open when crawling from the directory root.

## `citiesPerCountry` (type: `integer`):

How many cities of each country to open (taken round-robin across the countries). Used when 'Max depth' is 3.

## `maxDepth` (type: `integer`):

How deep to crawl: 1 = country list only (no Pages are returned unless 'Include country and city records' is on), 2 = also the country pages with their highlighted Pages, 3 = also the city pages.

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

Maximum number of Pages to discover (de-duplicated). Country and city records are not counted.

## `workers` (type: `integer`):

Number of parallel clients used for enrichment (1-4). Only used when 'Enrichment' is not Off.

## `probeSurfaces` (type: `boolean`):

Send a few plain requests to Facebook's legacy directory pages (/directory/pages/, /pages/category/, robots.txt sitemaps) to record whether they are reachable. This does not change the Pages returned; turn it off to save requests.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/places/110970792260960"
  ],
  "countries": [],
  "includeEventVenues": false,
  "emitDirectoryNodes": false,
  "enrich": "ids",
  "deepEnrich": false,
  "maxCountries": 3,
  "citiesPerCountry": 3,
  "maxDepth": 3,
  "maxItems": 15,
  "workers": 2,
  "probeSurfaces": true
}
```

# Actor output Schema

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

Structured records extracted by Facebook Pages Directory Crawler and stored in the run's default dataset.

# 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/places/110970792260960"
    ],
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("alpha-scraper/facebook-pages-directory-crawler").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/places/110970792260960"],
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("alpha-scraper/facebook-pages-directory-crawler").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/places/110970792260960"
  ],
  "maxItems": 15
}' |
apify call alpha-scraper/facebook-pages-directory-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alpha-scraper/facebook-pages-directory-crawler"
        }
    }
}
```

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/WEPo3TsItI8Ho3dOW/builds/MqjzlgI9hTDFEADoZ/openapi.json
