# 🥊 UFC Stats Scraper — Fighters, Fights & Events (`hipersoft/ufcstats-scraper`) Actor

Scrape UFC stats: completed events, full fight cards, fighter profiles and career numbers. Export one clean row per event, fight or fighter as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/ufcstats-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0015 / item scraped

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/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

## 🥊 UFC Stats Scraper — Fighters, Fights & Events

Scrape **UFC statistics** from ufcstats.com in bulk and export clean, structured data. Get the full list of completed **UFC events**, every **fight card**, the complete **fighter roster**, and full **career stats** for any fighter — as JSON, CSV or Excel.

Perfect for MMA analysts, data scientists, bettors, journalists, fantasy players and app builders who need reliable, well-typed UFC data without copy-pasting from web pages.

### What you can scrape

- **Events** — the full list of completed UFC events with name, date and location.
- **Event fights** — one clean row per bout on a card: both fighters, result, weight class, method, round, time, plus per-fighter knockdowns, significant strikes, takedowns and submission attempts.
- **Fighters** — the complete A–Z roster with height, weight, reach, stance and win/loss/draw record.
- **Fighter career stats** — a full stat card per fighter: nickname, record, height, weight, reach, stance, date of birth, strikes landed/absorbed per minute, striking accuracy and defense, takedown average/accuracy/defense and submission average.

### Modes

Pick a **mode** in the input:

| Mode | What it does |
| --- | --- |
| `events` | Lists all completed UFC events. Optionally attach each event's full fight card with **Include fight cards**. |
| `event_detail` | Give it one or more event URLs → one row per fight on each card. |
| `fighters` | Scrapes the fighter roster A–Z (or only the letters you choose). |
| `fighter_detail` | Give it one or more fighter URLs → full career stat card for each. |

### Example input

```json
{
  "mode": "events",
  "maxItems": 50
}
```

Scrape the fights on a specific event:

```json
{
  "mode": "event_detail",
  "eventUrls": ["http://www.ufcstats.com/event-details/495add4fbede0a44"],
  "maxItems": 100
}
```

Full career stats for specific fighters:

```json
{
  "mode": "fighter_detail",
  "fighterUrls": ["http://www.ufcstats.com/fighter-details/93fe7332d16c6ad9"]
}
```

### Example output (event fight)

```json
{
  "fightId": "a10deecfb8558335",
  "eventName": "UFC Fight Night: Gamrot vs. Salkilld",
  "eventDate": "August 08, 2026",
  "eventLocation": "Las Vegas, Nevada, USA",
  "fighter1": "Quillan Salkilld",
  "fighter2": "Mateusz Gamrot",
  "result": "win",
  "weightClass": "Lightweight",
  "method": "SUB",
  "methodDetail": "Rear Naked Choke",
  "round": 1,
  "time": "4:25",
  "fighter1Str": 10,
  "fighter2Str": 3,
  "url": "http://www.ufcstats.com/fight-details/a10deecfb8558335"
}
```

### Input reference

| Field | Type | Description |
| --- | --- | --- |
| `mode` | string | `events`, `event_detail`, `fighters` or `fighter_detail`. |
| `includeFights` | boolean | In `events` mode, attach each event's full fight card. |
| `eventUrls` | array | Event URLs for `event_detail` mode. |
| `fighterUrls` | array | Fighter URLs for `fighter_detail` mode. |
| `chars` | array | Roster letters (a–z) for `fighters` mode. Empty = whole roster. |
| `maxItems` | integer | Max rows to collect (0 = no limit). |

### Output & export

Every run writes to a dataset you can download as **JSON, CSV, Excel, XML or RSS**, or pull through the Apify API. Each row is flat and typed, and includes the source `url` so you can trace any record back to the page it came from.

### FAQ

**Which UFC data can I get?** Completed events, full fight cards, the fighter roster, and per-fighter career statistics.

**Can I scrape just one event or one fighter?** Yes — use `event_detail` or `fighter_detail` and paste the URLs.

**What formats can I export?** JSON, CSV, Excel, XML and RSS, plus the Apify API and integrations.

**How do I limit results?** Set `maxItems`. Use `0` to collect everything the selected mode returns.

# Actor input Schema

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

Choose the type of data to collect: the list of completed UFC events, the fights on specific events, the full fighter roster, or full career stats for specific fighters.

## `includeFights` (type: `boolean`):

In Events mode, also load each event page and attach its full fight card to the event row. Slower, but gives every bout in one pass.

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

One or more UFC event URLs (e.g. http://www.ufcstats.com/event-details/…). Each returns one clean row per fight on the card.

## `fighterUrls` (type: `array`):

One or more UFC fighter URLs (e.g. http://www.ufcstats.com/fighter-details/…). Each returns a full career stat card.

## `chars` (type: `array`):

Which last-name initials to collect in Fighters mode (a–z). Leave empty to scrape the whole roster A–Z.

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

Maximum number of rows to collect in this run (0 = no limit; collect everything the selected mode returns).

## Actor input object example

```json
{
  "mode": "events",
  "includeFights": false,
  "eventUrls": [
    "http://www.ufcstats.com/event-details/495add4fbede0a44"
  ],
  "fighterUrls": [
    "http://www.ufcstats.com/fighter-details/93fe7332d16c6ad9"
  ],
  "chars": [
    "a"
  ],
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "eventUrls": [
        "http://www.ufcstats.com/event-details/495add4fbede0a44"
    ],
    "fighterUrls": [
        "http://www.ufcstats.com/fighter-details/93fe7332d16c6ad9"
    ],
    "chars": [
        "a"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = {
    "eventUrls": ["http://www.ufcstats.com/event-details/495add4fbede0a44"],
    "fighterUrls": ["http://www.ufcstats.com/fighter-details/93fe7332d16c6ad9"],
    "chars": ["a"],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/ufcstats-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 '{
  "eventUrls": [
    "http://www.ufcstats.com/event-details/495add4fbede0a44"
  ],
  "fighterUrls": [
    "http://www.ufcstats.com/fighter-details/93fe7332d16c6ad9"
  ],
  "chars": [
    "a"
  ]
}' |
apify call hipersoft/ufcstats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/ufcstats-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/8UPtlyuYhVrdPKy6c/builds/8Ddb8iPWduPX2Pb6M/openapi.json
