DEVELOPER STARTER KIT
DraftKings API developer starter kit
Download Python and Node examples, a notebook, Postman templates, a daily archive workflow and a comparison feed. Bounded requests and no embedded credentials.
Editorial review: · Not a live coverage report
Download everything
Get all of it as one file: Source bundle (zip). Every file below is also available on its own from this domain. Nothing contains a credential: each script reads DRAFTKINGS_API_KEY from your environment.
curl -LO https://draftkingsapi.com/examples/draftkings-api-examples.zip
unzip draftkings-api-examples.zip
cd draftkings-api-examples
export DRAFTKINGS_API_KEY=dk_your_key_here # from your dashboard; keep it out of the repo
python3 draftkings-quickstart.py --sport NHL --limit 5Python scripts need Python 3.9 or later and the standard library. Node scripts need Node 18 or later and no packages. MANIFEST.json lists the SHA-256 of each file in the bundle.
Choose an example
Each example states its request cost at the top, stops at a request budget, times out and reports errors instead of hiding them.
| Goal | File | Requests per run | Plan |
|---|---|---|---|
| First calls | Python quickstart, Node.js quickstart | 2 | Any |
| Walk through each dataset | Jupyter notebook | Up to 6 | Any |
| Fresh Pick6 rows for one stat | Pick6 board script | --max-pages | Any |
| A player's retained game log | Player game log script | --max-pages | Any |
| Recorded line changes | Line movement script | --max-pages | Any |
| CSV from any dataset | CSV export script | --max-pages | Any |
| A Google Sheet | Google Sheets Apps Script | 1 by default | Any |
| Discord alerts | Discord alert bot | --max-pages | Any |
| A baseline points model | NBA points baseline | --max-pages | Any |
| Your own daily archive | Daily archive workflow | --max-requests | Any |
| Three datasets side by side | Comparison feed (Python), Comparison feed (Node.js) | --max-requests | Any |
| Resumable Pick6 stream | Stream client | 1 + --max-connections | Developer, Production |
| Signed Pick6 webhooks | Webhook receiver | No API requests | Production |
Import the Postman collection
Download the Postman collection and the Postman environment. Nothing runs on import, and the environment starts with an empty key.
- Import both files into Postman and select the environment.
- Create a key and paste it into the current value of
DRAFTKINGS_API_KEY. Current values stay local, so avoid putting a key in the initial value of a shared workspace. - Set
ALLOW_LIVE_REQUESTStotrue. A pre-request script blocks every call until you do, so an accidental Collection Runner click spends nothing. - Send one request and inspect
observed_at,staleandpagination.
Data requests use limit=5. There is no automatic pagination.
Run the notebook
Open Jupyter notebook in Jupyter. It has no stored outputs. It reads your key from the environment, or asks for it without echoing, and it stops after six requests. It uses only the standard library, so you can add your own analysis tools on top.
Start a daily archive
Recording began around 2026-11-03. Retained history is short, and it is not a complete opening-to-close archive. It does not contain seasons of past lines, and there is no public graded-results endpoint. If your project needs history, start collecting your own today. Daily archive workflow saves bounded pages of Pick6 rows and changes, sportsbook events and odds, and DFS slates to SQLite. Re-runs are safe, because rows are keyed by dataset, id and capture time, and the Pick6 cursor resumes where it stopped.
python3 daily-archive.py --db archive.sqlite --sports NBA,NFL,NHL --max-requests 60
# once a day, after you have checked your budget
15 6 * * * cd /path/to/archive && DRAFTKINGS_API_KEY=... python3 daily-archive.py --db archive.sqlite --sports NBA,NFL,NHL --max-requests 60Do the budget arithmetic first. At 60 requests a day you would use about 1,800 a month, more than Free allows, so lower --max-requests on Free. Free includes 500 requests/month at 20/minute; Developer is $49/month with 10,000 requests/month at 60/minute; Production is $149/month with 50,000 requests/month at 120/minute. Archives are for your own use unless you hold redistribution rights.
Try the comparison feed
Comparison feed (Python) and Comparison feed (Node.js) print Pick6 rows, DFS salaries and sportsbook mainlines for one sport as JSON lines. They join Pick6 entity_id to DFS playerDkId, which matched in a sample on 2026-11-03, and report rows with no match rather than guessing by name.
python3 comparison-feed.py --sport NFL --stat "Receiving Yards" --max-requests 12 > feed.jsonlThe feed does not compute a mismatch, an edge or a pick, because these numbers mean different things. Read odds vs Pick6 multipliers vs DFS salaries. As of 2026-11-03, sportsbook data is ESPN-attributed DraftKings mainlines (moneyline, spread and total) across eight leagues. Native feeds are scope-specific: New York NFL and NHL game lines and New York NHL Shots on Goal props, listed on /status. There is no full-book coverage, and other props, alternates and futures are not supplied.
Connect an assistant
The hosted MCP endpoint is https://draftkingsapi.com/api/mcp. search and fetch work with no key, and data tools need a Bearer key. Setup differs by client, so follow the page for yours: Claude, Gemini, ChatGPT or Lovable.
{
"mcpServers": {
"draftkings": {
"type": "http",
"url": "https://draftkingsapi.com/api/mcp",
"headers": {
"Authorization": "Bearer ${DRAFTKINGS_API_KEY}"
}
}
}
}How these files were checked
On 2026-11-03, each script passed a syntax check and ran against a local test server that returns row shapes copied from the live database. The test server also returned 401 and 503 errors to exercise the error paths. The webhook receiver was tested with locally signed requests. The files have not been run against production with a real key, and the Apps Script and Postman collection have not been run inside Google or Postman. Tell us if anything breaks.
Try it
Check your key with one request before you download anything.
curl --fail-with-body "https://draftkingsapi.com/api/v1/pick6/projections?sport=NHL&limit=5" \
-H "Authorization: Bearer $DRAFTKINGS_API_KEY"Check the recorded data
Questions
Do the examples contain an API key?
No. Every script reads the key from an environment variable. The notebook can also prompt for it without echoing, and the Postman environment ships with an empty value.
How much of my plan will the examples use?
Each one stops at a stated budget, and the quickstarts spend two requests. A file cache in the Python scripts reuses responses for five minutes, so repeat runs usually spend nothing.
Do I need a paid plan?
No, except for the stream client, which needs Developer or Production, and signed webhooks, which need Production.
Can I use these files in my own product?
You can adapt the code. The data is a separate question: technical access is not a redistribution license, so establish your own rights before showing rows publicly.
Related resources
For developers who want a response now: a keyless sample, then a free key, then an authenticated call. Not for production hardening or sportsbook player props.
DraftKings API in Python and cURLCall the API with cURL and the Python standard library: timeouts, retries on 503, bounded pagination and clear error handling.
DraftKings API in JavaScript and Node.jsCall the API from Node.js with built-in fetch: timeouts, retries, async pagination and a server route that keeps your key private.
DraftKings historical data: what existsWhat history each DraftKings dataset really holds, when recording began, what is not available, and how to start your own archive today.
Use the DraftKings API with ClaudeConnect Claude Code to DraftKings Pick6, sportsbook and DFS observations over MCP with an environment-backed key, and see what Claude web chat can reach.
Independent service operated by DD Inc., not affiliated with or endorsed by DraftKings. Technical access is not a redistribution license. No wagering: this service does not place, recommend or settle entries or bets. Check sources and status for actual capture context.