# Facebook Events Scraper | Public Event Search (`muhammadafzal/facebook-events-scraper`) Actor

Find public Facebook events by keyword, event URL, Page, or city. Export event names, dates, venues, hosts, public counts, and links where available.

- **URL**: https://apify.com/muhammadafzal/facebook-events-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 public events

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

Collect public Facebook events by keyword, event URL, public Facebook Page URL, or city Events URL. Each result has a stable event ID, name, URL, displayed time, venue, public counts, and other fields when the source provides them. Set **Fetch event details** for descriptions and richer venue, host, and ticket fields.

All modes use the Actor owner's configured ScrapeCreators API key. Specific event URLs always use the event-details endpoint. The Fetch event details option enriches events found by keyword, Page, or city listings. The Actor does not log in, collect attendee identities, or access private events. Facebook may change or restrict public data, so some fields can be null. A zero-result or blocked run is explained in the `SUMMARY` key-value record.

### Input examples

Keyword search:

```json
{"searchTerms":["music festival"],"maxResults":20,"maxPagesPerSource":2}
```

Specific event:

```json
{"searchTerms":[],"eventUrls":["https://www.facebook.com/events/2155772935343838/"],"includeDetails":true,"maxResults":1}
```

Public Page events:

```json
{"searchTerms":[],"pageUrls":["https://www.facebook.com/brickyardoldtown/"],"maxResults":10}
```

City events:

```json
{"searchTerms":[],"cityUrls":["https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547/"],"cityTime":"this_week","maxResults":10}
```

Combine modes in one run. Duplicate event IDs are written once. `maxPagesPerSource` and `maxProviderRequests` cap provider work. Verified Apify free-plan runs deliver at most five events; upgrade to use higher result limits. A missing provider key blocks listing modes with a clear `SUMMARY` diagnostic.

### Pricing

Pay per event charges one automatic start event and one automatic dataset-item event for each delivered public event. No result event is charged for empty or blocked results. The Actor owner pays platform usage; it is not passed through to users. The prices below include a conservative allowance for provider requests and ordinary Apify usage. Requesting full details increases provider calls but does not add another user event.

| Event | FREE | BRONZE | SILVER | GOLD |
| --- | ---: | ---: | ---: | ---: |
| Actor start | $0.006250 | $0.006094 | $0.005938 | $0.005000 |
| Public event | $0.005000 | $0.004875 | $0.004750 | $0.004000 |

BRONZE, SILVER, and GOLD result prices are 2.5%, 5%, and 20% below FREE. One result costs $0.01125 on FREE; five cost $0.03125; twenty cost $0.10625, assuming one start event at the run's memory setting. Live prices must be checked in Apify before relying on this table.

PLATINUM and DIAMOND use the GOLD prices. The Actor limits work before provider calls to the number of results that the remaining event-charge budget can cover.

### Limitations

- The source exposes public events only. Search results and counts can vary with Facebook availability and provider coverage.
- `startTime`, `endTime`, location, tickets, and attendance counts can be null if the public source omits them.
- This is event discovery, not a guaranteed complete Facebook Events index.
- The Actor stores event details, not attendee lists or personal profiles.

### Owner configuration

Store `SCRAPECREATORS_API_KEY` as a private Actor environment variable. Do not place it in input, Tasks, source files, or logs. Keep the Actor and example Tasks private until the owner reviews the branding and publishes them.

# Actor input Schema

## `searchTerms` (type: `array`):

Public event names or topics to search. Each term may use multiple pages, subject to the request and result limits.

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

Specific public Facebook event URLs. Each URL is retrieved through the ScrapeCreators event-details endpoint.

## `pageUrls` (type: `array`):

Facebook Page URLs whose public events you want to list.

## `cityUrls` (type: `array`):

Facebook Events explore URLs for cities, for example https://www.facebook.com/events/explore/saint-petersburg-florida/111326725552547/.

## `cityTime` (type: `string`):

Optional time filter used for city Events URLs.

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

Fetch each discovered event's full description and available location, host, ticket, and attendance fields. Costs an extra provider request per event.

## `maxResults` (type: `integer`):

Maximum unique events delivered. Verified free-plan runs are capped at 5.

## `maxPagesPerSource` (type: `integer`):

Limits pagination and provider spending for each listing source.

## `maxProviderRequests` (type: `integer`):

Hard limit on paid provider requests per run, including detail requests.

## Actor input object example

```json
{
  "searchTerms": [
    "music festival"
  ],
  "cityTime": "all",
  "includeDetails": false,
  "maxResults": 20,
  "maxPagesPerSource": 2,
  "maxProviderRequests": 30
}
```

# Actor output Schema

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

No description

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

No description

# 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 = {
    "searchTerms": [
        "music festival"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/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 = { "searchTerms": ["music festival"] }

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

```

## MCP server setup

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