# UFCStats Scraper (`automation-lab/ufcstats-scraper`) Actor

Extract UFCStats events, fight results, detailed bout stats, and fighter profiles for MMA analysis from public UFCStats pages.

- **URL**: https://apify.com/automation-lab/ufcstats-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 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 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

## UFCStats Scraper

Extract UFCStats events, fight results, detailed bout statistics, and fighter profile records from public UFCStats pages.

### What does UFCStats Scraper do?

UFCStats Scraper turns UFCStats HTML pages into structured Apify datasets. It can start from the completed events index, a single event page, a fight detail page, or a fighter profile page.

Use it to collect event metadata, matchup rows, result methods, round and time values, significant strike totals, takedowns, submissions, and normalized fighter profile statistics.

### Who is it for?

- 🥊 MMA analysts building historical fight datasets
- 📰 Sports media teams preparing card previews and post-fight recaps
- 📈 Fantasy and betting modelers who need repeatable UFCStats exports
- 🧪 Researchers studying fight outcomes, methods, rounds, and athlete profiles
- 🧰 Data engineers who want UFCStats records in JSON, CSV, Excel, or via API

### Why use this UFCStats extractor?

UFCStats pages are public but spread across event, fight, and fighter detail pages. This actor follows links for you and emits normalized records with a `recordType` field, so you can filter `event`, `fight`, and `fighter` rows after export.

### What data can you extract?

| Record type | Example fields |
| --- | --- |
| Event | `eventName`, `eventDate`, `eventLocation`, `eventUrl` |
| Fight | `redFighter`, `blueFighter`, `winner`, `weightClass`, `method`, `round`, `time`, `kdRed`, `kdBlue`, `sigStrRed`, `sigStrBlue`, `tdRed`, `tdBlue` |
| Fighter | `fighterName`, `fighterNickname`, `fighterRecord`, `height`, `weight`, `reach`, `stance`, `slpm`, `sapm`, `takedownAverage` |

### How much does it cost to scrape UFCStats?

This actor uses pay-per-event pricing. You pay a small start charge per run and a per-item charge for each dataset record saved. Keep `maxEvents` and `maxFightsPerEvent` low for smoke tests, then increase them for full data refreshes.

### Quick start

1. Open the actor on Apify.
2. Keep the default completed events URL or paste your own UFCStats URL.
3. Choose `maxEvents` and `maxFightsPerEvent`.
4. Decide whether to include fighter profile pages.
5. Run the actor.
6. Download results from the Dataset tab.

### Input options

- `startUrls` — UFCStats completed events, event detail, fight detail, or fighter detail URLs.
- `maxEvents` — maximum event pages to process from the event list.
- `maxFightsPerEvent` — maximum fight rows per event.
- `includeFighterProfiles` — whether to crawl linked fighter profile pages.

### Example input

```json
{
  "startUrls": [
    { "url": "http://ufcstats.com/statistics/events/completed?page=all" }
  ],
  "maxEvents": 5,
  "maxFightsPerEvent": 10,
  "includeFighterProfiles": true
}
````

### Output example

```json
{
  "recordType": "fight",
  "eventName": "UFC Fight Night: Fiziev vs. Torres",
  "eventDate": "June 27, 2026",
  "redFighter": "Shara Magomedov",
  "blueFighter": "Michel Pereira",
  "winner": "Shara Magomedov",
  "weightClass": "Middleweight",
  "method": "U-DEC",
  "round": 3,
  "time": "5:00",
  "sourceUrl": "http://ufcstats.com/fight-details/012c307c9d446c4d"
}
```

### Record types

Every row includes `recordType`:

- `event` rows summarize UFCStats event pages.
- `fight` rows summarize one bout.
- `fighter` rows summarize one athlete profile.

### Tips for reliable runs

- Start with `maxEvents: 1` while testing workflows.
- Increase `maxFightsPerEvent` for complete cards.
- Use specific event URLs when you only need one card.
- Disable fighter profiles when you only need fight rows.
- Export CSV for spreadsheet workflows and JSON for model pipelines.

### Integrations

Use the output with:

- Google Sheets and Excel for card research
- BigQuery, Snowflake, or Postgres for historical fight databases
- Python notebooks for MMA modeling
- BI dashboards for event/fighter summaries
- Newsroom workflows for fight card previews

### API usage with Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/ufcstats-scraper').call({
  maxEvents: 3,
  maxFightsPerEvent: 10,
  includeFighterProfiles: true
});
console.log(run.defaultDatasetId);
```

### API usage with Python

```python
from apify_client import ApifyClient

client = ApifyClient('MY-APIFY-TOKEN')
run = client.actor('automation-lab/ufcstats-scraper').call(run_input={
    'maxEvents': 3,
    'maxFightsPerEvent': 10,
    'includeFighterProfiles': True,
})
print(run['defaultDatasetId'])
```

### API usage with cURL

```bash
curl "https://api.apify.com/v2/acts/automation-lab~ufcstats-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"maxEvents":3,"maxFightsPerEvent":10,"includeFighterProfiles":true}'
```

### MCP usage

Connect this actor through the Apify MCP server using:

`https://mcp.apify.com/?tools=automation-lab/ufcstats-scraper`

Claude Code setup:

```bash
claude mcp add apify-ufcstats "https://mcp.apify.com/?tools=automation-lab/ufcstats-scraper"
```

Claude Desktop JSON config:

```json
{
  "mcpServers": {
    "apify-ufcstats": {
      "url": "https://mcp.apify.com/?tools=automation-lab/ufcstats-scraper"
    }
  }
}
```

Example prompts:

- "Run the UFCStats scraper for the last 3 completed events and summarize fight methods."
- "Extract fighter profiles linked from the latest UFCStats card."
- "Create a CSV of fight rows with winner, method, round, and time."

### Start URL examples

- Completed events list: `http://ufcstats.com/statistics/events/completed?page=all`
- Event detail: `http://ufcstats.com/event-details/...`
- Fight detail: `http://ufcstats.com/fight-details/...`
- Fighter profile: `http://ufcstats.com/fighter-details/...`

### Data quality notes

UFCStats can publish upcoming or recently updated event rows. The actor skips future-dated events when crawling the completed events list, but it will process a specific URL if you provide it directly.

### Legality

This actor extracts publicly available UFCStats pages. Use the data responsibly, respect the source website, and ensure your downstream usage complies with applicable laws and terms.

### FAQ

#### Why did I get fewer rows than expected?

Check `maxEvents`, `maxFightsPerEvent`, and `includeFighterProfiles`. Disabling profiles greatly reduces output volume.

#### Can I scrape one card only?

Yes. Paste the event detail URL into `startUrls` and set `maxFightsPerEvent` to the number of fights you need.

#### Does this require a browser?

No. The actor uses HTTP requests and handles the lightweight UFCStats challenge without Playwright.

### Related scrapers

Explore other Automation Lab sports and data actors at `https://apify.com/automation-lab/`.

### Changelog

- 0.1 — Initial UFCStats events, fights, and fighter profile extractor.

### Support

If you need a field added or see a UFCStats page that is not parsed correctly, open an issue on the Apify actor page with the run URL and input.

### Dataset export formats

Apify datasets can be downloaded as JSON, JSONL, CSV, Excel, XML, RSS, or HTML table. For MMA modeling, JSONL and CSV are usually the most convenient formats.

### Suggested workflows

- Refresh the latest completed events every week.
- Store fight rows in a warehouse keyed by `fightUrl`.
- Join fighter rows to fight rows using `fighterUrl`.
- Track method and round distributions over time.
- Build fighter-level aggregates from repeated profile exports.

### Field reference

Event fields include event name, event date, event location, event URL, source URL, and scrape timestamp.

Fight fields include event context, fighter names, fighter URLs, winner, result status, weight class, method, round, time, knockdowns, strikes, takedowns, submissions, and detail metadata when available.

Fighter fields include name, nickname, record, height, weight, reach, stance, date of birth, striking rates, striking accuracy, takedown rates, takedown defense, and submission average.

### Performance

The actor is HTTP based and avoids browser overhead. Larger runs mostly scale with the number of event, fight, and fighter pages requested.

### Best practices

Keep default runs small, validate the output shape, and then increase limits for scheduled production refreshes.

# Actor input Schema

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

Optional UFCStats event list, event detail, fight detail, or fighter detail URLs. Leave empty to crawl recent completed events.

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

Maximum number of events to crawl when starting from the completed events list.

## `maxFightsPerEvent` (type: `integer`):

Maximum fight rows to extract from each event page.

## `includeFighterProfiles` (type: `boolean`):

Also crawl linked fighter profile pages for height, stance, record, and career statistics.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "http://ufcstats.com/statistics/events/completed?page=all"
    }
  ],
  "maxEvents": 3,
  "maxFightsPerEvent": 15,
  "includeFighterProfiles": true
}
```

# Actor output Schema

## `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 = {
    "startUrls": [
        {
            "url": "http://ufcstats.com/statistics/events/completed?page=all"
        }
    ],
    "maxEvents": 3,
    "maxFightsPerEvent": 15,
    "includeFighterProfiles": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/ufcstats-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 = {
    "startUrls": [{ "url": "http://ufcstats.com/statistics/events/completed?page=all" }],
    "maxEvents": 3,
    "maxFightsPerEvent": 15,
    "includeFighterProfiles": True,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/ufcstats-scraper").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 '{
  "startUrls": [
    {
      "url": "http://ufcstats.com/statistics/events/completed?page=all"
    }
  ],
  "maxEvents": 3,
  "maxFightsPerEvent": 15,
  "includeFighterProfiles": true
}' |
apify call automation-lab/ufcstats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/ufcstats-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UFCStats Scraper",
        "description": "Extract UFCStats events, fight results, detailed bout stats, and fighter profiles for MMA analysis from public UFCStats pages.",
        "version": "0.1",
        "x-build-id": "PUavzFGKfKWOn1VYr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~ufcstats-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-ufcstats-scraper",
                "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/automation-lab~ufcstats-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-ufcstats-scraper",
                "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/automation-lab~ufcstats-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-ufcstats-scraper",
                "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",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Optional UFCStats event list, event detail, fight detail, or fighter detail URLs. Leave empty to crawl recent completed events.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxEvents": {
                        "title": "Maximum events",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of events to crawl when starting from the completed events list.",
                        "default": 3
                    },
                    "maxFightsPerEvent": {
                        "title": "Maximum fights per event",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum fight rows to extract from each event page.",
                        "default": 15
                    },
                    "includeFighterProfiles": {
                        "title": "Include fighter profiles",
                        "type": "boolean",
                        "description": "Also crawl linked fighter profile pages for height, stance, record, and career statistics.",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
