INDEPENDENT DEVELOPER REFERENCE
Export DraftKings data to CSV
Use native format=csv on Pick6 endpoints, and convert sportsbook, DFS and statistics JSON to CSV on your side with a working script.
Editorial review: · Not a live coverage report
Which endpoints export CSV
Native CSV exists on the Pick6 endpoints only: projections and history, along with their aliases. Other datasets return JSON, so convert those on your side.
| Endpoint | `format=csv` | How to get CSV |
|---|---|---|
/api/v1/pick6/projections | Yes | Native |
/api/v1/pick6/history | Yes | Native, but JSON is better for cursors |
/api/v1/odds, /events, /history | No (400) | Client-side conversion |
/api/v1/dfs/* | No (400) | Client-side conversion |
/api/v1/stats/* | No (400) | Client-side conversion |
/api/v1/context/* | No (400) | Client-side conversion |
Native Pick6 CSV
Add format=csv. Each page returns at most 100 rows, with the usual Bearer header, and it costs one request. The file is named pick6-observations.csv and sent as text/csv.
curl --fail-with-body \
"https://draftkingsapi.com/api/v1/pick6/projections?sport=NHL&stat=Shots%20on%20Goal&limit=100&format=csv" \
-H "Authorization: Bearer $DRAFTKINGS_API_KEY" \
-o shots-on-goal.csvThe columns are pick_group_id, pickable_id, pickable_market_id, sport, stat, target_value, period, is_live, is_paused, observed_at, source_updated_at, source_url, capture_hash, selections and entities.
JSON cells and formula safety
selections and entities stay as JSON inside their cells, so a row with two sides and two multipliers keeps its structure. Parse those cells if you need one column per side. Do not flatten them to a single multiplier: that would discard a side or merge different sides.
Values that begin with =, +, -, @, a tab or a carriage return get a leading apostrophe. This stops spreadsheet programs from running a cell as a formula. A consequence is that a negative value can arrive as text with an apostrophe in front, so strip it when you load the file into code.
CSV responses contain no pagination block, and they omit age_seconds and stale. Use observed_at to judge age. For repeated exports, request JSON, read has_more and write CSV yourself.
Page through a longer export
To go beyond one page, increase offset by 100 until a page comes back with only its header. That final request costs one request, so an export of N pages costs N+1 unless you stop on a short page.
offset=0
for page in 1 2 3; do
curl --fail-with-body -s \
"https://draftkingsapi.com/api/v1/pick6/projections?sport=NFL&limit=100&offset=$offset&format=csv" \
-H "Authorization: Bearer $DRAFTKINGS_API_KEY" > "page-$page.csv"
[ "$(wc -l < "page-$page.csv")" -lt 100 ] && break
offset=$((offset + 100))
done
head -n 1 page-1.csv > all.csv
for f in page-*.csv; do tail -n +2 "$f" >> all.csv; echo >> all.csv; doneA count of lines is only a rough stop rule, because JSON cells are quoted and stay on one line in practice but are not guaranteed to. Prefer the JSON approach below if accuracy matters. Captures change between pages too, so deduplicate on the three identity columns.
Client-side conversion
For sportsbook, DFS and statistics, read JSON pages and write the columns you want. export-csv.py does that with the standard library, a page budget and the same formula guard.
python3 export-csv.py --resource odds --sport NBA --max-pages 3 --out odds.csv
python3 export-csv.py --resource dfs/players --sport NFL --max-pages 3 --out salaries.csv
python3 export-csv.py --resource stats/player-games --sport NBA --season 2027 --max-pages 3 --out logs.csvChoose columns deliberately when you adapt it. Odds rows flatten cleanly, DFS data needs specific fields such as salary, displayName and draftableId, and statistics hold a list of stats to pivot by key, using numeric where it is not null.
Try it
curl --fail-with-body "https://draftkingsapi.com/api/v1/pick6/projections?sport=NHL&limit=5&format=csv" \
-H "Authorization: Bearer $DRAFTKINGS_API_KEY"Endpoint docs
Check the recorded data
Questions
Can I download DFS salaries as CSV?
Not natively. The DFS endpoints return JSON, and format=csv returns 400 there. Use the export-csv.py script, or convert the JSON yourself.
How many rows can one CSV request return?
At most 100 rows per Pick6 page. Increase offset to read more, up to the usual offset limit of 10,000.
Why do some CSV cells contain JSON?
A Pick6 row can have several selections and entities. Keeping them as JSON cells preserves every side and multiplier without inventing columns.
Why does a cell start with an apostrophe?
Values beginning with characters such as equals, plus, minus or at get an apostrophe so spreadsheet software will not treat them as formulas.
Related resources
Load observed rows into Google Sheets with Apps Script and into Excel with Power Query, with the key kept out of cells and quota in check.
Does the API export CSV?Pick6 endpoints accept format=csv, up to 100 rows per page. Sportsbook, DFS and statistics are JSON, so convert them on your side.
DraftKings API pagination: offset, after and cursorsThree pagination styles with working loops: offset lists, the Pick6 next_after sequence and statistics cursors, plus their limits.
Can I redistribute data from this API?An API key gives technical access, not a redistribution license. Rows carry rights notes, and you must resolve rights for anything you publish.
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.