How do I get PFL odds and results for a card in Python?
Every fight on a PFL card with each sportsbook's opening and closing moneyline next to the winner and method. Favourites won 6 of the 9 priced fights on this card.
Code verified November 18, 2026. One call to get_odds, 5 credits.
The call
event_id comes from list_events with league: "pfl". Use bout_id for one fight. Three or four books priced each fight on this card. Pass league: "bellator" for Bellator cards.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.fighterapi.com/v1/get_odds",
headers={"x-api-key": API_KEY},
json={
"event_id": "600056091",
"league": "pfl",
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
def implied(odds):
return 100 / (odds + 100) if odds > 0 else -odds / (-odds + 100)
rows = []
for b in data["bouts"]:
books = [x for x in b["books"] if None not in (x["a_open"], x["a_close"], x["b_open"], x["b_close"])]
if not books or b["winner"] is None:
continue
open_a = pd.Series([implied(x["a_open"]) / (implied(x["a_open"]) + implied(x["b_open"])) for x in books]).median()
close_a = pd.Series([implied(x["a_close"]) / (implied(x["a_close"]) + implied(x["b_close"])) for x in books]).median()
a_won = b["winner"] == b["fighter_a"]
rows.append({
"fight": b["fighter_a_name"] + " v " + b["fighter_b_name"],
"books": len(books),
"a_open": open_a,
"a_close": close_a,
"favourite_won": (close_a > 0.5) == a_won,
"method": b["method_display"],
})
df = pd.DataFrame(rows)
print(data["bouts"][0]["event_name"])
print(df.round(3).to_string(index=False))
print("favourite won:", int(df["favourite_won"].sum()), "of", len(df))
print("largest open to close move:", df.loc[(df["a_close"] - df["a_open"]).abs().idxmax(), "fight"])
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.
Or use the official client: pip install fighterapi
What comes back
The data object of the response, trimmed to the first rows. Every field is real output from the run above.
{
"bouts": [
{
"bout_id": "401827987",
"event_id": "600056091",
"event_name": "PFL Lyon: Nemkov vs. Ferreira",
"event_date": "2025-12-13",
"starts_at": "2025-12-13T16:00:00.000Z",
"weight_class": "Heavyweight",
"card_segment": "main",
"match_number": 1,
"title_fight": true,
"scheduled_rounds": 5,
"status": "final",
"fighter_a": "3955014",
"fighter_a_name": "Vadim Nemkov",
"fighter_b": "4408708",
"fighter_b_name": "Renan Ferreira",
"winner": "3955014",
"method": "submission",
"method_display": "Submission",
"end_round": 1,
"end_clock": "4:00",
"duration_seconds": 240,
"judges_scores": null,
"referee": null,
"books": [
{
"provider": "BetMGM",
"a_open": -450,
"a_close": -700,
"a_current": -700,
"b_open": 350,
"b_close": 500,
"b_current": 500,
"a_close_prob": 0.875,
"b_close_prob": 0.16666666666666666,
"total_rounds": null,
"over_odds": null,
"under_odds": null,
"captured_at": "2025-12-13T15:50:37.000Z"
},
"...3 more"
]
},
{
"bout_id": "401831835",
"event_id": "600056091",
"event_name": "PFL Lyon: Nemkov vs. Ferreira",
"event_date": "2025-12-13",
"starts_at": "2025-12-13T16:00:00.000Z",
"weight_class": "Women's Flyweight",
"card_segment": "main",
"match_number": 2,
"title_fight": true,
"scheduled_rounds": 5,
"status": "final",
"fighter_a": "2354564",
"fighter_a_name": "Cris Cyborg",
"fighter_b": "5127785",
"fighter_b_name": "Sara Collins",
"winner": "2354564",
"method": "submission",
"method_display": "Submission",
"end_round": 3,
"end_clock": "2:55",
"duration_seconds": 775,
"judges_scores": null,
"referee": null,
"books": [
{
"provider": "BetMGM",
"a_open": -750,
"a_close": -1200,
"a_current": -1200,
"b_open": 525,
"b_close": 750,
"b_current": 750,
"a_close_prob": 0.9230769230769232,
"b_close_prob": 0.1176470588235294,
"total_rounds": null,
"over_odds": null,
"under_odds": null,
"captured_at": "2025-12-13T15:50:37.000Z"
},
"...2 more"
]
},
"...8 more"
],
"count": 28
}What to do next
- get_line_movement (10 credits). Snapshots of a fight's line, to test the open against the close.
- get_event (2 credits). The whole card with results and methods.
The data this uses
Every row above comes from UFC odds data. Opening and closing moneylines for UFC fights since June 2020, joined to the result and both fighters' stat sheets, with line movement for upcoming fights.
More guides
The same guide for other sports
- PuckAPI: How do I get NHL opening and closing odds by sportsbook in Python?
- EndzoneAPI: How do I backtest NFL closing lines in Python?
- StrikerAPI: How do I get Premier League odds from every sportsbook with the results?
- DunkAPI: How do I backtest NBA closing lines in Python?
- AcesAPI: How do I compare ATP closing odds with the result and Elo in Python?
- BirdieAPI: How do I turn golf major winner odds into probabilities in Python?
- FastballAPI: How do I backtest MLB closing moneylines and run totals in Python?
- YorkerAPI: How do I get historical cricket odds in Python?
The latest lines from every book are on the odds board. Rather ask Claude? 18 free Claude skills call these endpoints for you.
Start with 500 free credits every month
No card. REST or MCP.