{
  "openapi": "3.0.1",
  "info": {
    "title": "UFC Scraper - Fighters, Fights, Events and Rankings",
    "description": "[$5.00 / 1K, no start fee] Every UFC fighter, bout, event and division ranking from ufc.com, normalized: records split into W-L-D, heights and reaches in cm as well as inches, and one row per bout instead of fights buried in an array. Optional bout-by-bout career history per fighter.",
    "version": "0.1",
    "x-build-id": "fiqNydRLc474GAwwP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webdata_labs~ufc-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webdata_labs-ufc-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/webdata_labs~ufc-scraper/runs": {
      "post": {
        "operationId": "runs-sync-webdata_labs-ufc-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/webdata_labs~ufc-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-webdata_labs-ufc-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": {
          "dataType": {
            "title": "What to scrape",
            "enum": [
              "rankings",
              "fighters",
              "events",
              "fights"
            ],
            "type": "string",
            "description": "Which UFC dataset to return. Rankings is one request and covers every division, so it is the fastest and cheapest place to start. Fights returns one row per bout instead of one row per event, which is the shape you want in a spreadsheet or a model.",
            "default": "rankings"
          },
          "searchTerms": {
            "title": "Fighter or event names",
            "type": "array",
            "description": "Names to look up, one per line - for example \"Jon Jones\" or \"UFC 300\". UFC's own search is a loose match, so a surname can return several athletes; the exact name match is always delivered first. Leave empty to sweep the roster or the events board instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "ufc.com URLs",
            "type": "array",
            "description": "Paste ufc.com athlete or event URLs to scrape exactly those pages, skipping search entirely - for example https://www.ufc.com/athlete/jon-jones or https://www.ufc.com/event/ufc-300. Anything that is not a /athlete/ or /event/ URL is reported in the log and skipped.",
            "items": {
              "type": "string"
            }
          },
          "division": {
            "title": "Weight division",
            "enum": [
              "",
              "Flyweight",
              "Bantamweight",
              "Featherweight",
              "Lightweight",
              "Welterweight",
              "Middleweight",
              "Light Heavyweight",
              "Heavyweight",
              "Women's Strawweight",
              "Women's Flyweight",
              "Women's Bantamweight",
              "Women's Featherweight",
              "Pound-for-Pound"
            ],
            "type": "string",
            "description": "Keep only fighters, rankings or bouts in this division. Note that Light Heavyweight and Heavyweight are separate divisions and never match each other, and the women's divisions are listed separately.",
            "default": ""
          },
          "gender": {
            "title": "Men's or women's divisions",
            "enum": [
              "",
              "male",
              "female"
            ],
            "type": "string",
            "description": "Keep only men's or only women's divisions. Applies to fighters and rankings.",
            "default": ""
          },
          "fighterStatus": {
            "title": "Fighter status",
            "enum": [
              "",
              "active",
              "not fighting",
              "retired"
            ],
            "type": "string",
            "description": "Keep only fighters with this roster status. UFC states status on the profile page rather than in its search, so this filter reads each fighter's profile - it turns detail fetching on automatically.",
            "default": ""
          },
          "country": {
            "title": "Country of birth",
            "type": "string",
            "description": "Keep only fighters born in this country, matched against the country UFC prints on the profile - for example \"Brazil\", \"United States\", \"Russia\". Like the status filter, this reads each profile page."
          },
          "eventType": {
            "title": "Upcoming or past events",
            "enum": [
              "all",
              "upcoming",
              "past"
            ],
            "type": "string",
            "description": "Which side of the events board to read. Past events carry winners, methods, rounds and end times; upcoming events carry the announced matchups only.",
            "default": "all"
          },
          "titleFightsOnly": {
            "title": "Only title fights",
            "type": "boolean",
            "description": "Keep only championship bouts. Applies to the Fights data type, where it is read from the bout's own weight-class label, so it costs nothing extra to apply.",
            "default": false
          },
          "includeDetails": {
            "title": "Fetch full detail pages",
            "type": "boolean",
            "description": "On: each fighter's career statistics and each event's full fight card are fetched. Off: only what the listing card carries (name, nickname, division, record for fighters; title, date and venue for events), which is much faster for a roster sweep.",
            "default": true
          },
          "includeFightHistory": {
            "title": "Include each fighter's fight history",
            "type": "boolean",
            "description": "Add a bout-by-bout career history to every fighter row - opponent, date, result, method, round and end time. UFC pages this list three bouts at a time, so a long career costs several extra requests per fighter.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows. Set 0 for no limit. The default keeps an exploratory run small and cheap; there is no hard ceiling, so a large job is simply a choice you make.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}