# Facebook Events Search (`igview-owner/facebook-events-search`) Actor

Instantly discover local events on Facebook by keyword and location. Extract event titles, IDs, URLs, and search positions with advanced date filters.

- **URL**: https://apify.com/igview-owner/facebook-events-search.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Categories:** Social media, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Facebook Events Search – Event Finder & Scraper

**Search Facebook events by keyword, location, and date range. Extract detailed event listings including event titles, Facebook URLs, event IDs, and ranking positions. Supports pagination, location-based filtering, and start/end date range filters. Built with Apify best practices for reliability.**

---

### Table of Contents

- [Features](#features)
- [Use Cases](#use-cases)
- [Quick Start](#quick-start)
- [Input Parameters](#input-parameters)
- [Output Format](#output-format)
- [Performance & Limits](#performance--limits)
- [FAQ](#faq)
- [Troubleshooting](#troubleshooting)
- [Why Choose This Actor?](#why-choose-this-actor)
- [Tags](#tags)
- [Get Started Now](#get-started-now)
- [Related Actors](#related-actors)

---

### Features

- **Keyword Event Discovery** - Search public Facebook events by any topic, interest, or niche.
- **Location-Based Filtering** - Target events in specific regions using location UIDs (e.g., city or region IDs).
- **Date Range Filters** - Narrow down your searches by setting a Start Date and End Date.
- **Pagination Support** - Scrape multiple result pages (up to 20 pages) for deep event indexing.
- **Clean Structure** - Outputs direct URLs, event IDs, titles, and search positions.
- **Seamless Exporting** - Download your scraped events database in CSV, JSON, Excel, or HTML.

---

### Use Cases

| Use Case | Description | Key Benefits |
|----------|-------------|--------------|
| Local Event Directories | Scrape and build local event directories and community guides. | Discover events by city locations and date periods automatically. |
| Competitor Tracking | Track industry events, launch schedules, or vendor fairs. | Identify when competitors schedule promotional events. |
| Influencer & Sponsor Outreach | Discover niche festivals, meetups, and conferences. | Find events matching target audiences for sponsorship pitches. |
| Trend Detection | Monitor trending keywords (e.g., "AI", "blockchain", "yoga") to see interest levels. | Gauge regional popularity of specific topics based on events listed. |
| Event Marketing Campaigns | Discover local events to target physical flyering or geofenced digital ads. | Generate location-relevant event lists for marketing teams. |

---

### Quick Start

#### 1. Basic - Simple Keyword Search
```json
{
  "query": "music festival",
  "maxPages": 1
}
````

#### 2. Advanced - Location & Date Filtering

```json
{
  "query": "tech conference",
  "locationUid": "108155985871234",
  "startDate": "2026-08-01",
  "endDate": "2026-08-31",
  "maxPages": 3
}
```

***

### Input Parameters

| Parameter | Type | Required | Description | Default | Example |
|-----------|------|----------|-------------|---------|---------|
| `query` | String | Yes | Search keyword or phrase to find matching events on Facebook | `"music festival"` | `"tech conference"`, `"yoga class"`, `"food truck"` |
| `locationUid` | String | No | Facebook location UID to filter events. Use our Facebook Location UID Finder to get the exact ID | - | `"108155985871234"` |
| `startDate` | String | No | Start date filter (ISO format or datepicker selection) | - | `"2026-08-01"` |
| `endDate` | String | No | End date filter (ISO format or datepicker selection) | - | `"2026-08-31"` |
| `maxPages` | Integer | No | Max pages of search results to crawl (1-20). Each page contains ~8 event listings. | `1` | `2`, `5`, `10` |

***

### Output Format

#### Event Result Data Structure

```json
{
  "source": "facebook_events_search",
  "search_query": "music festival",
  "position": 1,
  "type": "search_event",
  "event_id": "777847974632596",
  "title": "Alive Music Festival 2026",
  "url": "https://www.facebook.com/events/777847974632596/",
  "scraped_at": "2026-07-05T02:59:56.035Z"
}
```

#### Output Fields Explained

| Field | Type | Description |
|-------|------|-------------|
| `source` | String | Source indicator, always `facebook_events_search` |
| `search_query` | String | The exact keyword query used for the search |
| `position` | Integer | Ranking position in search results (1-based index) |
| `type` | String | Data entity type, always `search_event` |
| `event_id` | String | Facebook's unique event ID |
| `title` | String | The title of the Facebook event |
| `url` | String | Direct URL link to the event's Facebook details page |
| `scraped_at` | String | ISO timestamp of extraction |

***

### Performance & Limits

- **Pagination Limits** - Maximum of 20 pages per query can be scraped to guarantee speedy execution and prevent key fatigue.
- **Output Batching** - Flushes data in sets of 10 to ensure safety of results in case of connection dropouts.

***

### FAQ

- **Q: Where does the actor get the location UIDs?**
  - Location UIDs are Facebook's unique identifier for cities and places. You can extract these using the Facebook Location UID Finder actor or through Facebook search page URLs.
- **Q: How many events are scraped per page?**
  - Typically, Facebook returns around 8 key event listings per page request.
- **Q: Do I need proxies to run this?**
  - The scraper comes fully bundled with proxies and rotation middleware, so you don't need to configure your own.
- **Q: Can I get full event details from this scraper?**
  - This scraper acts as a discovery tool (event finder). To get complete venue details, GPS coordinates, descriptions, and ticket links, copy the output URLs into the **Facebook Event Details by URL** actor.

***

### Troubleshooting

| Issue | Cause | Solution |
|-------|-------|----------|
| No events found | Query is too specific or filters are too narrow | Broaden the keyword or remove/adjust the location and date filters |
| Invalid location UID | Incorrect ID format provided | Ensure you use a valid Facebook location entity UID (not custom strings) |
| Rate-limiting delays | High traffic or long runs | The scraper rotates keys and continues. To speed up, consider running smaller `maxPages` per task |

***

### Why Choose This Actor?

- **Flexible Filtering** - Drill down into specific dates and geographic locations.
- **Direct Event Links** - Instantly produces clean Facebook URLs ready for detailed scraping.
- **Robust Integration** - Fully matches standard Apify dataset exports.
- **Error Resilient** - Automatic retry and key rotation logic ensures continuous execution.

***

### Tags

`facebook event finder`, `facebook events search`, `facebook events scraper`, `local event search`, `facebook search API`, `social media event tracker`, `event scraper`, `apify actor`

***

### Get Started Now

1. Enter the **Search Query** (e.g., `music festival`)
2. Add optional filters like **Location UID** or **Date Ranges**
3. Choose the **Maximum Pages** to crawl
4. Click **Start** to run the scraper
5. Export listings in CSV, JSON, or Excel format
6. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to test the actor

***

### Related Actors

- **[Facebook Event Details by URL Scraper](https://apify.com/igview-owner/facebook-event-details)** - Scrape full description, hosts, coordinates, and ticket links.
- **[Facebook Page Search Scraper](https://apify.com/igview-owner/facebook-page-search)** - Search for pages and retrieve page info.
- **[Facebook Ads Library Scraper](https://apify.com/igview-owner/facebook-ads-search)** - Retrieve competitor ad listings.

*Built using Apify Platform | Optimized for Performance & Reliability*

# Actor input Schema

## `query` (type: `string`):

💬 Enter your search keyword or phrase (e.g., 'music festival', 'tech conference', 'yoga class'). This is the main search term to find events on Facebook.

## `locationUid` (type: `string`):

🗺️ Optional. Facebook location UID to filter events by a specific location. Use our Facebook Location UID Finder actor to get the UID.

## `startDate` (type: `string`):

🗓️ Optional. Filter events starting from this date.

## `endDate` (type: `string`):

🗓️ Optional. Filter events up to this date.

## `maxPages` (type: `integer`):

📊 Number of result pages to scrape (1-20). Each page contains ~8 events. More pages = more results but longer runtime and higher API usage.

## Actor input object example

```json
{
  "query": "music festival",
  "maxPages": 1
}
```

# Actor output Schema

## `events_overview` (type: `string`):

Open the dataset view with an overview of all event search results including title, URL, and event ID.

# 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 = {
    "query": "music festival",
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/facebook-events-search").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 = {
    "query": "music festival",
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/facebook-events-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "music festival",
  "maxPages": 1
}' |
apify call igview-owner/facebook-events-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=igview-owner/facebook-events-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Events Search",
        "description": "Instantly discover local events on Facebook by keyword and location. Extract event titles, IDs, URLs, and search positions with advanced date filters.",
        "version": "1.0",
        "x-build-id": "HzZg3ZcmqT3m2BCRY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/igview-owner~facebook-events-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-igview-owner-facebook-events-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/igview-owner~facebook-events-search/runs": {
            "post": {
                "operationId": "runs-sync-igview-owner-facebook-events-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/igview-owner~facebook-events-search/run-sync": {
            "post": {
                "operationId": "run-sync-igview-owner-facebook-events-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "🔎 Search Query",
                        "minLength": 1,
                        "maxLength": 500,
                        "type": "string",
                        "description": "💬 Enter your search keyword or phrase (e.g., 'music festival', 'tech conference', 'yoga class'). This is the main search term to find events on Facebook.",
                        "default": "music festival"
                    },
                    "locationUid": {
                        "title": "📍 Location UID",
                        "type": "string",
                        "description": "🗺️ Optional. Facebook location UID to filter events by a specific location. Use our Facebook Location UID Finder actor to get the UID."
                    },
                    "startDate": {
                        "title": "📅 Start Date",
                        "type": "string",
                        "description": "🗓️ Optional. Filter events starting from this date."
                    },
                    "endDate": {
                        "title": "📅 End Date",
                        "type": "string",
                        "description": "🗓️ Optional. Filter events up to this date."
                    },
                    "maxPages": {
                        "title": "📄 Maximum Pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "📊 Number of result pages to scrape (1-20). Each page contains ~8 events. More pages = more results but longer runtime and higher API usage.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
