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

Extract Facebook events data including title, date, cover image, ticket info and more. Perfect for event aggregators, market research, and monitoring competitor events. Supports both public and private events with authentication.

- **URL**: https://apify.com/easyapi/facebook-events-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Stats:** 129 total users, 0 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $2.99 / 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.

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 🎯

Powerful scraper for extracting detailed information about Facebook events. Perfect for event organizers, marketers, and researchers who need to monitor and analyze Facebook events data.

### 🎯 Features

- Scrapes public Facebook events data
- Supports both online and offline events
- Customizable number of results

### 📊 Output Data

For each event, the scraper extracts:

- Event ID
- Title
- Cover image URL
- Date and time information
- Event URL
- Event type (online/offline)
- Social context (interested/going counts)
- Ticket price information (if available)
- Event status (past/upcoming)

### 🔧 Input Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `searchUrl` | String | Facebook events search URL with your desired filters |
| `maxItems` | Integer | Maximum number of events to scrape |

#### Input Example

A full explanation of an input example in JSON.

```
{
    "searchUrl": "https://www.facebook.com/events/search?q=ai&filters=eyJvbmxpbmVfZmlsdGVyOjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX29ubGluZVwiLFwiYXJnc1wiOlwiXCJ9In0%3D",
     "maxItems": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
	{
		"id": "1530100271044809",
		"cover_image": "https://scontent-ams2-1.xx.fbcdn.net/v/t39.30808-6/463975821_10161696721499754_1709609355278605286_n.jpg?stp=c31.0.338.225a_dst-jpg_p75x225&_nc_cat=100&ccb=1-7&_nc_sid=75d36f&_nc_ohc=YrTxg74zPJgQ7kNvgFwHHEo&_nc_zt=23&_nc_ht=scontent-ams2-1.xx&_nc_gid=A43ZvxJQQEKQDHoidxba-NM&oh=00_AYBhAXP-FWSsPZRpEIVQaOI7x9pvmVQVqZbJ9UxtL87WFg&oe=6728E445",
		"date": "Tue, Nov 12 at 2 AM CST",
		"start_time": "2024-11-12 02:00:00",
		"title": "AI Marketing Bootcamp",
		"eventUrl": "https://www.facebook.com/events/1530100271044809/",
		"eventKind": "PUBLIC_TYPE",
		"is_online": true,
		"is_past": false,
		"social_context": "1 interested · 4 going",
		"ticketPrice": null
	},
    ...
]
```

### Related Actors

- 🎯 [Facebook Posts Search Scraper](https://apify.com/easyapi/facebook-posts-search-scraper) - Extract posts from Facebook search results with detailed engagement metrics and content analysis.

- 📊 [Facebook Group Profile Scraper](https://apify.com/easyapi/facebook-group-profile-scraper) - Extract detailed information from Facebook Groups including stats, admins, and activity metrics.

- 📱 [Facebook Group Posts Scraper](https://apify.com/easyapi/facebook-group-posts-scraper) - Scrape posts from any public or private Facebook group with comprehensive data extraction.

- 🎥 [Facebook Videos Scraper](https://apify.com/easyapi/facebook-videos-scraper) - Extract video content data from Facebook Watch including creator information and engagement metrics.

- 🔍 [Facebook Hashtag Search Scraper](https://apify.com/easyapi/facebook-hashtag-search-scraper) - Scrape posts from any public Facebook hashtag search results with engagement metrics.

- 🎫 [Ticketmaster Events Scraper](https://apify.com/easyapi/ticketmaster-events-scraper) - Extract comprehensive event data including venues, dates, prices, and availability status.

- 🎫 [Ticketmaster Event Scraper](https://apify.com/easyapi/ticketmaster-event-scraper) - Scrape detailed event information with pricing, venues, and availability information.

- 🌐 [Meetup Events Scraper](https://apify.com/easyapi/meetup-events-scraper) - Extract event data from Meetup.com with comprehensive details and location information.

- 📊 [Facebook Group Members Scraper](https://apify.com/easyapi/facebook-group-members-scraper) - Extract member data including profile information and engagement metrics.

- 📧 [Facebook Email Scraper](https://apify.com/easyapi/facebook-email-scraper) - Find and extract email addresses from Facebook profiles and pages.

- 👥 [Facebook Following Scraper](https://apify.com/easyapi/facebook-following-scraper) - Extract following list data including profile details and relationship status.

- 👥 [Facebook Followers Scraper](https://apify.com/easyapi/facebook-follower-scraper) - Scrape followers data including profile details and friendship status.

- 🎮 [Facebook Gaming Search Scraper](https://apify.com/easyapi/facebook-gaming-search-scraper) - Extract game information from Facebook Gaming search results.

- 🎥 [Facebook Hashtag Videos Scraper](https://apify.com/easyapi/facebook-hashtag-videos-scraper) - Scrape videos from Facebook hashtag pages with comprehensive metadata.

- 👍 [Facebook Like Scraper](https://apify.com/easyapi/facebook-like-scraper) - Extract engagement data and user information from Facebook post likes.

# Actor input Schema

## `searchUrl` (type: `string`):

Facebook events search URL with filters

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

Maximum number of events to scrape

## Actor input object example

```json
{
  "searchUrl": "https://www.facebook.com/events/search?q=ai&filters=eyJvbmxpbmVfZmlsdGVyOjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX29ubGluZVwiLFwiYXJnc1wiOlwiXCJ9In0%3D",
  "maxItems": 20
}
```

# 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 = {
    "searchUrl": "https://www.facebook.com/events/search?q=ai&filters=eyJvbmxpbmVfZmlsdGVyOjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX29ubGluZVwiLFwiYXJnc1wiOlwiXCJ9In0%3D"
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/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 = { "searchUrl": "https://www.facebook.com/events/search?q=ai&filters=eyJvbmxpbmVfZmlsdGVyOjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX29ubGluZVwiLFwiYXJnc1wiOlwiXCJ9In0%3D" }

# Run the Actor and wait for it to finish
run = client.actor("easyapi/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 '{
  "searchUrl": "https://www.facebook.com/events/search?q=ai&filters=eyJvbmxpbmVfZmlsdGVyOjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX29ubGluZVwiLFwiYXJnc1wiOlwiXCJ9In0%3D"
}' |
apify call easyapi/facebook-events-scraper --silent --output-dataset

```

## MCP server setup

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