# Facebook Pages Scraper: Posts & Upcoming Events (`tidyharvest/facebook-pages-scraper`) Actor

Upcoming events (date, venue, address, ticket link, description, hosts) and the latest post from any public Facebook page, logged out with no account. $2.00 per 1,000 events, $1.00 per 1,000 posts.

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper: Posts & Upcoming Events

Get the **upcoming events** and the **latest post** of any public Facebook page: venues, promoters, city governments, museums, clubs, brands. Each event comes with **date and time, venue, street address, ticket link, description and hosts**. Each post comes with text, time, permalink, images and any linked events. No login, no account, no cookies: it reads what Facebook shows a logged-out visitor, so it is fast and cheap.

### What you can do with it

- **Build a local events calendar** from the venues and organisers in your city.
- **Watch competitors or partners:** schedule it daily and get each page's new post.
- **Collect event leads** with ticket links and hosts.

### Input

| Field | What it does |
|---|---|
| `pages` | Public page links or handles, one per line. |
| `includeEvents`, `maxEventsPerPage` | Upcoming events per page (Facebook shows logged-out visitors about the next 8-10). |
| `includePosts`, `postsNewerThanDays` | The newest post per page, optionally only if it is recent. |
| `useApifyProxy` | Datacenter proxy, on by default. |
| `maxItems` | Hard cap on results (and cost). |

Example:

```json
{ "pages": ["https://www.facebook.com/LiveNation", "AytoCancun"], "maxEventsPerPage": 10, "postsNewerThanDays": 2 }
```

### Output

Events (`"type": "event"`):

```json
{ "type": "event", "eventId": "2123507778561861", "name": "Flow Sousa", "startTime": "2026-10-17T02:00:00Z",
  "dateText": "Friday, October 16, 2026 at 10:00 PM EDT", "placeName": "Mémoire Boston", "street": "1 Broadway", "city": "Everett, MA",
  "ticketUrl": "https://...", "description": "...", "hosts": ["Live Nation"], "url": "https://www.facebook.com/events/2123507778561861/" }
```

Posts (`"type": "post"`):

```json
{ "type": "post", "pageName": "Live Nation Concerts", "time": "2026-10-15T16:31:12Z", "text": "50 years of U2...",
  "url": "https://www.facebook.com/...", "imageUrls": ["https://scontent..."], "externalLinks": [], "eventIds": [] }
```

### Pricing

- **$2.00 per 1,000 events** (`event-scraped`).
- **$1.00 per 1,000 posts** (`post-scraped`).
- $0.00005 per run start. Caps apply before you are charged.

### Limits and notes

- Logged-out Facebook shows **one post per page** (the newest) and about the next 8-10 events. Run on a schedule to follow pages over time.
- Public pages only. Personal profiles, groups and **age- or country-restricted pages** (common for bars, nightclubs and alcohol brands) are not readable logged out; they are listed as `login-only` in the run's SUMMARY (a page that does not exist looks the same to a logged-out visitor) and you are not charged for them. A dropped connection is retried on a fresh IP.
- Facebook sometimes answers a public page with its login wall, depending on the IP. The actor waits and retries that page once on a fresh IP (and once on a residential IP if `residentialRetry` is on), then skips it. Pages that stay walled are listed as `login-wall` in the run's SUMMARY; you are not charged for them.
- Pay-per-event charges count toward your run's **max total charge** limit. Set it to cover the posts and events you expect (for 100 pages, $0.50 is plenty).
- Facebook's terms restrict automated collection. You are responsible for how you use the data. Not affiliated with Meta.

# Actor input Schema

## `pages` (type: `array`):

Public Facebook page links or handles, one per line: `https://www.facebook.com/LiveNation`, `AytoCancun`. Business, venue, government and organisation pages; not personal profiles or groups.

## `includeEvents` (type: `boolean`):

Each page's upcoming events with date and time, venue, address, ticket link, description and hosts.

## `maxEventsPerPage` (type: `integer`):

Facebook shows logged-out visitors about the next 8-10 events per page.

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

The page's newest post: text, time, link, images, outside links and any linked event ids. Run daily to follow a page.

## `postsNewerThanDays` (type: `integer`):

Skip the latest post if it is older than this. Empty = always return it.

## `useApifyProxy` (type: `boolean`):

Route requests through Apify datacenter proxy (recommended).

## `residentialRetry` (type: `boolean`):

When Facebook answers a page with its login wall twice on datacenter IPs, try that page once more on an Apify residential IP (residential traffic is billed per GB on your Apify plan, about 0.2 MB per page).

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

Hard cap on posts + events for the whole run (also caps your cost). 0 or empty = no limit.

## Actor input object example

```json
{
  "pages": [
    "https://www.facebook.com/LiveNation"
  ],
  "includeEvents": true,
  "maxEventsPerPage": 10,
  "includePosts": true,
  "useApifyProxy": true,
  "residentialRetry": false
}
```

# Actor output Schema

## `posts` (type: `string`):

One item per post.

# 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 = {
    "pages": [
        "https://www.facebook.com/LiveNation"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidyharvest/facebook-pages-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 = { "pages": ["https://www.facebook.com/LiveNation"] }

# Run the Actor and wait for it to finish
run = client.actor("tidyharvest/facebook-pages-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 '{
  "pages": [
    "https://www.facebook.com/LiveNation"
  ]
}' |
apify call tidyharvest/facebook-pages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidyharvest/facebook-pages-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/xck0cQts6XujlmzxO/builds/7UfzgsSQUQXMB8TP0/openapi.json
