{
  "openapi": "3.0.1",
  "info": {
    "title": "Sherdog Fight History - MMA Fighter Records & Event Cards",
    "description": "MMA fighter records and full event cards from Sherdog: wins, losses, draws and no contests, every pro fight with opponent, result, method, round, time, date and event, plus height, weight, gym and nationality. UFC, PFL, Bellator, ONE, Rizin or any promotion. Monitoring returns only new fights.",
    "version": "0.1",
    "x-build-id": "IjBu46wrWUd0c7Z8p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~sherdog-fight-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-sherdog-fight-history",
        "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~sherdog-fight-history/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-sherdog-fight-history",
        "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~sherdog-fight-history/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-sherdog-fight-history",
        "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 bout on an event card, with both fighters, the winner, method, round and time (the default). events = one row per event. fighters = one row per fighter, with the pro record, height, weight, gym, nationality and the full fight history.",
            "default": "fights"
          },
          "organizations": {
            "title": "Organizations",
            "type": "array",
            "description": "UFC, PFL, Bellator, ONE or Rizin by name, or any promotion's Sherdog URL (for example https://www.sherdog.com/organizations/Professional-Fighters-League-12241). Its newest events are read. When nothing at all is given, the newest UFC events are read.",
            "items": {
              "type": "string"
            }
          },
          "maxEvents": {
            "title": "How many events per organization",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Events are read newest first. A big card holds roughly 10-15 bouts. In Fighters mode, every fighter on these cards is read.",
            "default": 3
          },
          "startUrls": {
            "title": "Sherdog URLs",
            "type": "array",
            "description": "Optional. Fighter, event or organization pages from sherdog.com, for example https://www.sherdog.com/fighter/Jon-Jones-27944 or https://www.sherdog.com/events/UFC-309-Jones-vs-Miocic-103896. Event URLs give the full card; fighter URLs give the record (set What to collect to Fighters).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "fighterNames": {
            "title": "Fighter names",
            "type": "array",
            "description": "In Fighters mode: fighters to look up by name on Sherdog (exact name, accents and capital letters ignored). In the other modes: keep only bouts that involve one of these fighters (partial match).",
            "items": {
              "type": "string"
            }
          },
          "includeUpcoming": {
            "title": "Include upcoming events",
            "type": "boolean",
            "description": "Off: only events that have happened are read from an organization. On: the announced upcoming cards come first, with empty result columns that fill in once the event is over.",
            "default": false
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 20000,
            "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
          },
          "weightClasses": {
            "title": "Weight classes",
            "type": "array",
            "description": "Keep only records in these weight classes (for example Lightweight, Women's Strawweight). Matching is case-insensitive and partial.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only records whose event name, bout, fighter names, location, method, gym or nationality 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.",
            "items": {
              "type": "string"
            }
          },
          "monitoringMode": {
            "title": "Only return what changed since the last run",
            "type": "boolean",
            "description": "Fighters mode: only fighters with a new fight on their record. Fights mode: new bouts, and bouts whose result has been filled in. Events mode: new events, and events that have now taken place. Nothing is charged twice for the same state.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was already returned",
            "type": "boolean",
            "description": "Clears that memory once, so this run returns everything again.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "A hard ceiling on how many pages this run may fetch from sherdog.com. Pages are read one at a time with a pause, so the site sees no more than a person browsing.",
            "default": 200
          },
          "useProxy": {
            "title": "Use an Apify proxy",
            "type": "boolean",
            "description": "Off by default: sherdog.com answers a plain connection. Turn this on only if you see pages failing to load.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}