# UFC Statistics Scraper (`automation-lab/ufc-events-fights-fighters`) Actor

Export UFCStats events, bout results and detailed fight statistics, plus fighter profiles, records, career rates, and fight histories as normalized JSON.

- **URL**: https://apify.com/automation-lab/ufc-events-fights-fighters.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Sports
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/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

## UFC Statistics Scraper

Export normalized **UFC statistics** from UFCStats as event, fight, or fighter records. Collect event schedules and results, bout participants and outcome summaries, detailed fight totals and significant-strike splits, or fighter profiles, career rates, records, and fight histories.

The Actor is designed for sports analysts, MMA publishers, researchers, and data teams that need repeatable UFC stats without maintaining a session bootstrap and HTML parser.

### What can you extract?

Choose one record type per run:

- **Events** — event name, date, location, status, source ID and URL, plus the full bout card when details are enabled.
- **Fights** — participants, W/L result, weight class, method, round, time, referee, aggregate totals, and significant strikes by target and position.
- **Fighters** — name, nickname, record, height, weight, reach, stance, date of birth, career statistics, and fight history.

Every record includes a stable UFCStats ID, canonical source URL, `recordType`, and collection timestamp.

### Who is this UFC stats scraper for?

- MMA analysts building bout and fighter datasets
- Sports publishers preparing event previews and result pages
- Researchers comparing striking, grappling, and outcome data
- Data engineers loading recurring UFCStats exports into a warehouse
- Automation builders monitoring event cards or fighter records on a schedule

### Why use this Actor?

UFCStats presents useful public data across separate event, fight, and fighter pages. It also uses a first-party browser-check session. This Actor handles that bounded session bootstrap, validates page shapes, follows stable source IDs, and converts the tables into typed JSON.

It uses direct HTTP rather than a browser or paid proxy. Requests retry only transient failures, and an upstream challenge or parser change fails visibly instead of producing a misleading empty result.

### Input parameters

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `events` | Return `events`, `fights`, or `fighters`. |
| `eventStatus` | string | `completed` | Discover `completed`, `upcoming`, or `all` events. Used by event and fight discovery. |
| `fighterSearch` | string | empty | Full or partial fighter name in fighter mode. |
| `startUrls` | array | empty | Optional UFCStats event, fight, or fighter detail URLs. |
| `fromDate` | string | empty | Inclusive event date in `YYYY-MM-DD` format. |
| `toDate` | string | empty | Inclusive event date in `YYYY-MM-DD` format. |
| `includeDetails` | boolean | `true` | Include bout cards, fight stat tables, or fighter fight histories. |
| `maxItems` | integer | `10` | Maximum primary records, from 1 to 5,000. |

Only `ufcstats.com` URLs are accepted. An event URL in fight mode expands into its bouts. Date filters apply to both discovered and explicit event inputs.

### Getting started

1. Open the Actor input page.
2. Select **Events**, **Fights**, or **Fighter profiles**.
3. Optionally enter a fighter name, date range, or specific UFCStats URLs.
4. Set the maximum number of records.
5. Run the Actor.
6. Download the default dataset as JSON, CSV, Excel, XML, or another supported Apify format.

A useful first run is:

```json
{
  "mode": "events",
  "eventStatus": "completed",
  "includeDetails": true,
  "maxItems": 5
}
```

### Real output examples

A fight record has this shape:

```json
{
  "recordType": "fight",
  "sourceId": "c13dc0cccef263f7",
  "url": "http://ufcstats.com/fight-details/c13dc0cccef263f7",
  "fighters": [
    {
      "id": "c814b4c899793af6",
      "name": "Rafael Fiziev",
      "result": "W"
    },
    {
      "id": "2e7878927067fdca",
      "name": "Manuel Torres",
      "result": "L"
    }
  ],
  "weightClass": "Lightweight",
  "method": "KO/TKO",
  "round": 2,
  "time": "0:15",
  "totals": {
    "Rafael Fiziev": {
      "KD": "1",
      "Sig. str.": "25 of 39",
      "Td": "2 of 2"
    }
  }
}
```

Event and fighter records use the same default dataset but expose fields appropriate to their `recordType`. Fields unavailable on UFCStats are returned as `null` or omitted.

### How much does it cost to export UFC statistics?

The Actor uses pay-per-event pricing:

- a one-time **$0.005 start fee** per run;
- an item charge for each event, fight, or fighter record saved to the dataset.

At the BRONZE tier the item price is **$0.04516 per record**. For example:

| Records | BRONZE calculation | Approximate charge |
| ---: | ---: | ---: |
| 1 | 0.005 + 1 × 0.04516 USD | 0.05016 USD |
| 10 | 0.005 + 10 × 0.04516 USD | 0.45660 USD |
| 100 | 0.005 + 100 × 0.04516 USD | 4.52100 USD |
| 1,000 | 0.005 + 1,000 × 0.04516 USD | 45.16500 USD |

Higher subscription tiers receive lower per-record prices. Apify platform compute usage is included through the Actor's pay-per-event model; the displayed run charge is governed by your active pricing tier.

### Schedule event and fighter monitoring

Create an Apify Schedule with a stable input, such as a completed-events export or a fighter name. Store each run's dataset in your destination and compare stable `id` fields to detect:

- newly listed events;
- changes to an upcoming card;
- completed bout outcomes;
- additions to a fighter's history;
- changes to a displayed fighter record or career rate.

The Actor itself returns current public UFCStats records. It does not send alerts or maintain a historical change database.

### Integrations and export workflows

Send results to:

- Google Sheets for editorial planning;
- a database or warehouse for sports analysis;
- webhooks for downstream enrichment;
- Make, Zapier, or n8n for no-code workflows;
- Python, R, or notebooks for model and visualization work.

Use stable source IDs for deduplication. Keep `scrapedAt` as collection metadata rather than an event timestamp.

### Run with the Apify API

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~ufc-events-fights-fighters/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"fighters","fighterSearch":"Anthony Hernandez","maxItems":1}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/ufc-events-fights-fighters').call({
  mode: 'fights',
  eventStatus: 'completed',
  includeDetails: true,
  maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/ufc-events-fights-fighters').call(run_input={
    'mode': 'events',
    'eventStatus': 'upcoming',
    'includeDetails': True,
    'maxItems': 10,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with Apify MCP

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/ufc-events-fights-fighters"
```

#### Claude Desktop, Cursor, and VS Code

Claude Desktop, Cursor, and VS Code can use this equivalent remote MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/ufc-events-fights-fighters"
    }
  }
}
```

Example prompts:

- “Export the five most recent completed UFC events with bout cards.”
- “Get detailed stats for this UFCStats fight URL and summarize the striking difference.”
- “Fetch Anthony Hernandez's profile and fight history as structured JSON.”

### Limits

Large detail runs make one or more source requests per result. Use sensible limits and schedules. The Actor runs sequentially at conservative request volume to reduce source load.

### Legality and responsible use

The Actor reads public UFCStats pages. It does not provide video, live round-by-round feeds, betting odds, unofficial predictions, or data from other MMA promotions unless UFCStats displays those records.

Respect UFCStats terms, applicable law, database rights, and personal-data rules. Do not use the data for harassment, deceptive publishing, or decisions that require an official governing-body record. Verify high-stakes facts against the original source linked in each item.

### Troubleshooting

#### Why did my run return no records?

Check that the selected mode matches the supplied URL or filter. A fighter name is matched against UFCStats' fighter directory. Date ranges may naturally contain no events.

#### Why did the run fail instead of returning an empty dataset?

A changed browser challenge, HTTP error, or unrecognized page shape is treated as an upstream error. This prevents challenge HTML from being mistaken for a valid empty result. Retry later; if the failure persists, include the run link in a support report.

#### Why are some fight fields null?

Upcoming bouts do not yet have an outcome, method, totals, or significant-strike table. Historical pages may also omit individual values.

### FAQ

#### Is this an official UFC API?

No. It is an independent Apify Actor that normalizes public pages from UFCStats. It is not affiliated with or endorsed by UFC.

#### Can I scrape one fight or fighter URL?

Yes. Supply a matching UFCStats detail URL in `startUrls` and select the corresponding mode.

#### Can I fetch upcoming cards?

Yes. Use event mode with `eventStatus: "upcoming"`. Upcoming fights naturally lack result statistics.

#### Does `maxItems` count nested bouts?

In event mode it counts event records. In fight mode it counts fight records. In fighter mode it counts fighter records. Nested bout histories are included with their parent and are not separately charged.

#### Are nested records charged separately?

No. Only each primary dataset item triggers the `item` event. Event bout cards and fighter fight histories included inside that record have no separate item charge.

### Related Actors

For another structured sports dataset from automation-lab, see [FIFA World Cup 2026 Data](https://apify.com/automation-lab/fifa-world-cup-2026-data). Use it for official World Cup fixtures rather than UFCStats records.

# Actor input Schema

## `mode` (type: `string`):

Choose event records, individual fight records, or fighter profile records.

## `eventStatus` (type: `string`):

Select completed events, upcoming events, or both. Used by event discovery and fight discovery.

## `fighterSearch` (type: `string`):

Optional full or partial fighter name for fighter mode, for example Anthony Hernandez.

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

Optional ufcstats.com event, fight, or fighter detail URLs. URLs must match the selected record type; event URLs can be expanded into fights.

## `fromDate` (type: `string`):

Optional inclusive event date in YYYY-MM-DD format.

## `toDate` (type: `string`):

Optional inclusive event date in YYYY-MM-DD format.

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

Fetch event bout cards, fight totals and significant-strike tables, or fighter fight histories.

## `maxItems` (type: `integer`):

Maximum event, fight, or fighter records saved to the dataset.

## Actor input object example

```json
{
  "mode": "events",
  "eventStatus": "completed",
  "startUrls": [],
  "includeDetails": true,
  "maxItems": 10
}
```

# Actor output Schema

## `dataset` (type: `string`):

Event, fight, or fighter records from this 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 = {
    "mode": "events",
    "eventStatus": "completed",
    "fighterSearch": "",
    "startUrls": [],
    "includeDetails": true,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/ufc-events-fights-fighters").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 = {
    "mode": "events",
    "eventStatus": "completed",
    "fighterSearch": "",
    "startUrls": [],
    "includeDetails": True,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/ufc-events-fights-fighters").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 '{
  "mode": "events",
  "eventStatus": "completed",
  "fighterSearch": "",
  "startUrls": [],
  "includeDetails": true,
  "maxItems": 10
}' |
apify call automation-lab/ufc-events-fights-fighters --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/ufc-events-fights-fighters"
        }
    }
}

```

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/BMWHMUa9h4c1onKbL/builds/BStzKTnvtcIM3vKdh/openapi.json
