# Cultural Event & Festival Aggregator (`datapilot/cultural-event-festival-aggregator`) Actor

Extract event titles, categories, dates, locations, and official links with automated web search and parallel page scanning. Export structured event data to the Apify Dataset.

- **URL**: https://apify.com/datapilot/cultural-event-festival-aggregator.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 84.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 scraped festivals

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

🎭 **Cultural Event & Festival Aggregator** is a powerful Apify Actor designed to find and collect cultural events and festivals from the open web. This **Cultural Event & Festival Aggregator** searches the web for your keywords (a city, a region, or a festival type), scans the pages it finds, and returns event names, dates, locations, and links in one clean list. Whether you're building a tourism calendar, a "what's on" guide, or a cultural events database, the Cultural Event & Festival Aggregator delivers structured event data efficiently.

With keyword search, optional starting URLs, structured-data extraction, event detail page discovery, upcoming-only filtering, duplicate removal, parallel page scanning, and reliable Apify Dataset delivery, this **Cultural Event & Festival Aggregator** actor turns scattered event pages into one dataset. It focuses on key signals including title, date, location, and link, making **Cultural Event & Festival** collection fast and structured.

***

### 📋 Table of Contents

- [Features](#-features)
- [Data Source](#-data-source)
- [How It Works](#-how-it-works)
- [Input](#-input)
- [Output](#-output)
- [Technical Stack](#-technical-stack)
- [Data Fields](#-data-fields-explained)
- [Use Cases](#-use-cases)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
- [Performance](#-performance)
- [Important Notes](#-important-notes)
- [License & Legal](#-license--legal)

***

### 🔥 Features

- **Cultural Event & Festival Search** – Searches the web for festivals and cultural events matching your keywords. This is the core of the **Cultural Event & Festival Aggregator**.
- **Structured Data Extraction** – Reads schema.org `Event` and `Festival` data (JSON-LD) that many event sites publish on their pages.
- **Event Detail Page Discovery** – When a page lists few events, the actor follows links to event, festival, agenda, and calendar pages, including common non-English URL words.
- **Starting URLs** – Add your own pages (official tourism sites, venue sites) to scan alongside the search results.
- **Upcoming-Only Filter** – Keep only events that have not ended yet (on by default).
- **Duplicate Removal** – Removes events with the same title and date.
- **Parallel Scanning** – Searches and scans pages in parallel for fast runs.
- **Flexible Input** – Keywords and URLs can be lists or comma-separated text.
- **Fallback Parsing** – If a detail page has no structured data, the actor tries to read the title and a date from the page itself.
- **Apify Proxy Support** – Optional Apify Proxy for reliable **Cultural Event & Festival Aggregator** access.
- **Detailed Logging** – Logs search and scanning progress for every **Cultural Event & Festival** run.

***

### 📊 Data Source

#### **Open Web (Search Results and Event Pages)**

- **Search**: DuckDuckGo Lite, with Bing as a fallback. Common social media, Wikipedia, Reddit, TripAdvisor, and search-engine domains are skipped.
- **Pages**: The event, tourism, and festival websites found by search, plus any `startUrls` you provide
- **Access Method**: HTTP requests via `curl_cffi` (Chrome 124 fingerprint), parsing HTML with BeautifulSoup. No browser is used.
- **Data**: Event title, type, date, location, and link, as published on each site
- **Access**: Public pages, no login or API key
- **Update Frequency**: Reflects each site at time of run

***

### ⚙️ How It Works

The Cultural Event & Festival Aggregator accepts keywords and/or URLs. For each keyword it runs three web searches, collects the result pages, and scans them for event data. Pages with few events are searched for links to event detail pages, which are scanned as well. Events are de-duplicated, filtered, and saved to the Apify Dataset as one batch.

**Key Processing Steps:**

1. **Input Parsing** – Read `keywords`, `startUrls`, `year`, `upcomingOnly`, and `maxResults`
2. **Proxy Setup** – Configure Apify Proxy if enabled
3. **Web Search** – For each keyword, run three searches (festival official site, tourism board events, cultural events) for the chosen year
4. **Candidate Pages** – Combine your `startUrls` and up to 12 results per search, limited to 25 pages in total
5. **Page Scan** – Scan candidate pages in parallel and read their structured event data
6. **Detail Page Discovery** – For pages with fewer than 3 events, find up to 6 event-related links on the same site
7. **Detail Page Scan** – Scan up to 30 detail pages, using structured data first and page text as a fallback
8. **Filtering & Deduplication** – Remove duplicates and, if enabled, events that have already ended
9. **Dataset Push** – Push all **Cultural Event & Festival** records at once

***

### 📥 Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keywords` | array or string | `[]` | Search keywords such as a city, region, or event type. A string may be comma-separated. |
| `startUrls` | array or string | `[]` | Pages to scan directly. A string may be comma-separated. Plain domains get `https://` added. |
| `year` | string or integer | current year | Year added to the search queries. |
| `upcomingOnly` | boolean | `true` | Keep only events that have not ended. |
| `maxResults` | integer | `50` | Maximum number of events to return. |
| `proxyConfiguration` | object | `{"useApifyProxy": true}` | Apify Proxy configuration. |

You must provide at least one keyword or one URL. If you give only URLs, the first URL's domain is used as the label.

**Example Input:**

```json
{
  "keywords": ["Lisbon", "Porto"],
  "year": "2026",
  "upcomingOnly": true,
  "maxResults": 50
}
```

**Scan Specific Sites:**

```json
{
  "startUrls": ["https://example-tourism-board.com/events", "example-festival.org"],
  "maxResults": 30
}
```

***

### 📤 Output

One **Cultural Event & Festival Aggregator** record is pushed per event:

| Field | Type | Description |
|-------|------|-------------|
| `event` | string | Event category from the page's type (for example "Music Event"), or your keyword for fallback results |
| `title` | string | Event name |
| `date` | string | `YYYY-MM-DD`, or `YYYY-MM-DD to YYYY-MM-DD` for multi-day events. Fallback results may show the date text as found on the page. |
| `location` | string | Venue name and address when available, otherwise empty |
| `link` | string | Link to the event page |
| `scrapedAt` | string | ISO 8601 UTC timestamp |

**Example Cultural Event & Festival Record:**

```json
{
  "event": "Music Festival",
  "title": "Example Summer Music Festival",
  "date": "2026-07-10 to 2026-07-12",
  "location": "Central Park, 1 Park Road, Example City, PT",
  "link": "https://example-festival.org/events/summer-music-festival",
  "scrapedAt": "2026-10-30T09:00:00+00:00"
}
```

***

### 🧰 Technical Stack

- **HTTP Client:** `curl_cffi` with Chrome 124 TLS fingerprint impersonation
- **Parsing:** BeautifulSoup, JSON-LD (schema.org Event data), and regular expressions
- **Search:** DuckDuckGo Lite with a Bing fallback
- **Concurrency:** `ThreadPoolExecutor` (6 workers for search, 10 workers for page scanning)
- **Proxy:** Apify Proxy, optional via `useApifyProxy`
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment

***

### 📊 Data Fields Explained

- **event**: What kind of event it is
- **title**: The event's name
- **date**: When the event starts, or starts and ends
- **location**: Where it takes place, when the page says so
- **link**: The page the event was found on
- **scrapedAt**: When it was collected

***

### 🎯 Use Cases

- **Tourism Calendars** – Collect festivals and events for a destination
- **"What's On" Guides** – Feed local guides, apps, and newsletters
- **Cultural Research** – Study the festivals of a region or event type
- **Event Marketing** – Find events to promote or sponsor
- **Travel Planning** – Gather events around your travel dates
- **Data Enrichment** – Build a cultural events database from official sites

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "keywords": ["Lisbon"],
  "year": "2026",
  "maxResults": 50
}
```

#### **2. Run the Actor**

Click **Start**. The Cultural Event & Festival Aggregator will:

- Run web searches for each keyword
- Scan the result pages and your start URLs
- Follow event detail links where needed
- Push all results to the Dataset

#### **3. Monitor Progress**

Console shows:

```
🛡️ Apify Proxy connected.
⚡ Executing 3 parallel search queries...
⚡ Scanning 25 candidate pages in parallel...
⚡ Scanning 18 event detail pages in parallel...
🎉 Complete! Pushed 42 event(s) to dataset.
```

#### **4. View & Download Results**

- **Results Tab**: All **Cultural Event & Festival** records
- **Export**: JSON, CSV, Excel, or HTML
- **API Access**: Available via the Apify API

***

### ⚙️ Configuration

Include past events too:

```json
{
  "keywords": ["Edinburgh"],
  "year": "2025",
  "upcomingOnly": false
}
```

Several keywords and your own pages:

```json
{
  "keywords": ["Kyoto", "Osaka"],
  "startUrls": ["https://example-tourism.jp/events"],
  "maxResults": 100
}
```

Direct connection without proxy:

```json
{
  "keywords": ["Berlin"],
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### 📈 Performance

#### **Processing Speed**

- Searches run 6 at a time and pages are scanned 10 at a time
- At most 25 candidate pages and 30 event detail pages are scanned per run
- Each page request times out after 10 seconds

#### **Resource Usage**

- Memory: Low, since no browser instance is launched
- Network: Many lightweight HTML requests
- Proxy: Optional Apify Proxy, with a retry in the other mode (proxy or direct) on failure

***

### ⚠️ Important Notes

#### **Legal & Compliance**

- **Search Engines**: The actor queries public search engine pages. Check the terms of those services before using the actor at scale.
- **Public Data Only**: It reads public web pages without logging in
- **robots.txt**: The actor does not check robots.txt, so respect each site's terms
- **Content Rights**: Event names and descriptions belong to their publishers. Link back to the original page when you reuse them.
- **Legal**: Not legal advice

#### **Data Quality**

- **Results Depend on the Web**: Search results and page structure change over time, so two runs can return different events. The actor finds only what pages publish.
- **Structured Data Needed**: Most events come from schema.org data on pages. Sites without it are only covered by the fallback on detail pages, so some events will be missed.
- **Fallback Accuracy**: When structured data is missing, the title comes from the page title and the date is the first date found in the page text, which may not be the event date. Fallback results are labeled with your keyword, and pages without a date are skipped.
- **Year Setting**: `year` is added to the search queries only. It does not filter the results by date.
- **Upcoming Filter**: Events whose dates cannot be read are kept even when `upcomingOnly` is on.
- **Relevance**: Pages found by search can include events not related to your keywords. Review the results.
- **Limits**: A run scans at most 25 candidate pages and 30 detail pages, so the number of events is limited by these caps and by `maxResults`.
- **JavaScript Sites**: Pages that load events only with JavaScript are not rendered and may return nothing.
- **Empty Results**: If nothing is found, a warning is logged and no records are saved.
- **Verification**: Confirm dates, times, and locations on the event's own page before publishing or traveling.

#### **Best Practices**

- Combine keywords with your own `startUrls` for the best coverage
- Use specific keywords (a city or festival type) rather than very broad ones
- Keep `upcomingOnly` on for forward-looking calendars
- Check the `link` of important events

***

### 📄 License & Legal

**Terms of Use:**

- Use for legitimate research, tourism, and information purposes
- Respect the terms of service of the sites and search engines involved
- Credit and link to original event sources
- Use data responsibly and in compliance with applicable laws

**Disclaimer:**
Cultural Event & Festival Aggregator is provided as-is for informational purposes. Event details come from third-party websites and may be incomplete or out of date. Users are responsible for verifying information and for compliance with applicable laws and the terms of the sources. This is not legal advice.

***

### ⚖️ Cultural Event & Festival Aggregator Excellence

This Actor is optimized for **Cultural Event & Festival** collection with:

- ✅ Keyword search plus your own starting URLs
- ✅ Structured event data (schema.org) extraction
- ✅ Event detail page discovery
- ✅ Upcoming-only filter and duplicate removal
- ✅ Fast parallel scanning
- ✅ Production-ready code

# Actor input Schema

## `keywords` (type: `array`):

List of cities, regions, or festival types to search for (e.g., Lisbon, jazz festival).

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

Direct URLs of tourism boards, promoters, or festival event listings.

## `year` (type: `string`):

Year to filter/search events for (defaults to current year if left blank).

## `upcomingOnly` (type: `boolean`):

If enabled, past events will be filtered out.

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

Maximum number of unique events to extract.

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

Apify Proxy settings.

## Actor input object example

```json
{
  "keywords": [
    "Lisbon"
  ],
  "startUrls": [],
  "year": "2026",
  "upcomingOnly": true,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `crawlResults` (type: `string`):

No description

## `overview` (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 = {
    "keywords": [
        "Lisbon"
    ],
    "year": "2026",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/cultural-event-festival-aggregator").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 = {
    "keywords": ["Lisbon"],
    "year": "2026",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("datapilot/cultural-event-festival-aggregator").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 '{
  "keywords": [
    "Lisbon"
  ],
  "year": "2026",
  "maxResults": 50
}' |
apify call datapilot/cultural-event-festival-aggregator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datapilot/cultural-event-festival-aggregator"
        }
    }
}
```

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/QCeETEFgcpTDyU2zt/builds/XUbZtHVuLaZeWdDWB/openapi.json
