Skip to content

socialatm/ufcstats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrape UFC Stats

Scrape all available UFC events data, fights stats, and fighter details from ufcstats.com and save in CSV format.

Install

pip install -r requirements.txt

Introduction

Data for all events, fights, and fighters have been scraped and saved as the following data files:

  • ufc_event_details
  • ufc_fight_details.csv
  • ufc_fight_results.csv
  • ufc_fight_stats.csv
  • ufc_fighter_details.csv
  • ufc_fighter_tott.csv

To download the CSV files without running any code, click: Download stats


  • To scrape the all data for events and fights including results and stats: scrape_ufc_stats_all_historical_data.ipynb.

  • To scrape the data for all fighters including inculding tale of the tape:

    py get_all_fighters_and_tott.py

Note: these will each take a few hours to complete.


  • Once you have the data you can run:
py update_all_ufc_stats.py

to get the latest updates only.

  • The notebook scrape_ufc_stats_working_example.ipynb can be used for testing or debugging. The code here is broken down into sections which can be executed to scrape single data points, e.g. scraping stats for one fight only.

Next Event

Find the next upcoming UFC event, and extract details about every fight scheduled for that event.

Saved to a CSV file named next_event.csv.

Usage:

from the root directory:

cd next_event/next_event

then:

py -m scrapy crawl event

Modifications:

Files dated June 22, 2025 and newer have been modified from the original https://github.com/Greco1899/scrape_ufc_stats

About

Scrape UFC stats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 59.3%
  • Python 40.7%