{
  "openapi": "3.0.1",
  "info": {
    "title": "UFC Stats Scraper - Official Fight Stats, Results & Odds",
    "description": "UFC's official fight stats since 1993: every fight's result, judges' scores, both fighters' strikes, takedowns and control time (also per round), plus upcoming cards and moneyline odds.",
    "version": "0.1",
    "x-build-id": "rHkpBYM7MLrWFxt8A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artsiom_k~ufc-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artsiom_k-ufc-stats-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/artsiom_k~ufc-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artsiom_k-ufc-stats-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/artsiom_k~ufc-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artsiom_k-ufc-stats-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": {
          "entityType": {
            "title": "Data type",
            "enum": [
              "fights",
              "upcoming",
              "events"
            ],
            "type": "string",
            "description": "\"fights\": completed fights with the result, judges' scores, both fighters and UFC's official stats (strikes by target and position, takedowns, control time...). \"upcoming\": fights on announced cards with the tale of the tape and odds. \"events\": one row per event with a card summary.",
            "default": "fights"
          },
          "promotions": {
            "title": "Promotions",
            "type": "array",
            "description": "Which promotions' events to include. Empty = all of them, including the older cards UFC's database holds (Pride, Strikeforce, WEC, DREAM, Bellator and others).",
            "items": {
              "type": "string",
              "enum": [
                "ufc",
                "contender-series",
                "road-to-ufc",
                "wec",
                "strikeforce",
                "pride",
                "bellator",
                "other"
              ],
              "enumTitles": [
                "UFC",
                "Dana White's Contender Series",
                "Road to UFC",
                "WEC",
                "Strikeforce",
                "Pride",
                "Bellator",
                "Other promotions"
              ]
            },
            "default": [
              "ufc"
            ]
          },
          "dateFrom": {
            "title": "Events from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only events on or after this date (local event date). Data goes back to 1993."
          },
          "dateTo": {
            "title": "Events to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only events on or before this date."
          },
          "fighter": {
            "title": "Fighter name",
            "type": "string",
            "description": "Only fights with a fighter whose name contains this text (e.g. \"Makhachev\" or \"Alex Pereira\"). Case-insensitive."
          },
          "weightClasses": {
            "title": "Weight classes",
            "type": "array",
            "description": "Only fights in these weight classes, by full name or abbreviation (Lightweight or LW, Women's Strawweight or WSW, Light Heavyweight or LHW...). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "titleFightsOnly": {
            "title": "Title fights only",
            "type": "boolean",
            "description": "Only championship (belt) fights.",
            "default": false
          },
          "events": {
            "title": "Specific events",
            "type": "array",
            "description": "Only these events: ufc.com event URLs (https://www.ufc.com/event/ufc-322) or UFC event ids. Replaces the date and promotion selection.",
            "items": {
              "type": "string"
            }
          },
          "includeRounds": {
            "title": "Round-by-round stats",
            "type": "boolean",
            "description": "Completed fights: add each fighter's stats per round (red_rounds, blue_rounds) next to the fight totals.",
            "default": false
          },
          "includeOdds": {
            "title": "Include odds",
            "type": "boolean",
            "description": "Add the moneyline odds ufc.com shows for each fight (red_odds, blue_odds, American format). Available for fights from about 2008 on.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after pushing this many rows. Defaults to 50 - a fast, cheap preview of the newest fights. Set to null for everything in your selection.",
            "default": 50
          },
          "mode": {
            "title": "Incremental mode",
            "enum": [
              "auto",
              "full",
              "incremental"
            ],
            "type": "string",
            "description": "\"incremental\" returns only rows that are new or changed since the last complete run of the same selection: new results for fights, card changes (opponent, odds, card position) for upcoming fights, plus upcoming bouts that were cancelled (delisted). \"auto\" is incremental when Max results is cleared and an earlier run exists.",
            "default": "auto"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requests in flight at once.",
            "default": 8
          },
          "impersonate": {
            "title": "TLS impersonation target",
            "enum": [
              "chrome",
              "firefox",
              "safari"
            ],
            "type": "string",
            "description": "Browser TLS fingerprint. Change only if requests are blocked.",
            "default": "chrome"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Not needed: UFC's data feed is open.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}