FastballAPI
v1.1.6MLB since 2015 plus college: pitches, plate appearances, box scores, odds by book.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_teams List teams
Use to find team ids and abbreviations for a season (default: the latest). Every other tool takes a team as an id or abbreviation. Costs 1 credit.
| Parameter | Type | Description |
|---|---|---|
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
get_games Games
Use to list games with runs, hits and errors by season, date, date range or team, newest first. For upcoming games with lines use get_schedule; for one game's box score use get_game. Costs 2 credits.
| Parameter | Type | Description |
|---|---|---|
date | string | One date, YYYY-MM-DD (US Eastern). |
from | string | From date, YYYY-MM-DD. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
limit | integer | Max games (default 50). |
offset | integer | |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
season_type | string | regular or postseason (default both). |
status | string | |
team | string | Team id or abbreviation. |
to | string | To date, YYYY-MM-DD. |
get_schedule Schedule
Use for upcoming games (next 1-30 days, default 7) with the median line across posted sportsbooks: moneylines, run line and total. For every book's line use get_odds. Costs 2 credits. Prices are market information; no tool places, accepts or tracks wagers.
| Parameter | Type | Description |
|---|---|---|
days | integer | |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
team | string | Team id or abbreviation. |
get_game Game
Use for one game in full: line score, every batter's and pitcher's line, each sportsbook's opening and closing line, and the win-probability range. For every plate appearance use get_plate_appearances. Costs 5 credits. Prices are market information; no tool places, accepts or tracks wagers.
| Parameter | Type | Description |
|---|---|---|
game_id * | string | Game id, from get_games or get_schedule. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
get_standings Standings
Use for a season's regular-season standings computed from every final game: record, home and away, last 10, runs scored and allowed, run differential and Pythagorean win percentage. Costs 2 credits.
| Parameter | Type | Description |
|---|---|---|
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
get_injuries Injuries
Use for the injury report: every listed player's status, injury and expected return, as captured on the latest day (or the latest on or before date). Costs 2 credits.
| Parameter | Type | Description |
|---|---|---|
date | string | YYYY-MM-DD (default: the latest). |
team | string |
search_players Search players
Use to find a player's id by name (partial names work). Costs 1 credit.
| Parameter | Type | Description |
|---|---|---|
name * | string | Full or partial name. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
limit | integer |
get_player Player
Use for a player's season-by-season batting (AVG, OBP, SLG, OPS, HR, K%, BB%, RE24, from every plate appearance) and pitching (ERA, WHIP, K/9, BB/9). Costs 5 credits.
| Parameter | Type | Description |
|---|---|---|
player_id * | string | Player id, from search_players. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
get_player_games Player games
Use for a player's game log: every game's batting line and pitching line, newest first, optionally one season. Costs 5 credits.
| Parameter | Type | Description |
|---|---|---|
player_id * | string | |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
limit | integer | |
offset | integer | |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
season_type | string |
get_leaders Leaders
Use for a season's leaders among qualified players: batting avg, obp, slg, ops, hr, re24, bb_pct, k_pct (3.1 plate appearances per team game) or pitching era, whip, so, k_per_9, bb_per_9 (1 inning per team game). Costs 5 credits.
| Parameter | Type | Description |
|---|---|---|
stat * | string | |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
limit | integer | |
min_ip | integer | Override the innings minimum. |
min_pa | integer | Override the plate-appearance minimum. |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
get_team_stats Team stats
Use for team offence and run prevention for a season: runs per game for and against, run differential, and batting and opponents' batting (AVG, OBP, SLG, OPS, K%, BB%, HR) from every plate appearance. Costs 5 credits.
| Parameter | Type | Description |
|---|---|---|
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
season | number | string | Season (a year, e.g. 2025; default: the latest). |
team | string |
get_plate_appearances Plate appearances
Use for plate-appearance play-by-play: a whole game in order, or a batter's, pitcher's or team's season, with the base-out state before, the result, the batted ball (trajectory and location), runs, the home win probability after (our model, every plate appearance since 2015) and our run value (RE24). Filter by result, inning or runners in scoring position. Costs 10 credits.
| Parameter | Type | Description |
|---|---|---|
batter_id | string | |
game_id | string | |
inning | integer | |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
limit | integer | Max rows (default 200). |
offset | integer | |
pitcher_id | string | |
result | string | e.g. home-run, strikeout, walk, single, double, ground-out. |
risp | boolean | Runners in scoring position only. |
season | number | string | Season (a year; default: the latest; ignored with game_id). |
season_type | string | |
team | string | Batting team (id or abbreviation). |
get_pitches Pitches
Use for pitch-by-pitch data: every pitch of a game, or a pitcher's or batter's season, with the count, pitch type, velocity, location and result. Velocity is whole mph as published, cut down rather than rounded (95.8 reads 95), so averages run about half a mile per hour under the published one-decimal figures. Costs 10 credits.
| Parameter | Type | Description |
|---|---|---|
batter_id | string | |
game_id | string | |
limit | integer | Max pitches (default 500). |
offset | integer | |
pitch_type | string | Pitch type code, e.g. FF, SL, CH, CU, SI, FC. |
pitcher_id | string | |
season | number | string | Season (a year; default: the latest; ignored with game_id). |
get_pitch_mix Pitch mix
Use for a pitcher's arsenal in a season: each pitch type's usage, average and top velocity, whiff rate per swing and ball rate. Velocities come from whole-mph readings cut down rather than rounded, so the averages run about half a mile per hour under the published one-decimal figures. Costs 5 credits.
| Parameter | Type | Description |
|---|---|---|
pitcher_id * | string | Player id. |
season | number | string | Season (a year; default: the latest; ignored with game_id). |
season_type | string | regular, postseason, or all (default): which games' pitches. |
get_spray_chart Spray chart
Use for where a batter or team hits the ball: balls in play by trajectory (ground ball, line drive, fly ball, pop-up) and by field (left, center, right), with hit rates; include_balls adds each ball's location for drawing. Counts the regular season and postseason together unless season_type says otherwise (get_player's batting line is the regular season alone). Costs 10 credits.
| Parameter | Type | Description |
|---|---|---|
batter_id | string | |
include_balls | boolean | Add each ball in play's x/y (up to 3,000). |
season | number | string | Season (a year; default: the latest; ignored with game_id). |
season_type | string | regular, postseason, or all (default): which games' balls in play to count. |
team | string |
get_odds Odds
Use for betting lines: each sportsbook's moneyline, run line and total for a game (opening and closing per book from July 2020; before that, each book's final pregame line only), with implied probabilities and, for finished games, whether the favourite won and the total went over against the median close. Pass game_id for one game (5 credits) or date for a day's games (10 credits). Prices are market information; no tool places, accepts or tracks wagers.
| Parameter | Type | Description |
|---|---|---|
date | string | A day's games, YYYY-MM-DD (US Eastern). |
game_id | string | |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
get_line_movement Line movement
Use to see how a game's line moved before first pitch: our pre-game snapshots of each sportsbook's moneyline, run line and total (captured once a day, and every hour for games in the next four days). Costs 10 credits. Prices are market information; no tool places, accepts or tracks wagers.
| Parameter | Type | Description |
|---|---|---|
game_id * | string | |
all_snapshots | boolean | Every hourly capture. By default a capture identical to the one before it is left out (the latest is always kept), which keeps every move and its time. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
provider | string | One sportsbook, e.g. DraftKings. |
get_ratings Ratings
Use for our team power ratings (Elo from every final game in our data), ranked, as of the end of a season or today. Costs 2 credits.
| Parameter | Type | Description |
|---|---|---|
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
season | number | string |
get_player_props Player props
Use for player prop lines by sportsbook: over/under on hits, home runs, total bases, RBI, pitcher strikeouts and pitcher outs, from May 2023 (DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle and others). Pass game_id for every player's props in one game, or player_id with from_date (and to_date) for one player across games (up to 100). A game costs 10 credits before it starts and 20 once it has (accounts opened before October 30 2026 pay 10 for every game). Returns the closing line by default (the last before the game starts) or the opening line, with each book's over and under prices. Each row…
| Parameter | Type | Description |
|---|---|---|
bookmaker | string | Bookmaker key, e.g. draftkings, fanduel, pinnacle. |
estimate_only | boolean | Return what this call would cost, without charging or running it. |
from_date | string | With player_id: first date, YYYY-MM-DD (the game's date). |
game_id | string | Game id: every player's props for that game. |
market | string | One market: batter_hits (hits), batter_home_runs (home runs), batter_total_bases (total bases), batter_rbis (runs batted in), pitcher_strikeouts (pitcher strikeouts), pitcher_outs (pitcher outs record… |
player_id | string | Player id (e.g. 33192) from search_players. With from_date: that player's props across games. |
snapshot_type | string | closing (default): the last line before the game starts. opening: the first one captured, which is the same capture as the close wherever only one was taken. |
to_date | string | With player_id: last date (default: no end), YYYY-MM-DD (the game's date). |
get_prop_history Prop history
Use to see how a player did against his prop line over time: for one market (hits, home runs, total bases, RBI, pitcher strikeouts or pitcher outs), one row per game with the closing line (the median across books, or one book's), the opening line (the same as the close wherever only one capture was taken), the prices, what the player actually recorded from our box scores and the result against the line, plus the over rate, up to 200 games a call. Costs 10 credits for every 25 games already played that a call covers, and at least 10 a call (accounts opened before November 1 2026 pay 10 a call).…
| Parameter | Type | Description |
|---|---|---|
market * | string | The market: batter_hits (hits), batter_home_runs (home runs), batter_total_bases (total bases), batter_rbis (runs batted in), pitcher_strikeouts (pitcher strikeouts), pitcher_outs (pitcher outs record… |
player_id * | string | Player id (e.g. 33192) from search_players. |
bookmaker | string | One book's closing line instead of the median across books, e.g. draftkings. |
estimate_only | boolean | Return what this call would cost, without charging or running it. |
from_date | string | First date, YYYY-MM-DD (the game's date). |
limit | integer | Games to return, oldest first (default 50, max 200). next_from_date says where to continue. |
to_date | string | Last date, YYYY-MM-DD (the game's date). |
get_prop_movement Prop movement
Use to see how one player's prop line moved before a game: every capture we hold, book by book and oldest first, with the line, both prices and the minutes before the start. line_change is the last capture's line minus the first's. The number of captures varies by game and book. Costs 10 credits. Prices are market information; no tool places, accepts or tracks wagers.
| Parameter | Type | Description |
|---|---|---|
game_id * | string | Game id. |
market * | string | The market: batter_hits (hits), batter_home_runs (home runs), batter_total_bases (total bases), batter_rbis (runs batted in), pitcher_strikeouts (pitcher strikeouts), pitcher_outs (pitcher outs record… |
player_id * | string | Player id (e.g. 33192) from search_players. |
bookmaker | string | One book's captures, e.g. draftkings. |
get_market_odds Market odds
Use for the extra betting markets of a game as history: the first 5 innings winner, run line and total, and the 1st inning total and three-way result (the 1st inning total at 0.5 is the no-run-first-inning market). Pass game_id (from get_games or get_schedule) and market. For each sportsbook it returns the opening line (the first one we captured) and the closing line (the last one before the game started), each as the list of outcomes with their point and American price, plus captured_at and minutes_before_start (negative when the last capture came after our scheduled start, which the sportsbo…
| Parameter | Type | Description |
|---|---|---|
game_id * | string | Game id from get_games or get_schedule. |
market * | string | The market: h2h_1st_5_innings (first 5 innings winner), totals_1st_5_innings (first 5 innings total runs), spreads_1st_5_innings (first 5 innings run line), totals_1st_1_innings (1st inning total runs… |
bookmaker | string | One bookmaker key, e.g. draftkings, fanduel, pinnacle. |
estimate_only | boolean | Return what this call would cost, without charging or running it. |
get_alt_lines Alt lines
Use for alternate run lines and totals by sportsbook: every point on each book's ladder with its price (e.g. -2.5 at +190, over 9.5 at +140), for one game. Held for MLB games from the 2023 season on, from five books (DraftKings, FanDuel, BetMGM, Bovada, Pinnacle). Games before Nov 12 2026 were captured once shortly before first pitch, so their opening and closing ladders are the same; from Nov 12 2026 upcoming games are captured up to three times a day before the start. Games not yet priced have none. Returns each book's closing ladder by default (its last before the start) or its opening one.…
| Parameter | Type | Description |
|---|---|---|
game_id * | string | Game id, e.g. 776512 (from get_games or get_schedule). |
bookmaker | string | One bookmaker key, e.g. draftkings, fanduel. |
league | string | League. Defaults to mlb. One of: mlb, ncaabase. |
market | string | One market (default both). |
snapshot_type | string | Closing (default) or opening ladder. |