# Dice.fm Events Scraper (`b3264/dice-fm-events-scraper`) Actor

Scrape event data from Dice.fm - search by artist, city, or keyword. Get event details, lineups, ticket prices, and venue info. NOTE: Dice.fm uses aggressive Cloudflare protection - residential proxies, a VPN, or running locally are required for reliable results.

- **URL**: https://apify.com/b3264/dice-fm-events-scraper.md
- **Developed by:** [Brandon Hamm](https://apify.com/b3264) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Dice.fm Events Scraper

A Python-based Apify Actor that scrapes event data from [Dice.fm](https://dice.fm) — one of the UK's leading independent ticketing platforms for live music, club nights, and festivals.

### Features

- **Multiple query modes**: Search by keyword, browse by city, scrape direct event URLs, or search by artist name
- **API interception**: Intercepts Dice.fm's internal API responses during page load for structured JSON data — no HTML scraping required when API is available
- **HTML fallback**: Falls back to BeautifulSoup HTML parsing when API interception fails
- **Full event details**: Optionally visits individual event pages for complete lineups, ticket types, descriptions, and images
- **Date filtering**: Filter events by date range (YYYY-MM-DD)
- **Cloudflare handling**: Uses Playwright with stealth settings and residential proxies to bypass Cloudflare protection
- **Deduplication**: Automatically deduplicates events by event ID or URL
- **No API key required**: Works entirely through the public Dice.fm website

> **⚠️ Proxy Requirement**: Dice.fm uses aggressive Cloudflare protection. **Residential proxies are required** for successful scraping. Enable `useProxy` and use Apify's residential proxy groups. Datacenter proxies and direct connections will be blocked by Cloudflare. Users on Apify's Free plan may need to upgrade or provide their own residential proxy for reliable results.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `queryType` | select | ✅ | `search` | Query mode: `search`, `browse`, `event`, or `artist` |
| `searchQuery` | string | | | Text search query (for `search` mode) |
| `eventUrls` | string\[] | | | Direct Dice.fm event URLs (for `event` mode) |
| `city` | string | | | City name for browse mode (for `browse` mode) |
| `artistName` | string | | | Artist name to search (for `artist` mode) |
| `dateFrom` | string | | | Start date filter (YYYY-MM-DD) |
| `dateTo` | string | | | End date filter (YYYY-MM-DD) |
| `maxEvents` | integer | | `100` | Maximum events to scrape (0 = unlimited) |
| `includeEventDetails` | boolean | | `true` | Visit each event page for full details |
| `useProxy` | boolean | | `true` | Use Apify proxy for anti-bot bypass |

### Output Fields

Each event in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `eventId` | string | Dice.fm event ID |
| `eventName` | string | Event name/title |
| `eventUrl` | string | Full Dice.fm event URL |
| `date` | string | Event date (YYYY-MM-DD) |
| `time` | string | Event start time (HH:MM) |
| `venueName` | string | Venue name |
| `venueCity` | string | Venue city |
| `venueCountry` | string | Venue country |
| `venueAddress` | string | Venue street address |
| `latitude` | float|null | Venue latitude |
| `longitude` | float|null | Venue longitude |
| `lineup` | array | Array of `{artist, role, setTime}` objects |
| `ticketTypes` | array | Array of `{name, price, currency, soldOut, availability}` objects |
| `priceFrom` | float|null | Minimum ticket price |
| `priceTo` | float|null | Maximum ticket price |
| `currency` | string | Price currency code (default: GBP) |
| `genreTags` | array | Array of genre/style tag strings |
| `typeTag` | string | Event type (e.g., "Club night", "Live music", "Festival") |
| `ageLimit` | string | Age restriction info |
| `description` | string | Event description text |
| `imageUrls` | array | Array of image URLs |
| `soldOut` | boolean | Whether the event is sold out |
| `isFree` | boolean | Whether the event is free entry |

### Use Cases

- **Event discovery**: Find upcoming events by city, genre, or keyword
- **Market research**: Track ticket prices, sold-out rates, and event frequency
- **Artist touring data**: Find all upcoming dates for a specific artist
- **Venue monitoring**: Monitor a venue's upcoming programme
- **Festival tracking**: Scrape festival lineups and ticket availability
- **Data journalism**: Analyse live music trends, pricing, and market dynamics

### Example Input

```json
{
    "queryType": "search",
    "searchQuery": "techno London",
    "dateFrom": "2026-08-15",
    "dateTo": "2026-09-15",
    "maxEvents": 50,
    "includeEventDetails": true,
    "useProxy": true
}
```

```json
{
    "queryType": "browse",
    "city": "London",
    "maxEvents": 200
}
```

```json
{
    "queryType": "event",
    "eventUrls": [
        "https://dice.fm/event/abc123-floating-points-tickets",
        "https://dice.fm/event/def456-four-tet-tickets"
    ]
}
```

```json
{
    "queryType": "artist",
    "artistName": "Floating Points",
    "maxEvents": 20
}
```

### Example Output

```json
{
    "eventId": "abc123",
    "eventName": "Floating Points — All Night Long",
    "eventUrl": "https://dice.fm/event/abc123-floating-points-all-night-long-tickets",
    "date": "2026-08-22",
    "time": "23:00",
    "venueName": "Phonox",
    "venueCity": "London",
    "venueCountry": "GB",
    "venueAddress": "22 Brixton Hill, London SW2 1JW",
    "latitude": 51.4614,
    "longitude": -0.1152,
    "lineup": [
        {"artist": "Floating Points", "role": "headliner", "setTime": "02:00"},
        {"artist": "DJ support TBA", "role": "support", "setTime": "23:00"}
    ],
    "ticketTypes": [
        {"name": "Standard", "price": 25.00, "currency": "GBP", "soldOut": false, "availability": "available"},
        {"name": "Early Bird", "price": 18.00, "currency": "GBP", "soldOut": true, "availability": "sold_out"}
    ],
    "priceFrom": 18.0,
    "priceTo": 25.0,
    "currency": "GBP",
    "genreTags": ["electronic", "house", "techno"],
    "typeTag": "Club night",
    "ageLimit": "18+",
    "description": "Floating Points plays an all-night set at Phonox...",
    "imageUrls": ["https://images.dice.fm/abc123-cover.jpg"],
    "soldOut": false,
    "isFree": false
}
```

### How It Works

1. **Launches Playwright** with stealth settings (anti-automation flags disabled, realistic user agent)
2. **Navigates** to the target Dice.fm page (search results, city browse, or direct event URL)
3. **Intercepts network responses** — listens for JSON responses from Dice.fm's internal API endpoints
4. **Scrolls the page** to trigger infinite loading and additional API calls
5. **Normalises** intercepted API data into the output schema
6. **HTML fallback** — if no API data is intercepted, parses the rendered HTML for event links
7. **Event detail enrichment** — optionally visits each event page for full lineup/ticket/description data
8. **Filters and deduplicates** events by date range and event ID
9. **Pushes results** to the Apify dataset incrementally

### Cloudflare Handling

Dice.fm uses Cloudflare protection. This scraper handles it by:

- Using **Playwright** (real browser engine) instead of HTTP requests
- **Apify proxy** with residential IPs to avoid rate limiting
- **Anti-automation flags** disabled (`--disable-blink-features=AutomationControlled`)
- **Challenge detection**: detects Cloudflare interstitial pages and waits for them to resolve
- **Retry logic**: up to 3 wait cycles (5s each) for Cloudflare challenges to clear

If Cloudflare consistently blocks the scraper, ensure `useProxy` is enabled and try again after a cooldown period.

### Technical Details

- **Runtime**: Python 3.12
- **Browser engine**: Chromium (via Playwright)
- **Dependencies**: `apify`, `crawlee[playwright]`, `beautifulsoup4`, `lxml`
- **Docker base image**: `apify/actor-python-playwright:3.12`
- **No API keys**: Works entirely through the public Dice.fm website

### Limitations

- Dice.fm's internal API structure may change without notice — the HTML fallback provides resilience
- Very large result sets may be slow due to page scrolling and detail page visits
- Cloudflare may temporarily block repeated requests; use proxy and reasonable delays
- Some events may have incomplete data if the API response is sparse

### License

This actor is provided as-is for educational and research purposes. Ensure compliance with Dice.fm's terms of service when using this scraper.

# Actor input Schema

## `queryType` (type: `string`):

Type of query to perform on Dice.fm

## `searchQuery` (type: `string`):

Text search query (used when queryType=search). Example: 'techno London', 'Avalon Cafe', 'Boiler Room'

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

Direct Dice.fm event URLs (used when queryType=event). Example: https://dice.fm/event/abc123-event-name-tickets

## `city` (type: `string`):

City name for browse mode (used when queryType=browse). Example: 'London', 'Manchester', 'Berlin', 'New York'

## `artistName` (type: `string`):

Artist name to search for (used when queryType=artist). Example: 'Floating Points', 'Four Tet'

## `dateFrom` (type: `string`):

Start date filter (YYYY-MM-DD format). Events before this date will be excluded.

## `dateTo` (type: `string`):

End date filter (YYYY-MM-DD format). Events after this date will be excluded.

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

Maximum number of events to scrape. Set to 0 for unlimited.

## `includeEventDetails` (type: `boolean`):

When enabled, the scraper will visit each individual event page to get full details (lineup, ticket types, description, etc.). Slower but more comprehensive.

## `useProxy` (type: `boolean`):

Use Apify proxy for anti-bot bypass. Recommended for Cloudflare-protected sites. Disable only for local testing.

## Actor input object example

```json
{
  "queryType": "search",
  "maxEvents": 100,
  "includeEventDetails": true,
  "useProxy": true
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("b3264/dice-fm-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("b3264/dice-fm-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 '{}' |
apify call b3264/dice-fm-events-scraper --silent --output-dataset

```

## MCP server setup

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