Discover/statmuse.com API
live

statmuse.com APIstatmuse.com

Query NBA, NFL, MLB, and NHL player and team statistics using natural language via the StatMuse API. Get structured stat tables, answers, and search suggestions.

Endpoints
4
Updated
3mo ago
Try it
Timeframe for stats (e.g., 'last 10 games', '2023-24 season', 'career')
Full name of the player (e.g., 'LeBron James')
api.parse.bot/scraper/6546515f-73d6-44cc-b3e2-2cafc0b022b1/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/6546515f-73d6-44cc-b3e2-2cafc0b022b1/get_player_stats?timeframe=last+10+games&player_name=LeBron+James' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 4 totalclick to expand

Get detailed player statistics by providing a player name and optional timeframe. Constructs a natural language query and returns the answer with game-by-game or aggregated statistical tables.

Input
ParamTypeDescription
timeframestringTimeframe for stats (e.g., 'last 10 games', '2023-24 season', 'career')
player_namerequiredstringFull name of the player (e.g., 'LeBron James')
Response
{
  "type": "object",
  "fields": {
    "url": "string — the StatMuse URL for this query",
    "query": "string — the constructed query sent to StatMuse",
    "answer": "string — natural language answer summary",
    "tables": "array of objects, each with 'title' (string) and 'rows' (array of stat row objects)"
  },
  "sample": {
    "data": {
      "url": "https://www.statmuse.com/ask?query=LeBron+James+stats+last+10+games",
      "query": "LeBron James stats last 10 games",
      "answer": "LeBron Jameshas averaged 23.2 points, 7.3 assists and 6.7 rebounds in 10 games in his last 10 games.",
      "tables": [
        {
          "rows": [
            {
              "TM": "LAL",
              "AST": "13",
              "OPP": "HOU",
              "PTS": "19",
              "REB": "8",
              "DATE": "4/18/2026",
              "NAME": "LeBron James"
            }
          ],
          "title": "Results"
        }
      ]
    },
    "status": "success"
  }
}

About the statmuse.com API

The StatMuse API exposes 4 endpoints for querying sports statistics across NBA, NFL, MLB, NHL, and other leagues using natural language. The ask endpoint accepts any sports question in plain English and returns a text answer alongside structured stat tables. Player-focused requests go through get_player_stats, which accepts a player name and optional timeframe and delivers aggregated or game-by-game rows. Autocomplete support is available via search_suggestions.

Endpoints and What They Return

The ask endpoint is the most flexible entry point: pass any query string — for example, "Who has the most points in NBA history?" — and receive an answer string summarizing the result plus a tables array. Each table object carries a title and a rows array of stat row objects whose columns depend on the query. The url field in every response links back to the corresponding StatMuse page.

get_player_stats narrows the focus to a single athlete. Supply player_name as a required input and optionally pass a timeframe value such as 'last 10 games', '2023-24 season', or 'career'. The endpoint constructs a natural language query internally, visible in the query field of the response, and returns the same answer + tables structure. Rows in the tables reflect whatever statistical columns StatMuse surfaces for that player and timeframe.

Team Data and Search Suggestions

get_team_info works similarly to the player endpoint but targets franchises. Pass a team_name (e.g., 'Golden State Warriors') and an optional query_type such as 'stats last 10 games', 'historical record', or 'roster'. The response shape is identical — url, query, answer, and tables — making it straightforward to handle player and team responses with the same parsing logic.

search_suggestions accepts a partial query string and returns a sections array. Each section has a type field and a suggestions array where each item includes display text, image_url, league, and type. This is useful for building typeahead UIs or resolving ambiguous team and player names before sending a full query.

Common use cases
  • Build a fantasy sports assistant that fetches per-player stat tables for any timeframe using get_player_stats
  • Power a sports chatbot that answers arbitrary fan questions by passing free-text queries to the ask endpoint
  • Populate a team dashboard with recent game logs via get_team_info with query_type set to 'stats last 10 games'
  • Implement autocomplete in a sports search bar using search_suggestions with league and type fields for categorization
  • Pull career statistics for historical player comparisons using the timeframe: 'career' parameter
  • Retrieve roster snapshots for any franchise by setting query_type to 'roster' in get_team_info
  • Aggregate cross-sport statistical trivia answers by querying the ask endpoint across NBA, NFL, MLB, and NHL subjects
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does StatMuse have an official developer API?+
StatMuse does not publish a documented public developer API. Their platform is designed for end-user natural language queries on statmuse.com, not programmatic data access.
What does the `tables` field in the response actually contain?+
Each object in the tables array has a title string describing what the table covers and a rows array of stat row objects. The specific keys in each row depend on the query — for example, a game-log query will include per-game columns like points, assists, and rebounds, while a career query may return season-by-season aggregates.
Does the API return play-by-play data or live game scores?+
No play-by-play breakdowns or live in-game scores are currently exposed. The API covers aggregated player stats, team game logs, historical records, and natural language answer summaries. You can fork the API on Parse and revise it to add an endpoint targeting live or play-by-play data if StatMuse surfaces that information.
Can I filter `get_player_stats` results by specific statistical categories, such as only three-point shooting?+
There is no dedicated filter parameter for individual stat categories. Filtering is expressed through the timeframe input and the natural language query that gets constructed from it. The columns returned in rows reflect what StatMuse includes for that query. You can fork the API on Parse and revise the query construction logic to target more specific statistical breakdowns.
How fresh is the data returned by these endpoints?+
The data reflects whatever StatMuse currently shows for a given query. StatMuse updates its statistics after games complete, so results for ongoing seasons are generally current to recent completed games, but there is no guaranteed real-time freshness or a response field indicating a last-updated timestamp.
Page content last updated . Spec covers 4 endpoints from statmuse.com.
Related APIs in SportsSee all →
ncaa.com API
Access live college sports scores, game schedules, detailed boxscores, play-by-play breakdowns, and team statistics across NCAA sports. Search for specific contests and retrieve comprehensive game information for any NCAA sport, division, or team.
bet365.bet.br API
Access live betting odds, featured sports events, and real-time scores directly from bet365 Brazil's platform across multiple sports including Formula 1 and in-play markets. Get current match results, browse available betting categories, and view homepage promotions all through structured data endpoints.
nfl.com API
Access real-time NFL data including game schedules, scores, player statistics, team rosters, standings, injury reports, fantasy rankings, and the latest news — all from nfl.com.
maxpreps.com API
Access high school sports data from MaxPreps. Search for schools, retrieve team rosters and schedules, look up athlete profiles, and browse national or state rankings across all sports.
axs.com API
Search for events, performers, and venues across AXS.com to find tickets, pricing, and availability information in your area or by category. Browse featured events, explore venues by city, and access detailed event information all in one place.
pdga.com API
Access player profiles, ratings history, tournament events, live scoring, world rankings, and the course directory from the Professional Disc Golf Association.
bwfbadminton.com API
Track badminton tournaments worldwide by browsing the BWF calendar, viewing tournament draw brackets, and retrieving detailed match results with player stats and scores. Stay updated on competitions and analyze matchups with comprehensive tournament data from the Badminton World Federation.
formula1.com API
Get comprehensive Formula 1 data including race results, qualifying sessions, practice sessions, pit stops, and driver/team standings from 1950 to present. Track live race schedules, fastest laps, starting grids, and historical world champions to stay updated on all F1 season information.