This Python GUI application retrieves and displays NFL futures data from the DraftKings API. It is designed to help users easily extract and organize betting market information, such as Regular Season Wins, Awards, Player Props, and more.
There are three ways to use this application, depending on your preference.
For most users, the easiest method is to use the pre-built .exe file. No Python installation is needed.
- Go to the Releases page on GitHub.
- Download the
DK_API_Scraper_vX.X.X.exefile from the latest release. - Run the downloaded file.
This option is for users who download the source code and want a simple way to run it on Windows without using the command line.
- Make sure you have Python installed on your system.
- Download or clone the project repository.
- Install the required dependencies by opening a terminal or command prompt in the project folder and running:
pip install -r requirements.txt
- Once dependencies are installed, simply double-click the
run.batfile to start the application.
This method works for all operating systems (Windows, macOS, Linux) and is the standard way to run a Python application from source.
- Ensure you have Python installed.
- Download or clone the project repository.
- It is highly recommended to create and activate a virtual environment:
# For Windows python -m venv venv venv\Scripts\activate # For macOS/Linux python3 -m venv venv source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
- Run the application from your terminal:
python dk_api_gui_explorer.py
- Graphical User Interface (GUI) using Tkinter
- Supports multiple market categories including:
- Wins
- Futures
- Awards
- Player Futures
- Rookie Watch
- Stat Leaders
- Playoffs
- Division Specials
- Team Specials
- Game-Specific Props
- Data parsing and pivoting for Over/Under markets
- Export to CSV
- Built-in ID reference for league, category, and subcategory IDs
- Designed to work with the DraftKings NFL League ID (
88808)
tkinter(included with most Python installations)pandascurl_cffi
- Input Fields:
- League ID (e.g.,
88808for NFL) - Category ID (e.g.,
1286) - Sub-Category ID (e.g.,
17455)
- League ID (e.g.,
- Click “Grab Data” to retrieve market data from DraftKings.
- The data will be displayed in the log window.
- Click “Save Results” to export the latest data to a CSV file.
- Browse through categories and subcategories with corresponding IDs.
- Click any ID entry to auto-populate the Viewer tab’s input fields.
Example of parsed betting market data:
--- New Data Request ---
Fetching data from DraftKings...
League ID: 88808, Category ID: 1286, Sub-Category ID: 17455
Successfully fetched data feed.
Parsed 64 betting selections.
--- Request Complete ---
Participant Line Over Odds Under Odds
----------- ----- --------- ----------
Dolphins 10.5 +150 -170
Patriots 7.5 +100 -120
...
- The app uses regex parsing to extract numeric IDs and betting labels (e.g., "Over", "Under") from titles.
- Markets like "Regular Season Wins" are automatically pivoted into a readable format with
Participant,Line,Over Odds, andUnder Oddscolumns. - The application works for any DraftKings market with the correct combination of IDs.
The id_reference.json file contains league market categories and subcategories. Example:
[
{
"category_name": "WINS (Category ID: 1286)",
"subcategories": [
"Regular Season Wins (ID: 17455)",
"Most Wins (ID: 13365)",
"Fewest Wins (ID: 13367)"
]
},
{
"category_name": "AWARDS (Category ID: 787)",
"subcategories": [
"MVP (ID: 13339)",
"OPOY (ID: 13340)"
]
}
]The IDs are automatically extracted using regex when clicked, and populate the Viewer tab.
draftkings_api_explorer/
│
├── .gitignore # Specifies intentionally untracked files to ignore
├── config.json # Configuration file for API endpoints
├── dk_api_gui_explorer.py # The main application script with the GUI
├── id_reference.json # Reference data for market categories and IDs
├── LICENSE # The MIT License for the project
├── README.md # The project's documentation file
└── requirements.txt # A list of the Python packages required
- Correct Formatting of more API categories to ensure output looks correct
- Add support for retrieving data across multiple subcategory IDs
This project is open source under the MIT License.
yzRobo