# Facebook Event Scraper (`pratikdani/facebook-event-scraper`) Actor

The Facebook Event Scraper Actor is a sophisticated web scraping tool designed to extract detailed event information from Facebook Event URLs. It automatically collects and structures comprehensive event data, making it ideal for event aggregation, analysis, and integration into other applications.

- **URL**: https://apify.com/pratikdani/facebook-event-scraper.md
- **Developed by:** [Pratik Dani](https://apify.com/pratikdani) (community)
- **Categories:** Automation, Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 83 total users, 3 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Event Scraper

### Overview

The Facebook Event Scraper Actor is a sophisticated web scraping tool designed to extract detailed event information from Facebook Event URLs. It automatically collects and structures comprehensive event data, making it ideal for event aggregation, analysis, and integration into other applications.
Interested in using this scraper? Get it here: [Facebook Event Scraper](https://apify.com/pratikdani/facebook-event-scraper).

### Features

- Automated extraction of complete event details from Facebook event pages
- Rich metadata collection including event descriptions, images, and timing
- Location and venue information capture
- Host and organizer details retrieval
- Related events discovery
- Ticket information extraction when available
- Social engagement metrics collection
- Support for public events
- Structured JSON output format

### Output Fields

| Field Name | Type | Description |
|------------|------|-------------|
| event_id | String | Unique Facebook identifier for the event |
| url | String | Direct URL to the Facebook event page |
| main_image | String | URL of the event's featured image |
| event_date | ISO DateTime | Event start date and time |
| title | String | Event name/title |
| people_responded | Number | Count of people who have responded to the event |
| event_by | Array\[Object] | List of event organizers with their names and Facebook profiles |
| location | Object | Venue information including physical address and optional map URL |
| access_level | Array\[String] | Event privacy settings (e.g., "PUBLIC_TYPE") |
| description | Object | Full event description including text content, hashtags, and embedded links |
| hashtags | Array\[Object] | Event categories and tags with associated URLs |
| hosts | Array\[Object] | Detailed information about event hosts including verification status |
| suggested_events | Array\[Object] | Similar or related events with basic details |
| tickets | Object | Ticketing details including pricing and provider information |
| duration | Object | Event duration specifications |

### Real World Applications

#### Event Discovery Platforms

- Build comprehensive event listing websites or apps
- Create local event discovery services
- Power event recommendation engines
- Develop specialized event aggregators for specific industries or interests

#### Business Intelligence

- Track competitor event activities
- Monitor venue utilization and programming
- Analyze market trends in event pricing and attendance
- Generate reports on event engagement metrics

#### Marketing and Promotion

- Automate event marketing campaigns
- Create targeted event newsletters
- Build social media content calendars
- Track event performance metrics

#### Research and Analytics

- Study event attendance patterns
- Analyze seasonal event trends
- Research pricing strategies across different event types
- Track geographic distribution of events

#### Tourism and City Planning

- Map cultural and entertainment activities
- Support tourism information systems
- Aid in urban planning and event infrastructure
- Monitor event density in different areas

### Example Output

```json
[
  {
    "event_id": "1719548522169091",
    "url": "https://www.facebook.com/events/1719548522169091/",
    "main_image": "https://www.facebook.com/photo/?fbid=556638803425107&set=gm.1719548678835742",
    "event_date": "2024-10-27T23:00:00.000Z",
    "title": "POC POC  Party",
    "people_responded": 4,
    "event_by": [
      {
        "name": "Heaven - London",
        "url": "https://www.facebook.com/heavenlondon"
      }
    ],
    "location": {
      "address": "Under The Arches, Villiers Street, WC2N6 London, United Kingdom",
      "url": null
    },
    "access_level": [
      "PUBLIC_TYPE"
    ],
    "description": {
      "hashtags": {
        "url": "https://www.facebook.com/events/discovery/?suggestion_token=%7B%22event_categories%22%3A%5B1821948261404481%5D%7D",
        "value": "Music"
      },
      "links": [
        "https://www.facebook.com/events/discovery/?suggestion_token=%7B%22event_categories%22%3A%5B1821948261404481%5D%7D",
        "https://www.facebook.com/events/explore/uk-london/106078429431815/"
      ],
      "text": "💣 NEW BAILE FUNK ERA ARRIVED IN LONDON 🥵ARE YOU READY FOR YOUR PRE-HALLOWEEN LONDON? 🎃 NON-STOP UNTIL 4 AM.27th of October, Vem no Poc Poc 🇧🇷 We want to see you dancing the whole night, our dancers and LIVE shows will be 🔛stage, and you will be part of the best Sunday night 🏳️‍🌈Brazilian Funk, Electronic and POP music come together in one 🪩 🥳 Anitta, Pedro Sampaio, David Guetta, Luisa Sonza, Pitbull, Pabllo Vittar, Lady Gaga, J Balvin, Gloria Groove... and many other great artists and EDM hits ‼️Reserve your virtual wristband now 🎟️ 2£ Entry fee payable on door 🚪Line-up:🎧 DJ Bolado (@bolado021_)🎧 DJ Carollyna (@carollyna_dj)More to be confirmed.📸 Instagram: @pocpocpartyIMPORTANT INFORMATION 🚀Date: 27th October 2024, SundayTime: 11PM-04AMAge Policy: +18 (Photo IDs strictly Required)Venue: Heaven Night Club, Under The Arches, Villiers Street, London, WC2N 6NG"
    },
    "hashtags": [
      {
        "url": "https://www.facebook.com/events/discovery/?suggestion_token=%7B%22event_categories%22%3A%5B1821948261404481%5D%7D",
        "value": "Music"
      },
      {
        "url": "https://www.facebook.com/events/explore/uk-london/106078429431815/",
        "value": "London"
      }
    ],
    "hosts": [
      {
        "name": "Heaven - London",
        "url": "https://www.facebook.com/heavenlondon",
        "verified": false
      }
    ],
    "suggested_events": [
      {
        "date": "2025-01-23T18:00:00.000Z",
        "location": "5.11 Tactical (Paramus)",
        "name": "5.11 Paramus Warehouse Sale - Up To 80% Off ",
        "people_interested": "950",
        "url": "https://www.facebook.com/events/8567404543369371/"
      },
      {
        "date": "2025-01-20T17:00:00.000Z",
        "location": "1221 York Ave, New York NY 10065",
        "name": "Cousins Maine Lobster at New York-Memorial Sloan Kettering Cancer Center",
        "people_interested": "89",
        "url": "https://www.facebook.com/events/2017558105380545/"
      },
      {
        "date": "2025-01-20T19:00:00.000Z",
        "location": "8 Highland Cross ",
        "name": "Santillo's Brick Oven Pizza Pop-Up",
        "people_interested": "82",
        "url": "https://www.facebook.com/events/960844699315202/"
      }
    ],
    "tickets": {
      "currency": null,
      "max_price": null,
      "min_price": null,
      "provider": null,
      "url": null
    },
    "duration": {
      "time": null,
      "time_units": null
    }
  }
]
```

# Actor input Schema

## `url` (type: `string`):

URL of the Facebook Event

## Actor input object example

```json
{
  "url": "https://www.facebook.com/events/1035943471401287?active_tab=about"
}
```

# 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 = {
    "url": "https://www.facebook.com/events/1035943471401287?active_tab=about"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pratikdani/facebook-event-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 = { "url": "https://www.facebook.com/events/1035943471401287?active_tab=about" }

# Run the Actor and wait for it to finish
run = client.actor("pratikdani/facebook-event-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 '{
  "url": "https://www.facebook.com/events/1035943471401287?active_tab=about"
}' |
apify call pratikdani/facebook-event-scraper --silent --output-dataset

```

## MCP server setup

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