FastballAPI
MLB since 2015 plus college: pitches, plate appearances, box scores, odds by book. REST and MCP.
我該用這個嗎
品質與安全性
發現項目(1)
- LOW在 get_ratings 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"fastballapi": {
"url": "https://mcp.fastballapi.com/mcp"
}
}
}遠端端點
https://mcp.fastballapi.com/mcpstreamable-http它能做什麼
工具清單
工具(20)
🟢list_teams(season, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"null"
]
},
"teams": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
}
},
"required": [
"season",
"teams",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_games(season, season_type, team, date, from, ...)
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.
輸入結構描述
{
"type": "object",
"properties": {
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"season_type": {
"description": "regular or postseason (default both).",
"type": "string",
"enum": [
"regular",
"postseason"
]
},
"team": {
"description": "Team id or abbreviation.",
"type": "string"
},
"date": {
"description": "One date, YYYY-MM-DD (US Eastern).",
"type": "string"
},
"from": {
"description": "From date, YYYY-MM-DD.",
"type": "string"
},
"to": {
"description": "To date, YYYY-MM-DD.",
"type": "string"
},
"status": {
"type": "string",
"enum": [
"scheduled",
"final"
]
},
"limit": {
"description": "Max games (default 50).",
"type": "integer",
"minimum": 1,
"maximum": 200
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"games": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"next_offset": {
"type": [
"number",
"null"
]
}
},
"required": [
"games",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_schedule(days, team, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"days": {
"type": "integer",
"minimum": 1,
"maximum": 30
},
"team": {
"description": "Team id or abbreviation.",
"type": "string"
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"days": {
"type": "number"
},
"games": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
}
},
"required": [
"days",
"games",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_game(game_id, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string",
"description": "ESPN game id, from get_games or get_schedule."
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"game_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"game": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"batting": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"pitching": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"odds": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"win_probability": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"plate_appearances": {
"type": "number"
}
},
"required": [
"game",
"batting",
"pitching",
"odds",
"win_probability",
"plate_appearances"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_standings(season, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"null"
]
},
"standings": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"note": {
"type": "string"
}
},
"required": [
"season",
"standings",
"count",
"note"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_injuries(team, date)
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.
輸入結構描述
{
"type": "object",
"properties": {
"team": {
"type": "string"
},
"date": {
"description": "YYYY-MM-DD (default: the latest).",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
]
},
"injuries": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"note": {
"type": "string"
}
},
"required": [
"date",
"injuries",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢search_players(name, limit, league)
Use to find a player's id by name (partial names work). Costs 1 credit.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Full or partial name."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"name"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"players": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
}
},
"required": [
"players",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_player(player_id, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"player_id": {
"type": "string",
"description": "ESPN athlete id, from search_players."
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"player_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"player": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"batting": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"pitching": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"note": {
"type": "string"
}
},
"required": [
"player",
"batting",
"pitching",
"note"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_player_games(player_id, season, season_type, limit, offset, ...)
Use for a player's game log: every game's batting line and pitching line, newest first, optionally one season. Costs 5 credits.
輸入結構描述
{
"type": "object",
"properties": {
"player_id": {
"type": "string"
},
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"season_type": {
"type": "string",
"enum": [
"regular",
"postseason"
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"player_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"player_id": {
"type": "string"
},
"batting": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"pitching": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"next_offset": {
"type": [
"number",
"null"
]
}
},
"required": [
"player_id",
"batting",
"pitching",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_leaders(stat, season, min_pa, min_ip, limit, ...)
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.
輸入結構描述
{
"type": "object",
"properties": {
"stat": {
"type": "string",
"enum": [
"avg",
"obp",
"slg",
"ops",
"hr",
"re24",
"bb_pct",
"k_pct",
"era",
"whip",
"so",
"k_per_9",
"bb_per_9"
]
},
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"min_pa": {
"description": "Override the plate-appearance minimum.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"min_ip": {
"description": "Override the innings minimum.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"stat"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"stat": {
"type": "string"
},
"season": {
"type": [
"number",
"null"
]
},
"qualifier": {
"type": "string"
},
"leaders": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
}
},
"required": [
"stat",
"season",
"qualifier",
"leaders",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_team_stats(season, team, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"season": {
"description": "Season (a year, e.g. 2025; default: the latest).",
"type": [
"number",
"string"
]
},
"team": {
"type": "string"
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"null"
]
},
"teams": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"method": {
"type": "string"
}
},
"required": [
"season",
"teams",
"count",
"method"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_plate_appearances(game_id, batter_id, pitcher_id, team, season, ...)
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 win probability after (2019 on) and our run value (RE24). Filter by result, inning or runners in scoring position. Costs 10 credits.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"batter_id": {
"type": "string"
},
"pitcher_id": {
"type": "string"
},
"team": {
"description": "Batting team (id or abbreviation).",
"type": "string"
},
"season": {
"description": "Season (a year; default: the latest; ignored with game_id).",
"type": [
"number",
"string"
]
},
"season_type": {
"type": "string",
"enum": [
"regular",
"postseason"
]
},
"result": {
"description": "e.g. home-run, strikeout, walk, single, double, ground-out.",
"type": "string"
},
"inning": {
"type": "integer",
"minimum": 1,
"maximum": 25
},
"risp": {
"description": "Runners in scoring position only.",
"type": "boolean"
},
"limit": {
"description": "Max rows (default 200).",
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"plate_appearances": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"next_offset": {
"type": [
"number",
"null"
]
}
},
"required": [
"plate_appearances",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_pitches(game_id, pitcher_id, batter_id, season, pitch_type, ...)
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. Costs 10 credits.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"pitcher_id": {
"type": "string"
},
"batter_id": {
"type": "string"
},
"season": {
"description": "Season (a year; default: the latest; ignored with game_id).",
"type": [
"number",
"string"
]
},
"pitch_type": {
"description": "ESPN abbreviation, e.g. FF, SL, CH, CU, SI, FC.",
"type": "string"
},
"limit": {
"description": "Max pitches (default 500).",
"type": "integer",
"minimum": 1,
"maximum": 2000
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"pitches": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"next_offset": {
"type": [
"number",
"null"
]
},
"note": {
"type": "string"
}
},
"required": [
"pitches",
"count",
"note"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_pitch_mix(pitcher_id, season)
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. Costs 5 credits.
輸入結構描述
{
"type": "object",
"properties": {
"pitcher_id": {
"type": "string",
"description": "ESPN athlete id."
},
"season": {
"description": "Season (a year; default: the latest; ignored with game_id).",
"type": [
"number",
"string"
]
}
},
"required": [
"pitcher_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"pitcher": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"season": {
"type": [
"number",
"null"
]
},
"pitches": {
"type": "number"
},
"mix": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"note": {
"type": "string"
}
},
"required": [
"pitcher",
"season",
"pitches",
"mix",
"count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_spray_chart(batter_id, team, season, include_balls)
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. Costs 10 credits.
輸入結構描述
{
"type": "object",
"properties": {
"batter_id": {
"type": "string"
},
"team": {
"type": "string"
},
"season": {
"description": "Season (a year; default: the latest; ignored with game_id).",
"type": [
"number",
"string"
]
},
"include_balls": {
"description": "Add each ball in play's x/y (up to 3,000).",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"null"
]
},
"balls_in_play": {
"type": "number"
},
"by_trajectory": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"by_field": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"balls": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"balls_note": {
"type": "string"
}
},
"required": [
"season",
"balls_in_play",
"by_trajectory",
"by_field"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_odds(game_id, date, league)
Use for betting lines: each sportsbook's moneyline, run line and total for a game (opening and closing per book from July 2020 from The Odds API, and from 2024 from ESPN; ESPN's final line only before that), 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).
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"date": {
"description": "A day's games, YYYY-MM-DD (US Eastern).",
"type": "string"
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"games": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"note": {
"type": "string"
},
"estimate_only": {
"type": "boolean"
},
"tool": {
"type": "string"
},
"credits": {
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_line_movement(game_id, provider, league)
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 (ESPN's once a day, The Odds API's every hour for games in the next two days). Costs 10 credits.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"provider": {
"description": "One sportsbook, e.g. DraftKings.",
"type": "string"
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"required": [
"game_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"game": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"movement": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
}
},
"snapshots": {
"type": "number"
},
"note": {
"type": "string"
}
},
"required": [
"game",
"movement",
"snapshots"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_ratings(season, league)
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.
輸入結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"string"
]
},
"league": {
"description": "League. Defaults to mlb. One of: mlb, ncaabase.",
"type": "string",
"enum": [
"mlb",
"ncaabase"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"season": {
"type": [
"number",
"null"
]
},
"ratings": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"count": {
"type": "number"
},
"method": {
"type": "string"
}
},
"required": [
"season",
"ratings",
"count",
"method"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_player_props(game_id, player_id, from_date, to_date, market, ...)
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 (10 credits), or player_id with from_date (and to_date) for one player across games (10 credits per game returned, up to 100). Returns the closing line by default (the last before the game starts) or the opening line, with each book's over and under prices. Set estimate_only to get the price without being charged.
輸入結構描述
{
"type": "object",
"properties": {
"game_id": {
"description": "Game id: every player's props for that game.",
"type": "string"
},
"player_id": {
"description": "Player id (e.g. 33192) from search_players. With from_date: that player's props across games.",
"type": "string"
},
"from_date": {
"description": "With player_id: first date, YYYY-MM-DD (the game's date).",
"type": "string"
},
"to_date": {
"description": "With player_id: last date (default: no end), YYYY-MM-DD (the game's date).",
"type": "string"
},
"market": {
"description": "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 recorded)",
"type": "string",
"enum": [
"batter_hits",
"batter_home_runs",
"batter_total_bases",
"batter_rbis",
"pitcher_strikeouts",
"pitcher_outs"
]
},
"bookmaker": {
"description": "Bookmaker key, e.g. draftkings, fanduel, pinnacle.",
"type": "string"
},
"snapshot_type": {
"description": "closing (default): the last line before the game starts. opening: the first one captured.",
"type": "string",
"enum": [
"opening",
"closing"
]
},
"estimate_only": {
"description": "Return what this call would cost, without charging or running it.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"snapshot_type": {
"type": "string"
},
"games": {
"type": "number"
},
"props": {
"type": "array",
"items": {
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"game_date": {
"type": [
"string",
"null"
]
},
"player_name": {
"type": "string"
},
"player_id": {
"type": [
"string",
"number",
"null"
]
},
"market": {
"type": "string"
},
"bookmaker": {
"type": "string"
},
"line": {
"type": [
"number",
"null"
]
},
"over_odds": {
"type": [
"number",
"null"
]
},
"under_odds": {
"type": [
"number",
"null"
]
},
"captured_at": {
"type": "string"
},
"source": {
"type": "string"
}
},
"required": [
"game_id",
"game_date",
"player_name",
"player_id",
"market",
"bookmaker",
"line",
"over_odds",
"under_odds",
"captured_at",
"source"
],
"additionalProperties": false
}
},
"count": {
"type": "number"
},
"credits_per_game": {
"type": "number"
},
"next_from_date": {
"type": [
"string",
"null"
]
},
"note": {
"type": "string"
},
"estimate_only": {
"type": "boolean"
},
"tool": {
"type": "string"
},
"credits": {
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_prop_history(player_id, market, from_date, to_date, bookmaker, ...)
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 prices, what the player actually recorded from our box scores and the result against the line, plus the over rate. Costs 10 credits for up to 200 games.
輸入結構描述
{
"type": "object",
"properties": {
"player_id": {
"type": "string",
"description": "Player id (e.g. 33192) from search_players."
},
"market": {
"type": "string",
"enum": [
"batter_hits",
"batter_home_runs",
"batter_total_bases",
"batter_rbis",
"pitcher_strikeouts",
"pitcher_outs"
],
"description": "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 recorded)"
},
"from_date": {
"description": "First date, YYYY-MM-DD (the game's date).",
"type": "string"
},
"to_date": {
"description": "Last date, YYYY-MM-DD (the game's date).",
"type": "string"
},
"bookmaker": {
"description": "One book's closing line instead of the median across books, e.g. draftkings.",
"type": "string"
},
"limit": {
"description": "Games to return, oldest first (default 50, max 200). next_from_date says where to continue.",
"type": "integer",
"minimum": 1,
"maximum": 200
}
},
"required": [
"player_id",
"market"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}輸出結構描述
{
"type": "object",
"properties": {
"player_id": {
"type": [
"string",
"number"
]
},
"player_name": {
"type": [
"string",
"null"
]
},
"market": {
"type": "string"
},
"stat": {
"type": "string"
},
"bookmaker": {
"type": [
"string",
"null"
]
},
"games": {
"type": "array",
"items": {
"type": "object",
"properties": {
"game_id": {
"type": "string"
},
"game_date": {
"type": [
"string",
"null"
]
},
"line": {
"type": [
"number",
"null"
]
},
"open_line": {
"type": [
"number",
"null"
]
},
"over_odds": {
"type": [
"number",
"null"
]
},
"under_odds": {
"type": [
"number",
"null"
]
},
"books": {
"type": "number"
},
"actual": {
"type": [
"number",
"null"
]
},
"result": {
"anyOf": [
{
"type": "string",
"enum": [
"over",
"under",
"push"
]
},
{
"type": "null"
}
]
},
"margin": {
"type": [
"number",
"null"
]
}
},
"required": [
"game_id",
"game_date",
"line",
"open_line",
"over_odds",
"under_odds",
"books",
"actual",
"result",
"margin"
],
"additionalProperties": false
}
},
"count": {
"type": "number"
},
"summary": {
"type": "object",
"properties": {
"games": {
"type": "number"
},
"graded": {
"type": "number"
},
"overs": {
"type": "number"
},
"unders": {
"type": "number"
},
"pushes": {
"type": "number"
},
"over_rate": {
"type": [
"number",
"null"
]
},
"avg_line": {
"type": [
"number",
"null"
]
},
"avg_actual": {
"type": [
"number",
"null"
]
}
},
"required": [
"games",
"graded",
"overs",
"unders",
"pushes",
"over_rate",
"avg_line",
"avg_actual"
],
"additionalProperties": false
},
"truncated": {
"type": "boolean"
},
"next_from_date": {
"type": [
"string",
"null"
]
},
"note": {
"type": "string"
},
"estimate_only": {
"type": "boolean"
},
"tool": {
"type": "string"
},
"credits": {
"type": "number"
}
},
"required": [
"player_id",
"player_name",
"market",
"stat",
"bookmaker",
"games",
"count",
"summary"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}社群
證據