UFC
UFC rankings, cards, results, and round-by-round fight stats as SQL tables
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available Β· $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/ufc/index.md to help me query UFC with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
feed_event_1291_main_event
Example output Β· captured
- Connector release
- v0.3.1
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
SELECT winner_name, method, ending_round
FROM ufc.main.fight_results(1291)
WHERE fight_order = 1;
| winner_name | method | ending_round |
|---|---|---|
| Gabriel Bonfim | KO/TKO | 2 |
Quick start
Choose where to run UFC, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'ufc' AS ufc (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-ufc'
);
3. Run a query
SELECT winner_name, method, ending_round
FROM ufc.main.fight_results(1291)
WHERE fight_order = 1;
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connectorβs deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'ufc' AS ufc
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT winner_name, method, ending_round
FROM ufc.main.fight_results(1291)
WHERE fight_order = 1;
Query Farm operates UFC for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use ufc as the catalog alias for the query below.
4. Run a query
SELECT winner_name, method, ending_round
FROM ufc.main.fight_results(1291)
WHERE fight_order = 1;
Technical details
- Verified connector release
- v0.3.1
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until youβre ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'ufc' AS ufc (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-ufc'
);
Overview
Read-only UFC rankings, events, fight cards, results, and fight statistics from UFC's official feed, ufc.com, and ESPN
Query official UFC rankings, event calendars, fight cards, results, judges' scorecards, and round-by-round fight statistics directly from SQL.
Sources and ids
- UFC live-data feed (official): cards, results, per-round statistics. Event and fight ids are sequential integers; discover them with
feed_events(). - ufc.com/rankings (official): current rankings; the UFC events page lists the same cards.
- ESPN MMA (unofficial, undocumented; Disney terms of use): calendars for UFC, PFL and Bellator, bout results, and fighter profiles, histories and per-fight statistics. ESPN ids differ from UFC ids.
All data is fetched on demand, cached briefly in process, and never rehosted. This worker is not affiliated with UFC, TKO Group, ESPN, or Disney.
Catalog
Everything ufc exposes once attached β read straight from the worker's
released build.
main 3 tables Β· 15 functions
UFC rankings, events, cards, results, fight statistics, and fighters
Schema examples (5)
The current lightweight top 15.
SELECT division, rank, fighter_name, rank_change
FROM ufc.main.current_rankings
WHERE division = 'Lightweight'
ORDER BY rank;
Every current UFC champion.
SELECT division, fighter_name, is_interim_champion
FROM ufc.main.current_rankings
WHERE is_champion
ORDER BY division_order;
Fight 12000 round by round: significant strikes landed by each corner next to how many judges scored the round for each corner (red-corner Navajo Stirling outlanded Ivan Erslan 31-12 in round 1 but won it on only one of three cards).
WITH strikes AS (SELECT round_number, max(sig_strikes_landed) FILTER (WHERE corner = 'Red') AS red_landed, max(sig_strikes_landed) FILTER (WHERE corner = 'Blue') AS blue_landed FROM ufc.main.fight_round_stats(12000) GROUP BY round_number), votes AS (SELECT round_number, count(*) FILTER (WHERE red_score > blue_score) AS judges_for_red, count(*) FILTER (WHERE blue_score > red_score) AS judges_for_blue FROM ufc.main.fight_scorecards(12000) GROUP BY round_number) SELECT round_number, red_landed, blue_landed, judges_for_red, judges_for_blue
FROM strikes
JOIN votes USING (round_number)
ORDER BY round_number;
Every result on UFC feed event 1291 with the winner's reach advantage over the loser in inches (negative when the shorter-reach fighter won), from fight_results joined to card_fighters.
SELECT r.fight_order, r.winner_name, r.loser_name, r.method,
w.reach_in - l.reach_in AS winner_reach_edge_in
FROM ufc.main.fight_results(1291) AS r
JOIN ufc.main.card_fighters(1291) AS w ON w.fight_id = r.fight_id AND w.fighter_id = r.winner_fighter_id
JOIN ufc.main.card_fighters(1291) AS l ON l.fight_id = r.fight_id AND l.fighter_id = r.loser_fighter_id
ORDER BY r.fight_order;
1 more example
Fighters on the UFC 324 card (2026-01-24, UFC feed event 1294) who hold a current ufc.com ranking, matched on ufc_athlete_url; a fighter appears once per list they are ranked on.
SELECT c.fighter_name, r.division, r.rank
FROM ufc.main.card_fighters(1294) AS c
JOIN ufc.main.current_rankings AS r USING (ufc_athlete_url)
ORDER BY r.rank, r.division, c.fighter_name;
current_rankings
Official current UFC rankings, one row per fighter per division list
The current lightweight top 15.
SELECT division, rank, fighter_name, rank_change
FROM ufc.main.current_rankings
WHERE division = 'Lightweight'
ORDER BY rank;
Every current UFC champion.
SELECT division, fighter_name, is_interim_champion
FROM ufc.main.current_rankings
WHERE is_champion
ORDER BY division_order;
current_season_events
Every UFC event in the current calendar year, one row per event
This year's UFC events in date order.
SELECT event_id, event_name, start_time, event_state
FROM ufc.main.current_season_events
ORDER BY start_time;
upcoming_events
Scheduled UFC events for this year and next, one row per event
The upcoming UFC schedule.
SELECT event_id, event_name, start_time, city, country, bout_count
FROM ufc.main.upcoming_events
ORDER BY start_time;
all_current_rankings ()
Official current UFC rankings from ufc.com (scan behind current_rankings)
Current champions straight from the backing scan.
SELECT division, rank, fighter_name
FROM ufc.main.all_current_rankings()
WHERE is_champion
ORDER BY division_order;
all_current_season_events ()
Every UFC event in the current calendar year (scan behind current_season_events)
Count this year's finished and scheduled UFC events from the backing scan.
SELECT event_state, count(*) AS events
FROM ufc.main.all_current_season_events()
GROUP BY event_state
ORDER BY event_state;
all_upcoming_events ()
Scheduled UFC events this year and next (scan behind upcoming_events)
The next three scheduled UFC events from the backing scan.
SELECT event_name, start_time, city
FROM ufc.main.all_upcoming_events()
ORDER BY start_time
LIMIT 3;
card_fighters (event_id INTEGER)
Every fighter on a UFC event card with record, physical attributes, and outcome
Size and stance of every fighter on feed event 1291.
SELECT fighter_name, corner, outcome, height_in, reach_in, stance,
weigh_in_lbs
FROM ufc.main.card_fighters(1291)
ORDER BY fight_order, corner DESC;
Fighters on the UFC 324 card (2026-01-24, UFC feed event 1294) who hold a current ufc.com ranking, matched on ufc_athlete_url; a fighter appears once per list they are ranked on.
SELECT c.fighter_name, r.division, r.rank
FROM ufc.main.card_fighters(1294) AS c
JOIN ufc.main.current_rankings AS r USING (ufc_athlete_url)
ORDER BY r.rank, r.division, c.fighter_name;
event_bouts (espn_event_id BIGINT, league := VARCHAR)
Bouts and results for one ESPN MMA event (UFC, PFL, or Bellator)
Results of UFC 324, main event first.
SELECT match_number, card_segment, weight_class, winner_name, method,
ending_round, ending_time
FROM ufc.main.event_bouts(600057024)
ORDER BY match_number;
events (league := VARCHAR, season := INTEGER)
MMA event calendar (UFC, PFL, or Bellator) for one year, from ESPN
Every UFC event in 2025.
SELECT event_id, event_name, start_time, city, country, bout_count
FROM ufc.main.events(season := 2025)
ORDER BY start_time;
The 2026 PFL calendar.
SELECT event_id, event_name, start_time, event_state
FROM ufc.main.events(season := 2026, league := 'pfl')
ORDER BY start_time;
feed_events (first_id INTEGER, last_id INTEGER)
List UFC live-data feed events whose ids fall in a range (event-id discovery)
Find UFC feed events with ids 1285-1300.
SELECT event_id, event_name, start_time, status, fight_count
FROM ufc.main.feed_events(1285, 1300)
ORDER BY start_time;
fight_card (event_id INTEGER)
Official UFC fight card for one event: one row per fight with both corners
The card for UFC Fight Night on 2025-11-08 (feed id 1291).
SELECT fight_order, card_segment, weight_class, red_fighter_name,
blue_fighter_name
FROM ufc.main.fight_card(1291)
ORDER BY fight_order;
fight_results (event_id INTEGER)
Official UFC results for one event: winner, method, round, time, judges, bonuses
Results of UFC feed event 1291.
SELECT fight_order, winner_name, loser_name, method, ending_round,
ending_time
FROM ufc.main.fight_results(1291)
ORDER BY fight_order;
Every result on UFC feed event 1291 with the winner's reach advantage over the loser in inches (negative when the shorter-reach fighter won), from fight_results joined to card_fighters.
SELECT r.fight_order, r.winner_name, r.loser_name, r.method,
w.reach_in - l.reach_in AS winner_reach_edge_in
FROM ufc.main.fight_results(1291) AS r
JOIN ufc.main.card_fighters(1291) AS w ON w.fight_id = r.fight_id AND w.fighter_id = r.winner_fighter_id
JOIN ufc.main.card_fighters(1291) AS l ON l.fight_id = r.fight_id AND l.fighter_id = r.loser_fighter_id
ORDER BY r.fight_order;
fight_round_stats (fight_id INTEGER)
Official UFC per-round statistics for both fighters in one fight
Significant strikes per round in fight 12000.
SELECT round_number, fighter_name, sig_strikes_landed,
sig_strikes_attempted, sig_head_landed
FROM ufc.main.fight_round_stats(12000)
ORDER BY round_number, corner DESC;
fight_scorecards (fight_id INTEGER)
Round-by-round judges' scores for one UFC fight that went to a decision
How each judge scored every round of fight 12000.
SELECT judge_name, round_number, red_fighter_name, red_score,
blue_fighter_name, blue_score
FROM ufc.main.fight_scorecards(12000)
ORDER BY judge_name, round_number;
Fight 12000 round by round: significant strikes landed by each corner next to how many judges scored the round for each corner (red-corner Navajo Stirling outlanded Ivan Erslan 31-12 in round 1 but won it on only one of three cards).
WITH strikes AS (SELECT round_number, max(sig_strikes_landed) FILTER (WHERE corner = 'Red') AS red_landed, max(sig_strikes_landed) FILTER (WHERE corner = 'Blue') AS blue_landed FROM ufc.main.fight_round_stats(12000) GROUP BY round_number), votes AS (SELECT round_number, count(*) FILTER (WHERE red_score > blue_score) AS judges_for_red, count(*) FILTER (WHERE blue_score > red_score) AS judges_for_blue FROM ufc.main.fight_scorecards(12000) GROUP BY round_number) SELECT round_number, red_landed, blue_landed, judges_for_red, judges_for_blue
FROM strikes
JOIN votes USING (round_number)
ORDER BY round_number;
fight_stats (fight_id INTEGER)
Official UFC whole-fight statistics for both fighters in one fight
Striking and grappling totals for fight 12000.
SELECT fighter_name, knockdowns, sig_strikes_landed, sig_strikes_attempted,
sig_strike_accuracy_pct, takedowns_landed, control_seconds
FROM ufc.main.fight_stats(12000);
fighter (fighter_id BIGINT)
One MMA fighter's profile and career record from ESPN
Conor McGregor's profile and finishing record.
SELECT fighter_name, nickname, record, ko_tko_wins, submission_wins,
height_in, reach_in, stance
FROM ufc.main.fighter(3022677);
fighter_career_stats (fighter_id BIGINT)
A fighter's per-fight striking, clinch, takedown, and ground statistics from ESPN
Conor McGregor's striking by fight.
SELECT event_name, opponent_name, result, sig_strikes_landed,
sig_strikes_attempted, takedowns_landed
FROM ufc.main.fighter_career_stats(3022677)
ORDER BY event_time DESC;
fighter_fight_history (fighter_id BIGINT)
A fighter's professional fight history from ESPN, most recent first
Conor McGregor's fight history.
SELECT fight_number, event_time, event_name, opponent_name, result, method,
ending_round
FROM ufc.main.fighter_fight_history(3022677)
ORDER BY fight_number;
Try these queries
rankings_have_champions β The official rankings list a champion in every weight class.
SELECT count(*) >= 8 AS has_champions
FROM ufc.main.current_rankings
WHERE is_champion AND NOT pound_for_pound;
Uses current_rankings
current_season_has_events β ESPN lists UFC events for the current year.
SELECT count(*) > 0 AS populated FROM ufc.main.current_season_events;
Fight 12000 round by round: significant strikes landed by each corner next to how many judges scored the round for each corner (red-corner Navajo Stirling outlanded Ivan Erslan 31-12 in round 1 but won it on only one of three cards).
WITH strikes AS (SELECT round_number, max(sig_strikes_landed) FILTER (WHERE corner = 'Red') AS red_landed, max(sig_strikes_landed) FILTER (WHERE corner = 'Blue') AS blue_landed FROM ufc.main.fight_round_stats(12000) GROUP BY round_number), votes AS (SELECT round_number, count(*) FILTER (WHERE red_score > blue_score) AS judges_for_red, count(*) FILTER (WHERE blue_score > red_score) AS judges_for_blue FROM ufc.main.fight_scorecards(12000) GROUP BY round_number) SELECT round_number, red_landed, blue_landed, judges_for_red, judges_for_blue
FROM strikes
JOIN votes USING (round_number)
ORDER BY round_number
Every result on UFC feed event 1291 with the winner's reach advantage over the loser in inches (negative when the shorter-reach fighter won), from fight_results joined to card_fighters.
SELECT r.fight_order, r.winner_name, r.loser_name, r.method,
w.reach_in - l.reach_in AS winner_reach_edge_in
FROM ufc.main.fight_results(1291) AS r
JOIN ufc.main.card_fighters(1291) AS w ON w.fight_id = r.fight_id AND w.fighter_id = r.winner_fighter_id
JOIN ufc.main.card_fighters(1291) AS l ON l.fight_id = r.fight_id AND l.fighter_id = r.loser_fighter_id
ORDER BY r.fight_order
Fighters on the UFC 324 card (2026-01-24, UFC feed event 1294) who hold a current ufc.com ranking, matched on ufc_athlete_url; a fighter appears once per list they are ranked on.
SELECT c.fighter_name, r.division, r.rank
FROM ufc.main.card_fighters(1294) AS c
JOIN ufc.main.current_rankings AS r USING (ufc_athlete_url)
ORDER BY r.rank, r.division, c.fighter_name
The upcoming UFC schedule.
SELECT event_id, event_name, start_time, city, country, bout_count
FROM ufc.main.upcoming_events
ORDER BY start_time
Uses upcoming_events
19 more examples in the Catalog, each listed under the table or function it uses.
Questions it can answer
Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.
- Who are the current UFC champions in every men's and women's weight class?
- When and where is the next scheduled UFC event, and what is it called?
- How many UFC events have already taken place this calendar year, and how many PFL events did ESPN list for 2026?
- Using ESPN event id 600057024 (UFC 324), who won the main event and by what method?
- Find the UFC live-data feed event id for UFC 324 (feed ids between 1290 and 1300) and name the two fighters in its main event.
- Which fighter on UFC feed event 1291 had the longest reach, and how long was it?
UFC is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Tennis
Sports
ATP and WTA rankings, draws, Grand Slam finals and set-by-set results
Cricket
Sports
Cricket matches, scorecards, ball-by-ball deliveries, standings, and ICC rankings as SQL tables
Formula 1
Sports
F1 standings, results, calendars, lap times, and session timing as SQL tables