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, including player props
- Accurate main-line detection — the primary line comes from DraftKings' own
mainflag rather than being guessed from the odds, so alternate lines are never mistaken for the real one - Export to CSV / Excel, plus raw JSON export of the last API response
- Built-in ID reference for league, category, and subcategory IDs
- Live ID lookup (
Tools > List Live Sub-Categories) for when the bundled reference goes stale - Built-in auto-updater — the packaged build checks GitHub Releases on start, verifies the SHA-256 of any download against the published release, then replaces itself and restarts
- 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.,
13354)
- 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.
The .exe build keeps itself current:
- On launch it quietly asks GitHub for the newest release. If you are up to date, or GitHub is unreachable, nothing is shown.
- When a newer version exists you are shown the release notes and asked whether to install it.
- The download is checked against the SHA-256 digest GitHub publishes for the release asset. A mismatch aborts the update — a file that fails verification is never written to disk, let alone run.
- The running program is renamed aside, the new build takes its place, and the app restarts. The old executable is deleted on the next launch.
Set "check_updates_on_startup": false in config.json to disable the automatic
check; Help > Check for Updates... always works regardless.
Running from source, the updater only tells you a new version exists and links to
the releases page — it will never overwrite your working copy. Use git pull.
Upgrading from v0.1.1 or earlier: those builds predate the updater, so this one has to be downloaded manually. Updates after that are automatic.
DraftKings rotates sub-category IDs between seasons, and a stale ID returns an
empty result rather than an error. When that happens, use Tools > List Live
Sub-Categories to print the IDs DraftKings is serving right now, and update
id_reference.json from that listing.
Example of parsed betting market data:
--- New Data Request ---
Fetching data from DraftKings...
League ID: 88808, Category ID: 1286, Sub-Category ID: 13354
Successfully fetched data feed.
Parsed 320 betting selections.
--- Request Complete ---
Participant Line Over Odds Under Odds
------------- ----- --------- ----------
BAL Ravens 11.5 +115 -140
MIA Dolphins 3.5 -150 +120
...
Note: DraftKings rotates its sub-category IDs between seasons, so the IDs in
id_reference.jsoncan go stale. If a request returns no selections, the IDs are the first thing to check — thesubcategoriesarray in any category response lists the current ones.
- 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: 13354)",
"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
- Add support for retrieving data across multiple subcategory IDs
- Optionally export the full alternate-line ladder alongside the main line
This project is open source under the MIT License.
yzRobo