{"uid":"cap_0i_n4bxvTQnAi7D5Xzhjo","slug":"fanfare-api-fly-dev-293f8fe9","name":"Fanfare MLB Player Season Stats","description":"Full season hitting, pitching, and fielding stats for an MLB player by ID. Example: 660271 = Shohei Ohtani.","url":"https://fanfare-api.fly.dev/mlb/player/:player_id","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"pathParams":{"type":"object","required":["player_id"],"properties":{"player_id":{"type":"string","description":"MLB player ID"}}},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"object","required":["data","sport","errors","league","warnings","request_id","retrieved_at"],"properties":{"data":{"type":"object","required":["id","bats","stats","status","throws","team_id","position","full_name","last_name","first_name","jersey_number"],"properties":{"id":{"type":"string"},"bats":{"type":"string"},"stats":{"type":"array","items":{"type":"object","required":["type","group","splits","exemptions"],"properties":{"type":{"type":"object","required":["displayName"],"properties":{"displayName":{"type":"string"}}},"group":{"type":"object","required":["displayName"],"properties":{"displayName":{"type":"string"}}},"splits":{"type":"array","items":{"type":"object","required":["stat","team","sport","league","player","season","gameType","position"],"properties":{"stat":{"type":"object","required":["age","games","errors","assists","chances","innings","putOuts","fielding","position","doublePlays","gamesPlayed","triplePlays","gamesStarted","throwingErrors","rangeFactorPer9Inn","rangeFactorPerGame"],"properties":{"age":{"type":"number"},"games":{"type":"number"},"errors":{"type":"number"},"assists":{"type":"number"},"chances":{"type":"number"},"innings":{"type":"string"},"putOuts":{"type":"number"},"fielding":{"type":"string"},"position":{"type":"object"},"doublePlays":{"type":"number"},"gamesPlayed":{"type":"number"},"triplePlays":{"type":"number"},"gamesStarted":{"type":"number"},"throwingErrors":{"type":"number"},"rangeFactorPer9Inn":{"type":"string"},"rangeFactorPerGame":{"type":"string"}}},"team":{"type":"object","required":["id","link","name"],"properties":{"id":{"type":"number"},"link":{"type":"string"},"name":{"type":"string"}}},"sport":{"type":"object","required":["id","link","abbreviation"],"properties":{"id":{"type":"number"},"link":{"type":"string"},"abbreviation":{"type":"string"}}},"league":{"type":"object","required":["id","link","name"],"properties":{"id":{"type":"number"},"link":{"type":"string"},"name":{"type":"string"}}},"player":{"type":"object","required":["id","link","fullName"],"properties":{"id":{"type":"number"},"link":{"type":"string"},"fullName":{"type":"string"}}},"season":{"type":"string"},"gameType":{"type":"string"},"position":{"type":"object","required":["code","name","type","abbreviation"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"abbreviation":{"type":"string"}}}}}},"exemptions":{"type":"array","items":{"type":"unknown"}}}}},"status":{"type":"string"},"throws":{"type":"string"},"team_id":{"type":"string"},"position":{"type":"string"},"full_name":{"type":"string"},"last_name":{"type":"string"},"first_name":{"type":"string"},"jersey_number":{"type":"string"}}},"sport":{"type":"string"},"errors":{"type":"array","items":{"type":"unknown"}},"league":{"type":"string"},"warnings":{"type":"array","items":{"type":"unknown"}},"request_id":{"type":"string"},"retrieved_at":{"type":"string"}}},"example":{"request":{"input":{"type":"http","method":"GET","pathParams":{"player_id":"543037"}}},"response":{"data":{"id":"543037","bats":"R","stats":[{"type":{"displayName":"season"},"group":{"displayName":"fielding"},"splits":[{"stat":{"age":35,"games":5,"errors":0,"assists":2,"chances":5,"innings":"28.0","putOuts":3,"fielding":"1.000","position":{"code":"1","name":"Pitcher","type":"Pitcher","abbreviation":"P"},"doublePlays":0,"gamesPlayed":5,"triplePlays":0,"gamesStarted":5,"throwingErrors":0,"rangeFactorPer9Inn":"1.61","rangeFactorPerGame":"1.00"},"team":{"id":147,"link":"/api/v1/teams/147","name":"New York Yankees"},"sport":{"id":1,"link":"/api/v1/sports/1","abbreviation":"MLB"},"league":{"id":103,"link":"/api/v1/league/103","name":"American League"},"player":{"id":543037,"link":"/api/v1/people/543037","fullName":"Gerrit Cole"},"season":"2026","gameType":"R","position":{"code":"1","name":"Pitcher","type":"Pitcher","abbreviation":"P"}}],"exemptions":[]},{"type":{"displayName":"season"},"group":{"displayName":"pitching"},"splits":[{"stat":{"age":35,"avg":".196","era":"2.57","obp":".261","ops":".614","slg":".353","hits":20,"outs":84,"runs":8,"whip":"1.00","wins":2,"balks":0,"holds":0,"saves":0,"atBats":102,"losses":1,"airOuts":38,"doubles":4,"strikes":277,"triples":0,"homeRuns":4,"pickoffs":1,"sacBunts":0,"sacFlies":0,"shutouts":0,"blownSaves":0,"earnedRuns":8,"groundOuts":20,"hitBatsmen":1,"hitByPitch":1,"strikeOuts":24,"totalBases":36,"baseOnBalls":8,"gamesPlayed":5,"hitsPer9Inn":"6.43","stolenBases":2,"wildPitches":0,"battersFaced":112,"gamesPitched":5,"gamesStarted":5,"homeRunsPer9":"1.29","walksPer9Inn":"2.57","completeGames":0,"gamesFinished":0,"winPercentage":".667","caughtStealing":1,"inningsPitched":"28.0","runsScoredPer9":"2.57","numberOfPitches":407,"inheritedRunners":0,"intentionalWalks":0,"pitchesPerInning":"14.54","strikePercentage":".680","saveOpportunities":0,"strikeoutsPer9Inn":"7.71","strikeoutWalkRatio":"3.00","groundOutsToAirouts":"0.53","catchersInterference":1,"groundIntoDoublePlay":0,"stolenBasePercentage":".667","inheritedRunnersScored":0,"caughtStealingPercentage":".333"},"team":{"id":147,"link":"/api/v1/teams/147","name":"New York Yankees"},"sport":{"id":1,"link":"/api/v1/sports/1","abbreviation":"MLB"},"league":{"id":103,"link":"/api/v1/league/103","name":"American League"},"player":{"id":543037,"link":"/api/v1/people/543037","fullName":"Gerrit Cole"},"season":"2026","gameType":"R"}],"exemptions":[]}],"status":"active","throws":"R","team_id":"147","position":"P","full_name":"Gerrit Cole","last_name":"Cole","first_name":"Gerrit","jersey_number":"45"},"sport":"baseball","errors":[],"league":"mlb","warnings":[],"request_id":"a87087a5-610e-4232-9541-0ff27aedc2ea","retrieved_at":"2026-06-18T05:05:49.162027+00:00"}},"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3FZ5K8B0xpeFt_lG6gWBL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns full season hitting, pitching, and fielding statistics for an MLB player identified by their MLB player ID.","exampleAgentPrompt":"Pull up Shohei Ohtani's full season stats — hitting, pitching, and fielding — his MLB player ID is 660271.","exampleUseCases":[{"title":"Fantasy baseball league waiver wire decisions","prompt":"I'm trying to decide whether to pick up this pitcher for my fantasy league. Can you pull up his complete season stats — ERA, strikeouts, WHIP, and wins — his player ID is 543210? I need to know if he's worth dropping someone for."},{"title":"Comparing two baseball players head-to-head","prompt":"Help me settle a debate with my friend about who had a better season. Can you grab the full hitting stats for both players — their IDs are 660271 and 445239 — so we can compare their batting averages, home runs, and RBIs side by side?"},{"title":"Researching player performance for sports writing","prompt":"I'm writing an article about this season's standout defensive players. Can you get me the complete season statistics including fielding stats for player 123456? I need hitting, pitching, and fielding numbers to give readers the full picture."}],"resultDescription":"Full season statistics for the specified MLB player, including hitting stats (e.g. batting average, home runs, RBIs, OPS), pitching stats (e.g. ERA, strikeouts, WHIP, wins), and fielding stats for the current or most recent season.","failureModes":["Invalid or non-existent player ID returns an error or empty response","Player ID belongs to a minor league or historical player not in the active dataset","Endpoint unavailable or returns 402 if payment is not provided","Partial stats returned if the player has not played both as hitter and pitcher"],"whenToPreferThis":"Use this endpoint when you need comprehensive season-level statistics (hitting, pitching, and fielding) for a specific MLB player and you have their MLB player ID. Ideal for fantasy baseball analysis, player comparisons, sports trivia, and reporting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:46:37.108Z","isFirstParty":false}