Skip to content

Guides

How do I get UFC fight stats per round in Python?

One fight with the full stat sheet for both fighters and a row per fighter per round: strikes landed and attempted by target and range, takedowns and control time.

Code verified October 10, 2026. One call to get_fight, 5 credits.

The call

bout_id comes from get_event or get_fighter_fights.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

resp = requests.post(
    "https://mcp.fighterapi.com/v1/get_fight",
    headers={"x-api-key": API_KEY},
    json={
        "bout_id": "401863575",
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

rounds = pd.DataFrame(data["rounds"])
print(data["bout"]["event_name"], data["bout"]["method_display"], "round", data["bout"]["end_round"])
print(rounds.pivot(index="round", columns="fighter_name", values="sig_landed"))
rounds["sig_accuracy"] = rounds["sig_landed"] / rounds["sig_attempted"]
print(rounds[["fighter_name", "round", "sig_landed", "sig_attempted", "sig_accuracy", "head_landed", "td_landed", "control_seconds"]].round(2))

Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.

What comes back

The data object of the response, trimmed to the first rows. Every field is real output from the run above.

{
  "bout": {
    "bout_id": "401863575",
    "event_id": "600058854",
    "event_name": "UFC Freedom 250: Topuria vs. Gaethje",
    "event_date": "2026-06-14",
    "starts_at": "2026-06-15T00:00:00.000Z",
    "weight_class": "Lightweight",
    "card_segment": "main",
    "match_number": 1,
    "title_fight": true,
    "scheduled_rounds": 5,
    "status": "final",
    "fighter_a": "4350812",
    "fighter_a_name": "Ilia Topuria",
    "fighter_b": "3022345",
    "fighter_b_name": "Justin Gaethje",
    "winner": "3022345",
    "method": "kotko",
    "method_display": "KO/TKO",
    "end_round": 4,
    "end_clock": "5:00",
    "duration_seconds": 1200,
    "judges_scores": null,
    "referee": "Marc Goddard"
  },
  "fighters": [
    {
      "fighter_id": "4350812",
      "name": "Ilia Topuria",
      "elo": {
        "before": 1670,
        "after": 1655
      }
    },
    {
      "fighter_id": "3022345",
      "name": "Justin Gaethje",
      "elo": {
        "before": 1618,
        "after": 1634
      }
    }
  ],
  "rounds": [
    {
      "fighter_name": "Ilia Topuria",
      "round": 1,
      "knock_downs": 0,
      "sig_landed": 29,
      "sig_attempted": 58,
      "td_landed": 0,
      "td_attempted": 0,
      "control_seconds": 0,
      "head_landed": 19,
      "body_landed": 7,
      "leg_landed": 3
    },
    {
      "fighter_name": "Justin Gaethje",
      "round": 1,
      "knock_downs": 0,
      "sig_landed": 32,
      "sig_attempted": 68,
      "td_landed": 0,
      "td_attempted": 3,
      "control_seconds": 0,
      "head_landed": 30,
      "body_landed": 2,
      "leg_landed": 0
    },
    "...6 more"
  ],
  "odds": []
}

What to do next

  • get_fighter_fights (5 credits). A fighter's full UFC history with the same stats, ratings and closing lines.
  • get_odds (5 credits). Opening, closing and current moneylines for the fight.

More guides

Start with 500 free credits

No card. REST or MCP.