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

Scrape public Facebook events with no login or cookies. Get dates, places, coordinates, going and interested counts, tickets, organizers and descriptions from searches, page or group lists and event links. Bulk input, date filters. Export JSON, CSV or Excel for event discovery.

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

## Pricing

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

### What is Facebook Event Scraper?

**Facebook Event Scraper** extracts public Facebook events from search queries, search and explore links, page and group event lists, or single event links. Enter queries or links, choose how many events you want, and get dates, places, going and interested counts, tickets and organizers as JSON, CSV or Excel, with no login or cookies. Use it for event discovery, event lead generation and competitor event monitoring. Pricing is pay per event: **$5.00 per 1,000 events on the Free plan, down to $3.50 on the Gold plan**.

Just enter a search such as "Sport New York" or paste an events link, then click Start. No coding needed. Try it on the [Facebook Event Scraper page](https://apify.com/data_minds/facebook-event-scraper).

- 🎯 **Event discovery:** find upcoming events by topic, city or date range and build local events data for guides, newsletters and apps.
- 📣 **Event lead generation:** collect event organizers and their links to reach promoters, venues and hosts in your niche.
- 🔎 **Competitor event monitoring:** follow the upcoming and past events lists of rival pages and groups on a schedule.
- 🏢 **Venue research:** group events by place and city to see which venues host the most events.
- 📊 **Event trend analysis and market research:** compare going and interested counts across categories, cities and weeks.
- 📚 **Event aggregator and calendar feeds:** feed an event listing website or event calendar with fresh public events.

Because it runs on Apify, you also get full event details through the API, schedule runs, send results to other apps and export to JSON, CSV, Excel, XML or HTML.

#### What can Facebook Event Scraper do?

- 🔎 **Search Facebook events** by topic, place or both, for example "Music Berlin"
- 🔗 **Scrape Facebook events by link:** event, search, explore, page and group event links, in bulk
- 📅 **Filter by date and category:** this weekend, next 7 days, a single date or a period
- 🎫 **Collect attendance and tickets:** going, interested, ticket link, price and provider
- 🎤 **Export Facebook event organizers** into their own table
- ⚡ **See results live:** each event appears in the Output table as soon as it is ready

***

### What data can Facebook Event Scraper extract?

Each event is one row in the main table. The table below lists every field of that row. Only public event data is returned.

| Fields | What they hold |
|---|---|
| 🔖 `inputUrl`, `url`, `id`, `name`, `mobileUrl` | The query or link that produced the event, the event link, event id, title and a mobile link |
| 📸 `imageUrl`, `imageCaption` | Cover image link and its accessibility caption |
| 🕒 `dateTimeSentence`, `utcStartDate`, `startTime`, `endTime`, `timezone` | Date and time as Facebook shows it, start and end in UTC (ISO 8601), a short start label and the time zone |
| ⏳ `duration`, `durationMinutes`, `isPast`, `isCanceled`, `isHappeningNow` | Duration text and minutes, plus flags for past, canceled and running events |
| 🔁 `eventFrequency`, `hasChildEvents`, `childEventsCount`, `childEvents` | One-off or recurring events and the other occurrences of a series |
| 📍 `address`, `location`, `latitude`, `longitude`, `cityPage` | One-line address, place details (id, name, type, coordinates, country code, street, city), and the city page |
| 🌐 `isOnline`, `onlineEventType` | Whether the event is online and what kind of online event it is |
| 👥 `usersGoing`, `usersInterested`, `usersResponded`, `usersInterestedIsApproximate` | Going, interested and responded counts, and whether the interested count is rounded |
| 🎫 `ticketsInfo`, `paidContent` | Ticket link, price, title, subtitle and provider, and whether a non-free price is shown |
| 🎤 `organizedBy`, `organizators`, `hosts`, `lineup` | Organizer name, organizers and hosts with links and verified flags, and the performers or speakers listed |
| 📝 `description`, `externalLinks`, `hashtags`, `discoveryCategories`, `categories` | Full description, links and hashtags found in it, and the category labels |
| 🔒 `eventType`, `privacyInfo` | Audience type of the event and its privacy label |
| 🧩 `hasRecordingAvailable`, `isClassEvent`, `isLiveAudioRoom`, `isRemoteLearningClass`, `isRemoteLearningCourse`, `isSaleEvent`, `groupEventPinnedToFeatured` | Flags for event formats, sale events and group events pinned as featured |
| 🔄 `nameChanged`, `dateChanged` | Whether the name or the date was edited |
| 🔗 `relatedEvents`, `parentEventId` | Events Facebook suggests next to this one, and the series id you asked for when a link pointed to a recurring series |
| 📥 `sourceType`, `sourceRank`, `scrapedAt` | Input type (search, explore, page, group or event), position within its input and collection time in UTC |

> **Note:** A field is empty or null when Facebook does not show it for an event. `groupEventPinnedToFeatured` is only filled for group event lists. `parentEventId` is only filled when a link pointed to a recurring series.

Three more tables are saved next to the events: organizers (one row per host of each event), related events (one row per suggested event) and inputs (one row per search query or link, with its status and event count).

#### What data can't Facebook Event Scraper extract?

- Private events, events that need a login, and attendee names or profiles.
- Deleted or age-restricted events. These inputs are listed as failed or empty in the inputs table.
- Every event of a very large page or group. Page and group lists return the first events shown; use search queries to find more.

For page details such as followers and contact data, try [Facebook Pages Scraper](https://apify.com/data_minds/facebook-pages-scraper).

***

### How to scrape Facebook events

This Actor is designed for an easy start, even if you have never extracted data from the web before.

1. [Create a free Apify account](https://console.apify.com/sign-up) with your email.
2. Open [Facebook Event Scraper](https://apify.com/data_minds/facebook-event-scraper).
3. Add one or more search terms to `searchQueries`, or paste event, search, explore, page or group links into `urls`.
4. Set `maxEvents` to the number of events you want, and optionally pick a `dateRange` or `category`.
5. Click **Start** and watch events appear in the Output tab while the run is going.
6. Download your data in JSON, CSV, Excel, XML or HTML.

***

### How much does it cost to scrape Facebook events?

The Actor uses a **pay-per-event** pricing model: you pay for each event saved to the main table, plus a small start event. Platform usage is billed in addition. The more you use Apify, the lower the price per event.

| Apify plan | Price per event | Price per 1,000 events |
|---|---|---|
| Free | $0.005 | $5.00 |
| Bronze | $0.0045 | $4.50 |
| Silver | $0.004 | $4.00 |
| Gold | $0.0035 | $3.50 |

The Actor start event costs $0.00005 per GB of memory, with a minimum of one event. It runs with 1 GB (1,024 MB) of memory by default, so a run starts with 1 start event, which is $0.00005.

**Worked example:** 2,000 events on the Silver plan cost 2,000 x $0.004 = $8.00, plus the $0.00005 start event, with platform usage billed in addition.

#### Is scraping Facebook events free?

You can start for free. The Apify Free plan includes $5 of monthly credit, which covers about 1,000 events at the Free price of $0.005 each, before platform usage. Only the main events table is charged; the organizers, related events and inputs tables are not. Set a maximum cost per run and the Actor stops cleanly when it is reached, keeping the events already saved. See the [pricing tab](https://apify.com/data_minds/facebook-event-scraper/pricing) for current prices.

***

### Input

The Actor needs at least one search query in `searchQueries` or one link in `urls`; everything else is optional. Set the input in the Actor form or send it as JSON through the API.

This example collects up to 10 events from a [Facebook](https://www.facebook.com) events search for "Sport New York":

```json
{
  "urls": ["https://www.facebook.com/events/search/?q=Sport%20New%20York"],
  "maxEvents": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

See the [input tab](https://apify.com/data_minds/facebook-event-scraper/input-schema) for a full description of every field.

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `urls` | array of strings | No | none (prefilled with a search link) | Event, search, explore, page (`/upcoming_hosted_events` or `/past_hosted_events`) and group (`/groups/NAME/events`) links, one per line |
| `searchQueries` | array of strings | No | `[]` | Topics, places or both, one search per line |
| `maxEvents` | integer | No | `10` | Maximum events across all queries and links; `0` collects every event that can be found |
| `dateRange` | string | No | `any` | Only events that touch this period |
| `category` | string | No | empty | Only events in these categories, separated by commas |
| `proxyConfiguration` | object | No | `{"useApifyProxy": false}` | Optional connection settings; leave the default for automatic handling |

#### dateRange

Pick `today`, `tomorrow`, `this_week`, `this_weekend`, `next_week`, `7d`, `14d` or `30d`, or type a date or a period. Events pass when their start and end touch the period. It does not apply to single event links.

- ✅ Good: `this_weekend`, `2026-10-20`, `2026-10-20~2026-10-27`
- ❌ Bad: `next friday`, `20/10/2026`

> **Warning:** An unrecognised `dateRange` stops the run before any event is collected, and the end of a period must not be before its start.

#### category

Type one or more categories separated by commas, for example Music, Food, Art, Sports or Party. An event matches when any of them fits. It does not apply to single event links.

- ✅ Good: `Music, Food`
- ❌ Bad: `Music; Food`

#### urls and searchQueries

Use `searchQueries` for topics and places, and `urls` for links you already have. You can fill both in one run. The same event is saved once per run, even if several inputs find it.

- ✅ Good: `Sport New York` in `searchQueries`, or `https://www.facebook.com/groups/NAME/events` in `urls`
- ❌ Bad: a profile or post link in `urls`

> **Warning:** Links that are not Facebook event links are skipped with a log message. If no valid query or link is left, the run stops with an input error.

***

### Output

Results are stored in a dataset, which you can open in the **Output** or **Storage** tab. View them as a table or JSON, pick the fields you need and download them in JSON, CSV, Excel, XML or HTML. The main table has views for overview, schedule, place, attendance, tickets, organizers, details, related events and source.

#### JSON example

Results for an input like the one above, as one event row:

```json
{
  "inputUrl": "https://www.facebook.com/events/search/?q=Sport%20New%20York",
  "url": "https://www.example.com/events/1234567890/",
  "id": "1234567890",
  "name": "Sunday Run Club",
  "eventFrequency": "SINGLE",
  "eventType": "PUBLIC_TYPE",
  "privacyInfo": { "title": "Public", "iconName": "public" },
  "imageUrl": "https://www.example.com/images/run-club.jpg",
  "imageCaption": "People running in a park",
  "dateTimeSentence": "Sun, Nov 8 at 9:00 AM EST",
  "utcStartDate": "2026-11-08T14:00:00Z",
  "startTime": "Nov 8 at 9:00 AM",
  "duration": "2 hours",
  "isPast": false,
  "isCanceled": false,
  "address": "1 Example Street, New York, NY",
  "location": {
    "url": "https://www.example.com/places/central-park/",
    "id": "111",
    "name": "Central Park",
    "contextualName": "Central Park, New York",
    "placeType": "PLACE",
    "latitude": 40.78,
    "longitude": -73.96,
    "countryCode": "US",
    "streetAddress": "1 Example Street",
    "city": "New York",
    "cityId": "222",
    "description": "Public park"
  },
  "description": "Weekly group run. Details at https://www.example.com/run #running",
  "externalLinks": ["https://www.example.com/run"],
  "discoveryCategories": ["Sports"],
  "usersGoing": 120,
  "usersInterested": 340,
  "usersResponded": 460,
  "ticketsInfo": {
    "buyUrl": "https://www.example.com/tickets",
    "price": "$5",
    "title": "Entry",
    "subtitle": "Per person",
    "ticketProvider": "Example Tickets"
  },
  "paidContent": true,
  "organizedBy": "Example Run Club",
  "organizators": [
    { "id": "333", "url": "https://www.example.com/runclub", "name": "Example Run Club", "isVerified": false }
  ],
  "isOnline": false,
  "hasChildEvents": false,
  "childEvents": [],
  "hasRecordingAvailable": false,
  "isClassEvent": false,
  "isLiveAudioRoom": false,
  "isRemoteLearningClass": false,
  "isRemoteLearningCourse": false,
  "groupEventPinnedToFeatured": false,
  "endTime": "2026-11-08T16:00:00Z",
  "timezone": "EST",
  "durationMinutes": 120,
  "isHappeningNow": false,
  "onlineEventType": null,
  "latitude": 40.78,
  "longitude": -73.96,
  "cityPage": null,
  "categories": [
    { "label": "Sports", "url": "https://www.example.com/events/search/?q=sports", "id": "444" }
  ],
  "hosts": [
    {
      "id": "333",
      "url": "https://www.example.com/runclub",
      "name": "Example Run Club",
      "isVerified": false,
      "type": "Page",
      "profilePictureUrl": "https://www.example.com/images/club.jpg"
    }
  ],
  "hashtags": ["running"],
  "usersInterestedIsApproximate": false,
  "childEventsCount": 0,
  "lineup": [],
  "nameChanged": false,
  "dateChanged": false,
  "isSaleEvent": false,
  "relatedEvents": [
    {
      "id": "5555555555",
      "url": "https://www.example.com/events/5555555555/",
      "name": "City Marathon Expo",
      "dateTimeSentence": "Sat, Nov 14 at 10:00 AM EST",
      "place": "Example Hall",
      "usersGoing": 80,
      "usersInterested": 200
    }
  ],
  "parentEventId": null,
  "mobileUrl": "https://www.example.com/events/1234567890",
  "sourceType": "search",
  "sourceRank": 1,
  "scrapedAt": "2026-10-26T12:00:00Z"
}
```

The organizers table holds one row per host of each event:

```json
{
  "eventId": "1234567890",
  "eventName": "Sunday Run Club",
  "eventUrl": "https://www.example.com/events/1234567890/",
  "hostId": "333",
  "hostName": "Example Run Club",
  "hostUrl": "https://www.example.com/runclub",
  "isVerified": false,
  "hostType": "Page",
  "profilePictureUrl": "https://www.example.com/images/club.jpg",
  "scrapedAt": "2026-10-26T12:00:00Z"
}
```

The related events table holds one row per suggested event:

```json
{
  "eventId": "1234567890",
  "eventName": "Sunday Run Club",
  "relatedEventId": "5555555555",
  "relatedEventUrl": "https://www.example.com/events/5555555555/",
  "relatedEventName": "City Marathon Expo",
  "dateTimeSentence": "Sat, Nov 14 at 10:00 AM EST",
  "place": "Example Hall",
  "usersGoing": 80,
  "usersInterested": 200,
  "scrapedAt": "2026-10-26T12:00:00Z"
}
```

The inputs table holds one row per search query or link:

```json
{
  "input": "https://www.facebook.com/events/search/?q=Sport%20New%20York",
  "type": "search",
  "status": "ok",
  "events": 10,
  "error": null
}
```

A `SUMMARY` record in the key-value store holds run totals such as `events`, `eventsBilled`, `requests`, `durationSeconds` and `inputs`.

#### Notes and limitations

- Only public events are returned. Private, deleted, age-restricted and login-only events are not.
- Page and group lists return the first events shown for that list. Use search queries to find more.
- The number of events a search returns depends on the query. Some queries match few public events.
- `dateRange` and `category` do not apply to single event links.
- Going and interested counts can be unavailable for some events; those fields are then null.

***

### Tips and advanced usage

#### How many events can you scrape with Facebook Event Scraper?

The exact number depends on how many public events match your query or link, your filters and `maxEvents`. The best way to know for your use case is a quick test run with the default `maxEvents` of 10.

#### How to get faster or cheaper results

- Start with a small `maxEvents`, then raise it. Use `0` only when you want every event that can be found.
- Use specific queries such as "Music Berlin" instead of one broad word.
- Keep filters wide enough. A narrow `dateRange` or `category` on a broad query makes the run check many events before enough match; if the log says nothing matched, widen the filter.
- Set a maximum cost per run in the Apify run options to cap spending.

#### Known issues

- A run can return fewer events than `maxEvents` when the site limits requests. Run again later for more.

***

### Integrations and API

#### Can I use Facebook Event Scraper as an API?

Yes. The [Apify API](https://docs.apify.com/api/v2) gives you programmatic access to the Actor: start runs, schedule them and fetch results. Use the `apify-client` package for Node.js or Python, and open the [API tab](https://apify.com/data_minds/facebook-event-scraper/api) for ready-to-use code.

#### How to scrape Facebook events with Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("data_minds/facebook-event-scraper").call(run_input={
    "urls": ["https://www.facebook.com/events/search/?q=Sport%20New%20York"],
    "maxEvents": 10,
    "proxyConfiguration": {"useApifyProxy": False},
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### Can I integrate Facebook Event Scraper with other apps?

Yes. Connect the Actor with Make, Zapier, Google Sheets, Slack and other apps through Apify integrations. Use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger an action when a run finishes, and schedule runs to keep your events data fresh.

#### Can I use Facebook Event Scraper with AI agents (MCP)?

Yes. Connect the Actor to Claude and other AI assistants through the Apify MCP server. Open the [MCP tab](https://apify.com/data_minds/facebook-event-scraper/api/mcp) for setup steps.

***

### Other Facebook scrapers

| Actor | What it does |
|---|---|
| 📢 [Facebook Ads Library Scraper](https://apify.com/data_minds/facebook-ads-library-scraper) | Scrape public ads from the Meta Ad Library: ad copy, creatives, landing pages and run dates |
| 📄 [Facebook Pages Scraper](https://apify.com/data_minds/facebook-pages-scraper) | Scrape public Facebook Page data in bulk: name, category, likes, followers, rating, contact details and more |
| 🎬 [Facebook Reels Scraper](https://apify.com/data_minds/facebook-reels-scraper) | Scrape Facebook Reels from public pages, profiles or reel links: captions, play counts, reactions and comments |
| 🔗 [Instagram Scraper](https://apify.com/data_minds/instagram-scraper) | Scrape public Instagram profiles, posts, reels, comments, hashtags, topics and places: followers, bio contacts, likes, plays, captions, media... |
| 🔗 [Facebook Page Contact Info Scraper](https://apify.com/data_minds/facebook-page-contact-info-scraper) | Scrape emails, phone numbers, websites, address, social links and follower counts from public Facebook pages. |

***

### FAQ

#### Is it legal to scrape Facebook events?

Web scraping is generally legal when you extract publicly available data. Respect personal data rules such as GDPR, collect personal data only with a legitimate reason, and follow Facebook's terms. This is not legal advice. Read Apify's guide on [whether web scraping is legal](https://blog.apify.com/is-web-scraping-legal/) and ask a lawyer when unsure.

#### How does Facebook Event Scraper work?

You give it search queries or Facebook events links, a maximum number of events and optional date and category filters. The Actor looks up each public event, saves one row per event with dates, places, attendance, tickets and organizers, and shows rows in the Output tab while the run continues. Organizers, related events and inputs get their own tables.

#### Why scrape Facebook events data?

Event data helps teams find leads, track competitors and plan marketing. Promoters reach organizers and venues, agencies compare going and interested counts across cities, and app builders fill event calendars and listing sites. Scheduled runs show new and past events over time, so you spot trends without copying details from event pages by hand.

#### Do I need a Facebook account or cookies to scrape Facebook events?

No. The Actor collects public events without a login, an account or cookies. You only need an Apify account to run it. Events that need a login, such as private events, are not returned. Add your queries or links and click Start, and public event data is saved to the dataset.

#### Can I scrape Facebook events by location or date?

Yes. Put a place in a search query, for example "Music Berlin", to find events near a city, and set `dateRange` to this weekend, next week, a single date or a period. You can also set `category`. These filters do not apply to single event links, which are always saved as given.

#### How do I export Facebook events to CSV or Excel?

For a Facebook events download, open the finished run, go to the Output or Storage tab and choose a format: CSV, Excel, JSON, XML or HTML. You can pick only the fields you need first, for example `name`, `dateTimeSentence`, `address` and `usersGoing`. The organizers and related events tables download the same way from their own views.

#### Why am I getting fewer results than expected?

Several things can cause it. Some queries match few public events, page and group lists return only their first events, narrow date or category filters remove events, and the site can limit requests. Check the inputs table for each status, widen your filters, try a more specific query, or run again later.

#### Facebook Event Scraper is not working. What should I do?

First check the inputs table and the run log: they name the failed input and the reason, such as an invalid link or an unrecognised date range. Fix the input and run again. If the problem repeats, open a ticket in the [Issues tab](https://apify.com/data_minds/facebook-event-scraper/issues/open) with your run link.

***

### Support and feedback

Found a bug or have a feature request? Please create an issue on the [Issues tab](https://apify.com/data_minds/facebook-event-scraper/issues/open). We are always working on improving this Actor.

Need a **custom solution** or more data? Contact us at hello.dataminds@gmail.com.

Built and maintained by the [data_minds](https://apify.com/data_minds) team on Apify.

This Actor is an independent tool and is not affiliated with or endorsed by Meta or Facebook. Use it only for public data and follow the laws and platform terms that apply to you.

# Actor input Schema

## `urls` (type: `array`):

Facebook events links, one per line: event links, search links (also with filters), explore links, page links (/upcoming_hosted_events or /past_hosted_events) and group links (/groups/NAME/events). Bulk input is supported. Leave empty if you use search queries.

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

Topics (Sport), places (New York) or both (Sport New York). One search per line. Leave empty if you use links.

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

Maximum number of events to collect in total across all queries and links. Use 0 for every event that can be found.

## `dateRange` (type: `string`):

Only events that touch this period. Pick one from the list, or type a date like 2026-10-20 or a period like 2026-10-20~2026-10-27. Does not apply to single event links.

## `category` (type: `string`):

Only events in these categories, e.g. Music, Food, Art, Sports, Party. Separate several with commas (either one matches). Leave empty for all. Does not apply to single event links.

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

Optional. Leave the default and the Actor handles the connection automatically. Change it only if you need specific connection settings.

## Actor input object example

```json
{
  "urls": [
    "https://www.facebook.com/events/search/?q=Sport%20New%20York"
  ],
  "searchQueries": [],
  "maxEvents": 10,
  "dateRange": "any",
  "category": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All collected events, overview view.

## `organizers` (type: `string`):

One row per organizer of each event.

## `related` (type: `string`):

Events Facebook suggests next to each event.

## `sources` (type: `string`):

One row per search query or link you gave, with its status and event count.

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

Totals for the run.

# 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 = {
    "urls": [
        "https://www.facebook.com/events/search/?q=Sport%20New%20York"
    ],
    "maxEvents": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_minds/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 = {
    "urls": ["https://www.facebook.com/events/search/?q=Sport%20New%20York"],
    "maxEvents": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("data_minds/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 '{
  "urls": [
    "https://www.facebook.com/events/search/?q=Sport%20New%20York"
  ],
  "maxEvents": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call data_minds/facebook-event-scraper --silent --output-dataset

```

## MCP server setup

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