draftkings apiDashboard ↗

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.

From zero to two requests
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 5

Python 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.

GoalFileRequests per runPlan
First callsPython quickstart, Node.js quickstart2Any
Walk through each datasetJupyter notebookUp to 6Any
Fresh Pick6 rows for one statPick6 board script--max-pagesAny
A player's retained game logPlayer game log script--max-pagesAny
Recorded line changesLine movement script--max-pagesAny
CSV from any datasetCSV export script--max-pagesAny
A Google SheetGoogle Sheets Apps Script1 by defaultAny
Discord alertsDiscord alert bot--max-pagesAny
A baseline points modelNBA points baseline--max-pagesAny
Your own daily archiveDaily archive workflow--max-requestsAny
Three datasets side by sideComparison feed (Python), Comparison feed (Node.js)--max-requestsAny
Resumable Pick6 streamStream client1 + --max-connectionsDeveloper, Production
Signed Pick6 webhooksWebhook receiverNo API requestsProduction

Import the Postman collection

Download the Postman collection and the Postman environment. Nothing runs on import, and the environment starts with an empty key.

  1. Import both files into Postman and select the environment.
  2. 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.
  3. Set ALLOW_LIVE_REQUESTS to true. A pre-request script blocks every call until you do, so an accidental Collection Runner click spends nothing.
  4. Send one request and inspect observed_at, stale and pagination.

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.

Run and schedule
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 60

Do 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.

One sport and stat
python3 comparison-feed.py --sport NFL --stat "Receiving Yards" --max-requests 12 > feed.jsonl

The 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.

Claude Code .mcp.json
{
  "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

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.