Skip to content
DunkAPI

The basketball data API.

23 NBA seasons, every shot located.

Play-by-play with the location of every NBA and WNBA shot, box scores, win probability, standings and our own team ratings, for the NBA, WNBA and college basketball. Sportsbook lines from 4 to 12 books per regular-season game, 2013-14 to 2023-24. Call it over REST or point Claude at it over MCP. The first 500 credits are free and we do not ask for a card.

500 free credits, no card. Works in Claude, ChatGPT and Cursor: connect over MCP

plays
14.5M+
games
31,000+
players
3,800+
seasons
23

Also in DunkAPI

The WNBA API

Women's National Basketball Association, every season since 2006: play-by-play, shot locations, standings, sportsbook lines and season lines. Same key and credits as the NBA.

See the WNBA data
games
4,990
plays
1,934,310
seasons
21

Also in DunkAPI

The college basketball API

NCAA Division I men's basketball, every season since 2013-14: play-by-play, standings, sportsbook lines and season lines. Same key and credits as the NBA.

See the NCAAM data
games
76,938
plays
24,730,105
seasons
13

Also in DunkAPI

The women's college basketball API

NCAA Division I women's basketball, every season since 2014-15: play-by-play, standings and season lines. Same key and credits as the NBA.

See the NCAAW data
games
66,657
plays
16,121,966
seasons
12

This week

What get_schedule returns right now.

Sample rows; the live page renders from the database. Lines are the median closing number across sportsbooks.

Tip-offAwayHomeLineTotalGame id
Tue 7:30 PM ETNYBOSBOS -4.5221.5401809001
Tue 10:00 PM ETDENLALDEN -2229.5401809002

get_schedule · 2 credits · then get_game for the box scores and every book's line

Coverage

Coverage you can inspect before you build.

Play-by-play
23 NBA seasons

Play-by-play for NBA games since 2003-04, with the location of every shot in it.

Sportsbook lines
4 to 12 books

Each sportsbook's moneyline, spread and total: 4 to 12 books per regular-season NBA game from 2013-14 to 2023-24 (10 to 12 from 2020-21), and 4 to 10 for most men's college seasons.

Leagues
NBA, WNBA, college

The WNBA since 2006 and Division I men's (from 2013-14) and women's (from 2014-15) college basketball, on the same tools.

DatasetSeasonsVolumeStatusTools
Games and box scores
Scores, both teams' box scores and every player's line: minutes, points, shooting, rebounds, assists, steals, blocks, turnovers, fouls, plus-minus.
2003-04 to currentEvery game, every playerPartial
About one game in eight from 2012-13 to 2017-18 has no box score in the source; those lines are counted from the play-by-play (97-100% exact where checked), without minutes or plus-minus. 26 games have a box score but no play-by-play.
Play-by-play
Every play with clock, score, players involved, shot type and points.
2003-04 to currentAbout 450 plays per NBA gameFull
Shot locations
Each shot's x/y in feet, distance, zone and our expected points.
2003-04 to currentEvery field goal attemptFull
Win probability
The home team's win probability after each play, as ESPN computes it.
2018 to currentAfter every playPartial
From 2017-18 only.
Odds
Moneyline, spread and total by sportsbook; opening and closing from 2023-24, the final pregame line before that.
2013-14 to current4 to 12 books per regular-season game to 2023-24, usually one sincePartial
No lines before 2012-13; mostly one book per game since 2024-25; no player props.
Ratings
Our Elo, before and after every game.
2003-04 to currentEvery team, every gameFull
Injury report
Each listed player's status, injury and expected return, captured daily (NBA and WNBA).
From launchDailyPartial
Daily captures from launch; no history before that.

Full detail in the data atlas. Sportsbooks: the books ESPN reports: 4 to 12 per regular-season NBA game from 2013-14 to 2023-24, 10 to 12 from 2020-21 (DraftKings, Caesars, BetMGM, Unibet and Betfair among them in 2023-24), then usually ESPN BET or DraftKings alone. No lines before 2012-13, and most games since 2024-25 have one book.

Last written 2026-10-08 02:09 UTC. Every dataset's own refresh time is in the changelog.

Why trust it

The parts of basketball data that take real work.

Box scores are everywhere. Shot locations joined to a value model, a decade of lines by book, and four leagues on one schema are where shortcuts show.

Every shot

Located, zoned and valued

Every NBA field goal attempt since 2003-04 carries its spot on the floor in feet, its zone and our expected points for that type of shot from that distance, fitted on the league's own history. A shot chart is one call, not a scraping project.

4 to 12 books

A decade of lines, by sportsbook

Moneylines, spreads and totals from 4 to 12 sportsbooks per NBA game from 2013-14 to 2023-24 (10 to 12 from 2020-21), and most college seasons, each stored separately, with results against the median close. Enough history to backtest a model across eras, not just last season.

4 leagues

The same tools, one argument apart

The NBA, the WNBA and men's and women's Division I college basketball share one set of endpoints. Pass league and the same box scores, play-by-play, standings and ratings come back for that league, each kept in its own tables.

Access

REST or MCP. Same data either way.

Call it from any language over REST. Let Claude or Cursor query it in plain English over MCP.

  • GET https://mcp.dunkapi.com/v1/tools public catalogue with JSON Schema
  • POST https://mcp.dunkapi.com/v1/{tool}
  • MCP https://mcp.dunkapi.com/mcp
curl -X POST https://mcp.dunkapi.com/v1/list_teams \
  -H "x-api-key: YOUR_API_KEY"

# every tool: POST /v1/{tool} with a JSON body
# responses carry X-Credits-Used and X-Credits-Remaining

Pricing

Free to start, then you pay per call.

500 credits on signup, no card. Subscriptions add a monthly allowance; wallet top-ups never expire.

Free
$0
500 wallet credits on signup
  • +All 16 endpoints
  • +REST API + MCP access
  • +No credit card required
Start free
Starter
$19/mo
10,000 credits/month
  • +10,000 credits/month
  • +All 16 endpoints
  • +Email support
  • +Overage at wallet rates
Choose Starter
ProMost popular
$49/mo
30,000 credits/month
  • +30,000 credits/month
  • +All 16 endpoints
  • +Priority support
  • +Overage at wallet rates
Choose Pro
Scale
$149/mo
125,000 credits/month
  • +125,000 credits/month
  • +All 16 endpoints
  • +Dedicated support
  • +Volume rates available
Choose Scale

Full breakdown, credit costs per tool, and FAQ on the pricing page.

Questions

The things people ask before signing up.

Is DunkAPI free?

Every account starts with 500 credits and no card. Calls cost 1 to 10 credits depending on the endpoint, so 500 is a few hundred real requests. Paid plans start at $19/mo for 10,000 credits a month, and wallet top-ups never expire.

How far back does the data go?

NBA play-by-play, with the location of every shot, runs from the 2003-04 season to today; win probability starts in 2017-18. Sportsbook lines start in 2012-13 and carry 4 to 12 books per regular-season game from 2013-14 to 2023-24 (10 to 12 from 2020-21), then usually one. The WNBA runs from 2006, men's college from 2013-14 and women's college from 2014-15, with about ten books per men's college game to 2023-24.

What is MCP, and do I need it?

MCP is the protocol Claude, Cursor and similar assistants use to call tools. Point one at https://mcp.dunkapi.com/mcp with your key and it picks the endpoint and reads the response itself — no client code. If you are writing an application instead, ignore MCP and use the REST endpoints; they are the same 16 tools.

Can I use this commercially?

Yes, inside your own product or model, within the terms. Reselling the data itself as a feed is not permitted. DunkAPI is independent and not affiliated with the NBA, the WNBA or the NCAA.

How current is it?

One update a day, early morning US Eastern (10:00 UTC): scores, box scores and the previous night's play-by-play, the next week's schedule, every book's line for the next two days, the injury report and the ratings. There is no live in-game feed.

Where do the stats come from?

Games, box scores, play-by-play, shot locations, win probability, injuries and sportsbook lines from public ESPN data. Shot zones, expected points per shot, pace, offensive and defensive ratings, standings and team Elo are computed here from those rows. Nothing is licensed from another analytics provider.

What are the rate limits?

60 requests a minute, dropping to 10 if your credit balance falls below 100. The limit is the same on every plan — credits, not requests, are the spend boundary.

Before you write another scraper

Start with 500 credits and no card.

DunkAPI · The basketball data API.