{
  "openapi": "3.0.1",
  "info": {
    "title": "UFC Stats Scraper: MMA Fights, Fighters, Events, Round-by-Round",
    "description": "For MMA betting models, fantasy tools and analytics: official ufcstats.com data covering 788 events back to UFC 2 in March 1994. Every fight round by round, with significant strikes split by head, body and leg and by distance, clinch and ground, takedowns, control time and judges' scorecards.",
    "version": "0.1",
    "x-build-id": "PhK8NUgao3d6Bcrmb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~ufc-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-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/neverempty~ufc-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-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/neverempty~ufc-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "fights",
              "events",
              "fighters"
            ],
            "type": "string",
            "description": "fights = one row per fight, with the round-by-round strike breakdown (the default). events = one row per UFC event. fighters = one row per fighter, with career stats and fight history.",
            "default": "fights"
          },
          "maxEvents": {
            "title": "How many events to read",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Events are read newest first. Each event holds roughly 10-14 fights. Ignored when you give your own URLs below.",
            "default": 3
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most rows this run may return and charge for. When the limit cuts the result, rows are taken evenly from every event, so no event disappears completely, and a free row tells you what was left out.",
            "default": 100
          },
          "fetchFightDetails": {
            "title": "Open each fight page (round-by-round stats)",
            "type": "boolean",
            "description": "On: one extra request per fight, and you get per-round significant strikes split by target (head/body/leg) and position (distance/clinch/ground), control time, referee and the judges' scorecards. Off: only the totals shown on the event page (faster and cheaper in platform usage).",
            "default": true
          },
          "includeUpcoming": {
            "title": "Include upcoming events",
            "type": "boolean",
            "description": "UFCStats puts the next event at the top of its completed-events list. It has no results yet, so it is skipped by default. Turn this on to get the announced card (fighter names and weight class, with empty result columns).",
            "default": false
          },
          "startUrls": {
            "title": "UFCStats URLs",
            "type": "array",
            "description": "Optional. Event, fight or fighter URLs from ufcstats.com (for example http://ufcstats.com/event-details/2144954270be834d). When set, only these are read and the event count above is ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "letters": {
            "title": "Fighter last-name letters",
            "type": "array",
            "description": "Fighters mode only. Which letters of the alphabet index to walk. Empty means the letter A.",
            "items": {
              "type": "string"
            }
          },
          "weightClasses": {
            "title": "Weight classes",
            "type": "array",
            "description": "Keep only fights in these weight classes (for example Lightweight, Women's Flyweight). Matching is case-insensitive and partial.",
            "items": {
              "type": "string"
            }
          },
          "fighterNames": {
            "title": "Fighter names",
            "type": "array",
            "description": "Keep only records that involve one of these fighters. Matching is case-insensitive and partial.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only records whose event name, bout, weight class, fighter names, location or method contain these words.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any = at least one keyword must appear. all = every keyword must appear.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop records containing any of these words. Applied to the same fields as Keywords above, and also to the fighter and event names.",
            "items": {
              "type": "string"
            }
          },
          "monitoringMode": {
            "title": "Only return records that are new since the last run",
            "type": "boolean",
            "description": "Remembers the ids this Actor has already returned and skips them next time. Filtering happens before this, so a record you filtered out is not held back for later.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was already returned",
            "type": "boolean",
            "description": "Clears that memory once, so the next run returns everything again.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "A hard ceiling on how many pages this run may fetch from ufcstats.com. It protects the site (and your platform usage) even when a filter matches almost nothing.",
            "default": 300
          },
          "useProxy": {
            "title": "Use an Apify proxy if the site asks for one",
            "type": "boolean",
            "description": "Off by default: ufcstats.com answers a plain connection, and this Actor solves its browser check itself. Turn this on only if you see the browser check failing.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}