# Facebook Events Scraper (`w3crawler/facebook-events-scraper`) Actor

Extract event data available in public Facebook HTML without cookies or authentication. The Actor fails closed at access controls and emits diagnostics for unavailable pages.

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

## Pricing

from $2.99 / 1,000 events

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Events Scraper

Facebook Events Scraper reads public Facebook event detail pages and user-supplied public event listing or search pages. It normalizes event identity, dates, locations, organizers, hosts, media, offers, ratings, public counts, links, and source evidence into dataset records.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/facebook-events-scraper) and select **Try for free** or open the **Input** tab.
2. Set `eventUrls` and `maxEvents` for the data you need.
3. Keep the default limits for the first run.
4. Start the Actor, open the dataset, and export the saved records as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to check the outcome and counts.

### Input

Fields marked Required must be supplied. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `eventUrls` | string array | Required | Not supplied | Credential-free HTTPS Facebook event detail URLs or public event listing/search URLs. Bare numeric event IDs are also accepted. Search URLs must be supplied by the user; the Actor does not infer a private search endpoint. 1–100 items. |
| `maxEvents` | integer | Optional | `50` | Maximum number of unique event records to discover across the supplied pages. 1–200. |
| `maxPages` | integer | Optional | `1` | Maximum number of pages per listing/search URL, including the supplied page. Pagination URLs are followed only when the public HTML exposes a next link. 1–20. |
| `followPagination` | boolean | Optional | `true` | Follow rel=next or visible next links found in public HTML, subject to maxPages. |
| `includeDetails` | boolean | Optional | `true` | Fetch discovered public event detail pages for descriptions, locations, hosts, offers, status, and related links. |
| `includeMedia` | boolean | Optional | `true` | Include public image URLs found in JSON-LD, metadata, or embedded structured data. |
| `includeRatings` | boolean | Optional | `true` | Include aggregate ratings and review summaries only when exposed in public structured data. |
| `includeStructuredData` | boolean | Optional | `false` | Include a bounded copy of public JSON-LD objects for auditability. Embedded event-like data is normalized into regular fields. |
| `filters` | object | Optional | Not supplied | Optional local filters applied after public fields are extracted. |
| `maxConcurrency` | integer | Optional | `2` | Maximum number of public page requests in flight at once. 1–5. |
| `minDelayMs` | integer | Optional | `500` | Minimum delay between public request starts. The Actor clamps this value to 0–10000 ms. |
| `maxRetries` | integer | Optional | `2` | Retries only bounded transient HTTP statuses (408, 425, 500, 502, and 504). CAPTCHA, login, rate-limit, WAF, and access-denied responses are not retried. 0–5. |
| `timeoutMs` | integer | Optional | `45000` | Timeout for each public page request, from 5000 to 120000 ms. |
| `maxBytes` | integer | Optional | `5000000` | Maximum HTML response size accepted for one public page. 100000–5000000. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional standard Apify Proxy routing. Start without a proxy and use datacenter or residential routing only when public access evidence justifies it. |

The `filters` object supports four optional local filters applied after extraction:

- `filters.text` — case-insensitive text match against event name, description, location name, and categories, up to 200 characters.
- `filters.category` — case-insensitive category match, up to 100 characters.
- `filters.dateFrom` — ISO date/time lower bound for `startDate`.
- `filters.dateTo` — ISO date/time upper bound for `startDate`.

Example input:

```json
{
  "eventUrls": [
    "https://www.facebook.com/events/2461461307713324/"
  ],
  "maxEvents": 50,
  "maxPages": 1,
  "followPagination": true,
  "includeDetails": true,
  "includeMedia": true,
  "includeRatings": true,
  "includeStructuredData": false,
  "maxConcurrency": 2,
  "minDelayMs": 500,
  "maxRetries": 2,
  "timeoutMs": 45000,
  "maxBytes": 5000000
}
```

The Actor reads public Facebook event pages with credential-free HTTP requests and a bounded browser fallback. Optional `proxyConfiguration` uses the standard Apify Proxy settings; start without a proxy unless public access evidence justifies routing.

### Output

The dataset contains one row per normalized event with core public source evidence. The schema declares no required fields; optional information appears only when the public page or structured data publishes it, and missing values are omitted rather than inferred. No diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | When a row is saved | Dataset row discriminator for a source-backed public event; always `facebook-event`. |
| `targetType` | string enum | When a row is saved | Entity or target represented by the row; always `facebook-event`. |
| `id` | string | When a public event ID is resolved | Stable public event identifier used as the record ID. |
| `source` | string | When a row is saved | Public source label for the event page. |
| `sourceUrl` | string | When a row is saved | Supplied public Facebook URL that led to this event record. |
| `discoveredFrom` | string | When a detail link is discovered | Public page URL from which a detail or event link was discovered. |
| `eventUrl` | string | When published | Public event permalink when available. |
| `url` | string | When a row is saved | Canonical public event URL used as the row URL. |
| `canonicalUrl` | string | When published | Public canonical URL from metadata or the event page. |
| `eventId` | string | When published | Public numeric event identifier when exposed. |
| `name` | string | When published | Public event name. |
| `description` | string | When published | Public event description when requested and exposed. |
| `startDate` | string | When published | Public event start date/time. |
| `endDate` | string | When published | Public event end date/time. |
| `location` | object | When published | First normalized public event location. |
| `locations` | object array | When published | Normalized public event locations, bounded to 10. |
| `locationName` | string | When published | First public location name. |
| `locationAddress` | string | When published | First public location address. |
| `locationCity` | string | When published | First public location city. |
| `locationRegion` | string | When published | First public location region. |
| `locationCountry` | string | When published | First public location country. |
| `latitude` | number | When published | First public location latitude. |
| `longitude` | number | When published | First public location longitude. |
| `isOnline` | boolean | When published | Whether the public event is online or virtual. |
| `organizers` | object array | When published | Public organizers, bounded to 20. |
| `hosts` | object array | When published | Public hosts and performers, bounded to 20. |
| `organizerName` | string | When published | First public organizer name. |
| `organizerUrl` | string | When published | First public organizer URL. |
| `images` | string array | When published | Public event image URLs. |
| `imageUrl` | string | When published | First public event image URL. |
| `imageUrls` | string array | When published | Public event image URLs, bounded to 20. |
| `offers` | object array | When published | Public ticket or offer data, bounded to 20. |
| `ticketUrl` | string | When published | Public ticket or registration URL. |
| `categories` | string array | When published | Public event categories, bounded to 20. |
| `eventStatus` | string | When published | Public business event status. |
| `attendanceMode` | string | When published | Public event attendance mode. |
| `attendeeCount` | number | When published | Public attendee/going count when exposed. |
| `interestedCount` | number | When published | Public interested count when exposed. |
| `usersResponded` | number | When published | Public response count when exposed. |
| `rating` | object | When published | Public aggregate rating evidence. |
| `ratingValue` | number | When published | Public rating score. |
| `ratingCount` | number | When published | Public rating count. |
| `reviewCount` | number | When published | Public review count. |
| `reviews` | object array | When published | Bounded public review summaries when exposed. |
| `links` | object array | When published | Bounded public links observed on the source page. |
| `publicStructuredData` | object | array | string | number | boolean | When published | Bounded public JSON-LD objects when requested; application state is not included. |
| `pageType` | string | When published | Source page classification: detail or listing_or_search. |
| `pageTitle` | string | When published | Public source page title. |
| `htmlLength` | integer | When published | Number of HTML characters accepted for parsing. |
| `httpStatus` | integer | When published | HTTP status observed for the public source page. |
| `finalUrl` | string | When published | Final public URL after bounded same-site redirects. |
| `sourceType` | string | When published | Evidence source label such as json-ld, embedded-json, metadata, or event-link. |
| `accessStatus` | string | When published | Public response status for normal event rows. |
| `sourceTransport` | string enum | When published | Transport used to obtain a normal event row. Allowed values: "http", "browser". |
| `proxyUsed` | boolean | When published | Whether a configured Apify Proxy URL was used for the request. |
| `dataAvailable` | boolean | When published | True when the event record has core public source evidence. |
| `pageNumber` | integer | When published | Bounded public pagination page number. |
| `scrapedAt` | string | When a row is saved | UTC time when the event row was normalized. |

No current-schema event rows are stored in the Actor's default local dataset, so the example is an empty array rather than an invented event record:

```json
[]
```

`location` is an object and `locations`, `organizers`, `hosts`, `offers`, `reviews`, `links`, and `images` are arrays when present. `location` can contain `name`, `url`, `address`, `streetAddress`, `addressLocality`, `addressRegion`, `postalCode`, `addressCountry`, `latitude`, `longitude`, and `isOnline`. Rows are written only for events with core public source evidence; blocked or unavailable pages stay in the run summary.

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT`.

| Field | Meaning |
| --- | --- |
| `recordType` | Summary discriminator; always `facebook-events-run-summary`. |
| `id` | Run-summary identifier derived from the requested event targets. |
| `runAt` | Time the run summary was produced, in ISO UTC. |
| `status` | Actor process outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | Completeness of the saved events: `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `itemCount` | Event rows saved to the dataset. |
| `eventCount` | Unique events discovered or normalized during the run. |
| `diagnosticItems` | Diagnostic dataset rows; always zero because diagnostics stay in the summary and logs. |
| `diagnosticCount` | Operational issues recorded for the run. |
| `failureStage` | Stage where a fatal failure occurred: `input_validation`, `source_access`, `parsing`, `storage`, or `runtime`. |
| `errorCode` | Machine-readable error code when the run failed. |
| `error` | Human-readable failure message, bounded to 500 characters. |
| `diagnostics` | Up to 10 bounded diagnostic messages for unavailable or skipped pages. |
| `datasetWriteFailures` | Event records that could not be written to the dataset. |
| `pagesRequested` | Public listing, search, or detail pages requested. |
| `pagesSucceeded` | Pages fetched and parsed successfully. |
| `pagesFailed` | Pages that could not be fetched or parsed. |
| `pagesBlocked` | Pages that returned an access boundary instead of usable content. |
| `filteredCount` | Extracted events removed by the local `filters` object. |
| `dataAvailable` | Whether at least one event row with core public evidence was saved. |
| `stoppedOnAccessBoundary` | Whether the run stopped after a CAPTCHA, login, WAF, or other access boundary. |
| `requestedUrlCount` | Number of input URLs supplied. |
| `proxyRequested` | Whether an Apify Proxy configuration was supplied. |
| `proxyUsed` | Whether an Apify Proxy connection was used. |
| `transportCounts` | Counts of rows obtained by HTTP and browser transports. |
| `accessStatus` | Final public-access classification for the run. |
| `httpStatus` | HTTP status associated with the final source response. |
| `scrapedAt` | Time the summary was written, in ISO UTC. |

No current-schema `OUTPUT` snapshot is stored in the Actor's default key-value store, so the summary table is shown without a value example.

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Eligible events were saved without an extraction problem. |
| `SUCCEEDED` | `PARTIAL` | Some events were saved, but a later page or extraction failed. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | The supplied pages were processed cleanly but no matching public events were found. |
| `FAILED` | `FAILED` | A fatal error occurred before any usable event was saved. |

### Coverage and limitations

The Actor reads public data from Facebook. It does not log in, use cookies or credentials, call private Graph/API endpoints, solve CAPTCHAs, bypass WAF or rate limits, or fabricate event fields. You control supplied pages, maximum events, pagination, detail requests, filters, pacing, response size, and optional standard Apify Proxy routing. Optional fields are omitted when the source does not publish them; values are not inferred. Source availability can change, and blocked, empty, or partial responses are reported in the run summary rather than written as data rows. Optional Apify Proxy settings are supported when supplied.

### Usage and support

Apify charges according to the compute, storage, and optional proxy resources used by your account and plan; this Actor does not set a fixed price per event. Start with small item and page limits, inspect the dataset and run summary, then scale gradually. See the Actor's Pricing tab for current account rates. Use the [Actor Issues page](https://apify.com/w3crawler/facebook-events-scraper/issues) to report a problem. Include the run ID, the input used, and the run summary; do not include tokens, cookies, or private data. This independent Actor is not affiliated with, endorsed by, or sponsored by Facebook. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/facebook-events-scraper/changelog.md

# Actor input Schema

## `eventUrls` (type: `array`):

Credential-free HTTPS Facebook event detail URLs or public event listing/search URLs. Bare numeric event IDs are also accepted. Search URLs must be supplied by the user; the Actor does not infer a private search endpoint.

## `maxEvents` (type: `integer`):

Maximum number of unique event records to discover across the supplied pages.

## `maxPages` (type: `integer`):

Maximum number of pages per listing/search URL, including the supplied page. Pagination URLs are followed only when the public HTML exposes a next link.

## `followPagination` (type: `boolean`):

Follow rel=next or visible next links found in public HTML, subject to maxPages.

## `includeDetails` (type: `boolean`):

Fetch discovered public event detail pages for descriptions, locations, hosts, offers, status, and related links.

## `includeMedia` (type: `boolean`):

Include public image URLs found in JSON-LD, metadata, or embedded structured data.

## `includeRatings` (type: `boolean`):

Include aggregate ratings and review summaries only when exposed in public structured data.

## `includeStructuredData` (type: `boolean`):

Include a bounded copy of public JSON-LD objects for auditability. Embedded event-like data is normalized into regular fields.

## `filters` (type: `object`):

Optional local filters applied after public fields are extracted.

## `maxConcurrency` (type: `integer`):

Maximum number of public page requests in flight at once.

## `minDelayMs` (type: `integer`):

Minimum delay between public request starts. The Actor clamps this value to 0–10000 ms.

## `maxRetries` (type: `integer`):

Retries only bounded transient HTTP statuses (408, 425, 500, 502, and 504). CAPTCHA, login, rate-limit, WAF, and access-denied responses are not retried.

## `timeoutMs` (type: `integer`):

Timeout for each public page request, clamped to 5000–120000 ms.

## `maxBytes` (type: `integer`):

Maximum HTML response size accepted for one public page.

## `proxyConfiguration` (type: `object`):

Optional standard Apify Proxy routing. Start without a proxy and use datacenter or residential routing only when public access evidence justifies it.

## Actor input object example

```json
{
  "eventUrls": [
    "https://www.facebook.com/events/2461461307713324/"
  ],
  "maxEvents": 50,
  "maxPages": 1,
  "followPagination": true,
  "includeDetails": true,
  "includeMedia": true,
  "includeRatings": true,
  "includeStructuredData": false,
  "maxConcurrency": 2,
  "minDelayMs": 500,
  "maxRetries": 2,
  "timeoutMs": 45000,
  "maxBytes": 5000000
}
```

# Actor output Schema

## `events` (type: `string`):

Dataset containing normalized source-backed public event records.

## `runSummary` (type: `string`):

Key-value-store record containing final run/data status, saved-event counts, failure stages, and bounded diagnostic samples.

## `dataset` (type: `string`):

Dataset items produced by the Actor.

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

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

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

```

## MCP server setup

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