Odds API for DraftKings and FanDuel: get the lines without scraping
You want DraftKings and FanDuel prices in your code. You go looking for their API. It isn't there.
Neither DraftKings nor FanDuel publishes a public developer API. There's no key signup, no docs, no portal. The only official access is a private B2B partnership. To get DraftKings and FanDuel odds in code, you call a sportsbook odds API that already covers both books and returns their lines as JSON in one request, instead of scraping two websites.
This guide covers why the official APIs don't exist, why these two books matter more than any other, and exactly how to pull their odds and player props through a single sportsbook API. I'll use propzapi for the examples because it's what I know best, but the approach is the same with any aggregator.
Is there a DraftKings or FanDuel API?
No public one. DraftKings offers no developer portal, no API-key form, and no documentation you can sign up for, and FanDuel is the same. The integrations that exist are B2B only, locked behind partnership agreements that require a registered company, regulatory standing, and a commercial deal. A solo developer cannot get an official key.
This trips people up because both apps clearly run on an internal API. Your phone talks to their backend on every refresh. But an internal, unpublished endpoint is not a product you can sign up for, and hammering it is against their terms.
So your real options are two. Scrape their websites yourself, or call a provider that already has the lines under license. For anything beyond a throwaway script, the second one wins, and the rest of this guide is why.
Why do DraftKings and FanDuel matter so much?
Because together they are most of the market. DraftKings and FanDuel hold roughly two-thirds of all US sports betting, with DraftKings around 35.8% and FanDuel around 32.0% of handle in early 2026. Any odds product that ignores these two books is ignoring most of the money, which is why "DraftKings and FanDuel" is the coverage question developers ask first.
The scale underneath those percentages is the part worth sitting with. US regulated sportsbooks took $165.58 billion in handle in 2025, per the American Gaming Association, and posted a record $16.96 billion in revenue, per ESPN. Two-thirds of that flows through the two books you can't get an API for.
Market-share figures move a little by metric and month. FanDuel tends to lead on revenue while DraftKings leads on handle, per Casino Reports' market database. The takeaway doesn't move: get these two right and you've covered most of the market by definition.
How do you get DraftKings and FanDuel odds without scraping?
Call one sportsbook odds API that already covers both books. You send a single authenticated request filtered to DraftKings and FanDuel, and get their lines back as JSON grouped by book under each event. There's no headless browser, no rotating proxies, and no per-site parser to rewrite every time one of the apps ships a new layout.
The reason this is easier is normalization. A scraper has to read DraftKings' markup and FanDuel's markup separately, because they're different sites built by different teams. An odds API has already done that work and hands you one predictable shape for both.
Here's the honest comparison, without the gloss.
| Scrape DraftKings + FanDuel | Use a sportsbook odds API | |
|---|---|---|
| Setup | A parser for each site | One key, one request |
| Two books | Two scrapers to babysit | Both in one response |
| Maintenance | Breaks on every redesign | Stable JSON contract |
| Reliability | IP bans, missing data at peak | Built for uptime |
| Legal footing | Against both books' terms | Licensed data feed |
| Player props | Hardest part to scrape | A first-class endpoint |
Scraping one book, once, for a weekend project is fine. The moment you need both books, uptime, or props, the maintenance cost of two scrapers buries whatever you saved by not paying for data.
What does a DraftKings and FanDuel odds response look like?
A tree of events, each holding the books that price it, each book holding its markets and priced outcomes. Ask for DraftKings and FanDuel and you get both under the same game, with the same fields, so comparing their moneylines is a dictionary lookup. The shape is identical whether you pull the NBA tonight or the NFL on Sunday.
That side-by-side layout is the whole point. Here's one NBA game with both books returned together.
{
"data": [
{
"home": "Celtics",
"away": "Lakers",
"start": "2026-01-14T00:30:00Z",
"books": [
{
"name": "DraftKings",
"markets": { "h2h": [
{ "team": "Celtics", "price": -145 },
{ "team": "Lakers", "price": 124 }
] }
},
{
"name": "FanDuel",
"markets": { "h2h": [
{ "team": "Celtics", "price": -138 },
{ "team": "Lakers", "price": 118 }
] }
}
]
}
]
} Because DraftKings priced the Celtics at -145 and FanDuel at -138 in that example, the better price is a one-line comparison. That's the kind of thing odds-comparison sites, arbitrage screens, and line-shopping bots do thousands of times a minute.
How do you make your first DraftKings and FanDuel call?
Get a free key, send one authenticated GET request filtered to both books, and parse the JSON. With propzapi you sign up, confirm your email, grab the key, and call /v1/odds with book=draftkings,fanduel and your key in an X-API-Key header. You'll have both books' lines in your terminal in under ten minutes, no card required.
Start with cURL to prove the key works and both books come back.
curl "https://api.propzapi.com/v1/odds?league=NBA&market=h2h&book=draftkings,fanduel" \
-H "X-API-Key: $PROPZAPI_KEY" Then wire it into your stack. Python, with a DraftKings-versus-FanDuel comparison built in.
import requests
r = requests.get(
"https://api.propzapi.com/v1/odds",
params={"league": "NBA", "market": "h2h", "book": "draftkings,fanduel"},
headers={"X-API-Key": "YOUR_KEY"},
)
data = r.json()
print("credits spent:", r.headers["X-Credits-Cost"])
# Compare DraftKings vs FanDuel on the same game
for event in data["data"]:
prices = {b["name"]: b["markets"]["h2h"] for b in event["books"]}
print(event["home"], "vs", event["away"], prices) Or Node, if that's where you live.
const res = await fetch(
"https://api.propzapi.com/v1/odds?league=NBA&market=h2h&book=draftkings,fanduel",
{ headers: { "X-API-Key": process.env.PROPZAPI_KEY } }
);
const { data } = await res.json();
console.log("credits:", res.headers.get("X-Credits-Cost")); Watch the X-Credits-Cost header while you build. propzapi meters by market and returns the exact cost on every call, so you read what a request cost instead of guessing from a pricing table. Log it and a surprise never lands on your invoice.
What about DraftKings and FanDuel player props?
Props are the hardest part to scrape and the most valuable to have, so pull them from a props-first endpoint. With propzapi you call /v1/props filtered by league and market to get player, line, and per-book price, DraftKings and FanDuel included, in the same clean JSON as game odds. That matters because same-game parlays built on props now drive a large share of both books' revenue.
Same-game parlays, which are stacks of player props, have grown from under 20% of sportsbook revenue in 2021 to roughly 35% to 40% in 2025. DraftKings and FanDuel both lean hard on them. If your product touches props at all, thin prop coverage is a ceiling on what you can build.
This is the gap propzapi was built for. Most general odds feeds treat props as an afterthought; propzapi treats player props as a first-class market. Same books, same shape, one more endpoint.
How do you run this in production without overpaying?
Cache read-through, poll each market only as often as it moves, and filter every request to the leagues and books you use, usually just DraftKings and FanDuel. Pre-match lines don't need second-by-second polling; live ones do. Serve your own thin API from the cache so you pull from the odds API on misses, not on every user request.
That pattern keeps both latency and credits down, and it's the same whether you cover two books or twenty. Filtering to book=draftkings,fanduel also means you don't pay to pull books you'll never show.
Building for AI agents? propzapi ships an MCP server so an assistant can fetch DraftKings and FanDuel lines directly, plus installable skills. For the full endpoint reference, the docs have it, and if you're weighing providers, the 2026 odds API comparison and the alternatives breakdown go deeper on price and coverage. The complete odds API guide covers the fundamentals end to end.
Frequently asked questions
- Is there an official DraftKings API?
- No. DraftKings does not publish a public developer API. There's no key signup, no docs page, no portal. The only authenticated access is a private B2B partnership through DraftKings business development, which needs a registered company and a commercial agreement. Individual developers pull DraftKings odds through a third-party sportsbook API instead.
- Does FanDuel have a public API?
- No. Like DraftKings, FanDuel offers no public developer API and no self-serve access. Its data integrations are B2B and locked behind partnership agreements. To get FanDuel odds in code, you call an aggregated odds API that already covers FanDuel and returns its lines as JSON alongside other books.
- How do I get DraftKings and FanDuel odds without scraping?
- Call one sportsbook odds API that already covers both books. With propzapi you send a single request to /v1/odds and get DraftKings and FanDuel lines side by side as JSON, grouped by book. No headless browser, no proxy pool, and no separate parser to maintain for each sportsbook's website.
- Is it legal to pull DraftKings and FanDuel odds through an API?
- Consuming odds through a licensed sportsbook odds API is standard for analytics, comparison tools, and research, and it's the compliant alternative to scraping a sportsbook directly. propzapi is a data provider, not a sportsbook, and it takes no wagers. You stay responsible for how you use the data under your local rules.
- How do I compare DraftKings and FanDuel odds in real time?
- Pull both books in one call and diff the prices. Because a sportsbook API returns DraftKings and FanDuel under the same event with the same JSON shape, comparing them is a lookup, not a scraping project. Poll on a short interval for live markets so your comparison reflects the latest lines.
- Can I get DraftKings and FanDuel player props via API?
- Yes, from a props-capable endpoint. With propzapi you call /v1/props filtered by league and market to get player, line, and per-book price, DraftKings and FanDuel included, as JSON. That matters because same-game parlays built on props now drive a large share of both books' revenue.
Pull both books with one call
You don't need a partnership or a scraper farm to get DraftKings and FanDuel odds. Get a free key, run the cURL command above with book=draftkings,fanduel, and watch both books' lines print side by side. If props are on your roadmap, start there. It's the market growing fastest and the one propzapi covers deepest.