# Facebook Events Scraper: Search, Pages & Event Details (`shelfdata/facebook-events-scraper`) Actor

Public Facebook events by keyword or city search, or from event, explore and page URLs: name, start and end dates, venue and address, organizers, ticket link, description and response count. Watch mode returns only new events.

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

## Pricing

from $3.00 / 1,000 events

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 Events Scraper: Search, Pages & Event Details

Get **public Facebook events** by keyword and city search, or from event, events search, city explore and page URLs:
one row per event with the name, start and end dates (local wording and UTC), venue with address and coordinates,
organizers, ticket link, description, cover image, categories and the number of people who responded. Schedule it in
watch mode to receive only events you have not seen yet.

Built for event listing sites, local marketing and venue teams, promoters tracking competitors, and researchers who
collect what is happening in a city. Unofficial; not affiliated with Facebook or Meta.

### How to use

1. Type one or more **searches**, as you would in Facebook's event search: a topic (`Comedy`), a place (`New York`) or
   both (`Sport New York`). Or paste **Facebook URLs**: single events, events searches with the filters you picked,
   city explore pages, or a page's upcoming or past events.
2. Set **Max events** and run it. For a daily or weekly feed of new events, turn on **Only events not returned before**
   and schedule it.

| Input | Meaning |
|---|---|
| `searchQueries` | Searches such as `Sport New York`, `Jazz London`; each one returns the events Facebook lists first for it |
| `startUrls` | Event URLs (`https://www.facebook.com/events/1023978871819924`), events searches with filters (`https://www.facebook.com/events/search/?q=Comedy&filters=…`), city explore pages (`https://www.facebook.com/events/explore/fr-paris/110774245616525`), page listings (`https://www.facebook.com/NASA/upcoming_hosted_events`, `/past_hosted_events`) and public group events (`/groups/<group>/events`) |
| `maxEvents` | Cap on events returned in the run, over all searches and URLs; empty: no cap |
| `onlyNewEvents` | Watch mode: skip events already returned by an earlier run with the same monitor name |
| `monitorName` | Separate watch memories for different tasks, default `default` |
| `proxySource` | `owner` (default, Apify datacenter, included), `apify_residential` (your Apify Residential traffic) or `custom_pool` |
| `apifyProxyCountry` / `apifyProxySessions` / `customProxyUrls` | Residential country, number of proxy sessions, your own proxy URLs |

**Filters (date, place, category, online, paid):** set them in Facebook's event search in your browser and paste the
resulting search URL into `startUrls`; the filters are kept. Searches typed in `searchQueries` are then combined with
each such URL (`Comedy` + `Jazz London` searches `Comedy Jazz London` with the URL's filters).

An event found by several searches is returned (and charged) once. A recurring event is returned as its next listed
date: `id` is that date's ID and `url` points to it.

#### How "only events not returned before" works

The actor remembers, per search and URL, the IDs of the events it returned (in a key-value store named
`facebook-events-state` in your own account, one memory per monitor name) and skips them on later runs, so every event
reaches you, and is charged, once, and **Max events** counts new events only. The first run of a watch is its
baseline. The next date of a recurring event has its own ID, so it counts as new.

### Output example

One row per event (description shortened here):

```json
{
  "inputUrl": "https://www.facebook.com/events/search/?q=Comedy+Chicago",
  "url": "https://www.facebook.com/events/2680330252484296/?event_time_id=2680330259150962",
  "id": "2680330259150962",
  "name": "Comedy Royalty: A Chicago Comedy Showcase",
  "dateTimeSentence": "Wednesday, November 25, 2026 at 7:00 PM – 8:30 PM CST",
  "startTime": "Wed, Nov 25 at 7:00 PM CST",
  "isCanceled": false,
  "isOnline": false,
  "isPast": false,
  "duration": "1 hr 30 min",
  "utcStartDate": "2026-11-26T01:00:00.000Z",
  "utcEndDate": "2026-11-26T02:30:00.000Z",
  "description": "Organized by: The Lincoln Lodge — https://www.eventbrite.com/o/31159352271\n\nChicago Comedy’s heaviest hitters are taking the stage for one epic show- all headliners, all night, all laughs.\n\n…",
  "externalLinks": ["https://www.eventbrite.com/o/31159352271"],
  "eventFrequency": "CUSTOM",
  "hasChildEvents": true,
  "address": "2040 N Milwaukee Ave, Chicago, IL 60647-4002, United States",
  "location": {
    "id": "2222231248730923",
    "name": "The Lincoln Lodge, 2040 North Milwaukee Avenue, Chicago, IL 60647, US",
    "contextualName": "The Lincoln Lodge, 2040 North Milwaukee Avenue, Chicago, IL 60647, US",
    "placeType": "TEXT",
    "latitude": 41.91825,
    "longitude": -87.69017
  },
  "imageUrl": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.30808-6/910925875_1622308746602102_1709407839608504549_n.jpg?stp=dst-jpg_tt6&cstp=mx2000x1000&ctp=p960x960&_nc_cat=108&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=75d36f&_nc_ohc=uYEqZv0JVP8Q7kNvwEFzU3t&_nc_oc=AdraOd3fkT3eYvBWtKk60qPGZeLcOXouRxDsWdb87DLRXwULTQwWZ37qxfp4XLOMAQc&_nc_zt=23&_nc_ht=scontent-lax3-1.xx&_nc_gid=IGIdScsp4OHztG0A6lmX9Q&_nc_ss=7b289&oh=00_AQRDciQVjO2IsnnK7KG9dxM-rD2TLXdDQSu4cqOjnInU8A&oe=6AFEFEF7",
  "imageCaption": "May be an image of text",
  "organizators": [
    {"id": "100064689759444", "name": "Eventbrite", "url": "https://www.facebook.com/eventbrite", "isVerified": true}
  ],
  "organizedBy": "Event by Eventbrite",
  "privacyInfo": "PUBLIC",
  "eventType": "PUBLIC",
  "usersResponded": 0,
  "ticketsInfo": {"buyUrl": "https://www.eventbrite.com/e/1992721284003?aff=ebdnptmeta"},
  "discoveryCategories": [
    {"label": "Comedy", "uri": "https://www.facebook.com/events/search/?filters=eyJmaWx0ZXJfZXZlbnRzX2NhdGVnb3J5OjAiOiJ7XCJuYW1lXCI6XCJmaWx0ZXJfZXZlbnRzX2NhdGVnb3J5XCIsXCJhcmdzXCI6XCIyMTA0MTIxMTM5ODUwMTAwXCJ9In0%3D&q=Comedy"}
  ]
}
```

Fields Facebook does not show for an event are left out of its row (for example `utcEndDate` for events without an end
time, `ticketsInfo` without a ticket link). In our test runs (36 events from three searches, a page and a city explore
page) every row had the start date, venue and organizer; 21 had an end date, 29 a street address, 22 a ticket link and
33 a response count. The run's `OUTPUT` record summarises `success` and `total`, lists event URLs that could not be read
(`errors`) and notes per search, for example:

```json
{
  "kind": "partial",
  "message": "https://www.facebook.com/events/search/?q=jazz+London: 76 events read, then: Facebook refused the public events cursor (GraphQL rate limit 1675004); read 36 date slices over the next 8 weeks instead, 5 single days still listed more events than one page; later events are not read"
}
```

### Reliability

No browser: the actor reads Facebook's public event pages with plain HTTP requests, so runs are cheap and need little
memory, and the built-in datacenter proxy works. Each event is read from its own page, about one to two seconds per
event: in our tests 5 events took 10 to 25 seconds, and 89 to 183 events from three searches 4 to 8 minutes.

Facebook shows logged-out visitors only the first page of a search (about 7 events) and refuses to page further. The
actor therefore reads each search again **week by week over the next 8 weeks**, and a busy week day by day, so a search
returns many more events: in three runs on Apify "comedy Chicago" gave 40 to 99 events and "jazz London" 15 to 77
instead of 7 each. Counts vary between runs because Facebook lists fewer events to an exit that has read many pages,
and sends some exits to its login page: the actor spreads the slices over the proxy sessions (8 by default, fresh exits
for every run) and tries a page on up to three of them. The run's `OUTPUT` notes how many slices were read and any
that could not be. Events more than 8 weeks ahead are found only when they are among the first results; for those, add
a search with a date filter from your browser. A city explore page returns its first results only.
An event URL that does not exist, was removed or is not public is listed in `OUTPUT` as `not_found` while the other
searches and URLs are still read; a search or page without events gets a `no_events` note.

### Not supported

- **Going and interested counts** (`usersGoing`, `usersInterested`): logged-out visitors see only the total of people
  who responded (`usersResponded`).
- More than the first results of a city explore page, and of a search URL that already carries a date filter.
- A page's plain `/events` tab (needs a login): use its `upcoming_hosted_events` or `past_hosted_events` URL.
- Private events, and group events that Facebook shows only to members (most groups); such URLs are reported in
  `OUTPUT`.
- Facebook's special event types and flags (recordings, classes, audio rooms, paid online events).

### How much does it cost?

Pay per result: **$0.003 per event ($3 per 1,000 events)** plus $0.001 per run. An event is one dataset row; event URLs
that could not be read are free. The Apify platform usage is included, so there is nothing else to pay. That is less
than a quarter of the official Facebook Events Scraper (about $0.013 per event). Examples:

- 100 events from a handful of searches: about **$0.30**
- a daily watch of 10 city searches that returns about 20 new events a day: about **$1.83 a month**

Apify's free plan includes monthly credit that covers many runs of this size, so you can try it without a subscription.

### Run it from your code, a schedule or another tool

- **API**: start a run and get the events in one call:

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/shelfdata~facebook-events-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"searchQueries": ["Jazz London", "Comedy Chicago"], "maxEvents": 20}'
  ```

  The same works from the Apify Python and JavaScript clients.
- **Schedules**: run it daily or weekly from Apify Console > Schedules; with **Only events not returned before** each
  run returns only events you have not received yet.
- **Integrations**: send results to Google Sheets, Slack, email, Make, Zapier, n8n or a webhook from the actor's
  Integrations tab.
- **AI agents**: the actor is available as a tool through the Apify MCP server.

### FAQ

**How do I search events in a city on certain dates?**
Open Facebook's event search in your browser, pick the place and dates, and paste the URL from the address bar into
`startUrls`.

**Why does a search return only a few events?**
Facebook shows logged-out visitors only the first results of a search. Split broad searches into several specific ones
(`Comedy Chicago`, `Stand-up Chicago`, `Open mic Chicago`).

**Why does a recurring event have a different ID than its URL?**
A recurring event has one ID per date; the row is the next listed date, and `url` carries its `event_time_id`.

**Is it legal to scrape this data?**
The actor reads only what Facebook shows to any logged-out visitor, and no data behind a login. Event pages can name
organizers and venues; if you store personal data, handle it under the privacy rules that apply to you (such as the
GDPR).

**Something is missing or broken?**
Open an issue on the actor's Issues tab: requests and bug reports are answered there.

# Actor input Schema

## `searchQueries` (type: `array`):

Searches that discover events, as you would type them into Facebook's event search: a topic (`Comedy`), a place (`New York`) or both (`Sport New York`). Each search returns the events Facebook lists first for it. With events search URLs below, each search narrows those URLs and keeps their filters.

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

Facebook URLs: single events (`https://www.facebook.com/events/1023978871819924`), events searches copied from your browser with their filters (`https://www.facebook.com/events/search/?q=Comedy&filters=…`, keeps the date, place and category filters you picked), city explore pages (`https://www.facebook.com/events/explore/fr-paris/110774245616525`), a page's events (`https://www.facebook.com/NASA/upcoming_hosted_events` or `/past_hosted_events`) and public group events (`https://www.facebook.com/groups/<group>/events`). A page's plain `/events` tab needs a login and is not supported.

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

Maximum number of events returned in this run, over all searches and URLs (you pay per event). Empty: every event the searches and URLs list, until the run's spending limit.

## `onlyNewEvents` (type: `boolean`):

For scheduled runs: remembers per search and URL the events already returned (in a key-value store named `facebook-events-state` in your account) and skips them, so each run returns and charges only events you have not received yet. The first run is the baseline. A recurring event's next date counts as a new event.

## `monitorName` (type: `string`):

Keeps separate memories for different monitoring tasks that run the same searches.

## `proxySource` (type: `string`):

Built-in works for public Facebook events. Residential uses your own Apify Residential traffic.

## `apifyProxyCountry` (type: `string`):

Two-letter country for `My Apify Residential proxies`.

## `apifyProxySessions` (type: `integer`):

Sticky sessions (exits) to spread the searches, their date slices and the URLs over. Facebook lists fewer events to an exit that has read many pages, so more sessions keep long searches complete.

## `customProxyUrls` (type: `string`):

For `My custom proxy list`: one http(s)://user:password@host:port per line (semicolons or a JSON array also work).

## Actor input object example

```json
{
  "searchQueries": [
    "Sport New York"
  ],
  "maxEvents": 5,
  "onlyNewEvents": false,
  "monitorName": "default",
  "proxySource": "owner",
  "apifyProxyCountry": "US",
  "apifyProxySessions": 8
}
```

# Actor output Schema

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

Dataset rows: one per event, with dates, place, organizers, ticket link and description.

## `summary` (type: `string`):

OUTPUT record: success, total events, spending-limit stop, searches and URLs without events, and problems.

# 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 = {
    "searchQueries": [
        "Sport New York"
    ],
    "maxEvents": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shelfdata/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 = {
    "searchQueries": ["Sport New York"],
    "maxEvents": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shelfdata/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 '{
  "searchQueries": [
    "Sport New York"
  ],
  "maxEvents": 5
}' |
apify call shelfdata/facebook-events-scraper --silent --output-dataset

```

## MCP server setup

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