MLB Team Roster API
Get MLB Team Roster data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, raw, team_id, and retrieve structured data including resolved MLB team identifier, uniform jersey number, position abbreviation, position type, and current roster status to display club roster pages, and audit historical team rosters.
- Selected price
- $0.002 / billing creditPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
MLB Team Roster API
Prepare your request, then continue with your agent.
Pricing
$0.002 / billing credit
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
- Provider
- API
- Pricing
On this page
Overview
MLB Team Roster API
Pass team_id (numeric ID such as 147 or abbreviation such as nyy or lad) with optional type (roster type), season and date (YYYY-MM-DD historical roster). Returned players[] list each member's ID, jersey, position, position_type, status, bats/throws, height, weight and debut date.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Required query: team_id (team ID or abbreviation). Optional type, season, date (YYYY-MM-DD), raw=0, fields and fresh=1. |
| Selected implementation | apish · MLB team roster (active, 40-man, depth chart, coaches) API |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Display club roster pages: Group players[] by position_type with jersey numbers, bats/throws and status badges.
- Audit historical team rosters: Pass season and date=YYYY-MM-DD to reconstruct a club's roster on Opening Day or postseason games.
- Resolve player IDs for a club: Read players[].id from the roster and query MLB Player Profile API or MLB Player Stats API.
Returned Data
| Field | Meaning |
|---|---|
team_id |
Resolved MLB team identifier |
count |
Number of roster entries returned |
players[].id |
MLB player or coach identifier |
players[].name |
Player or staff full name |
players[].jersey |
Uniform jersey number |
players[].position |
Position abbreviation |
players[].position_type |
Position group such as Pitcher or Outfielder |
players[].status |
Current roster status |
players[].bats |
Batting handedness |
players[].throws |
Throwing handedness |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/apish/mlb/v1/roster \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
--data-urlencode output=json \
--data-urlencode raw=0 \
--data-urlencode team_id=147
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published MLB Team Roster API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
apishCurrent MLB team roster (active, 40-man, depth chart, coaches) API · GET · View API reference | $0.002 / billing credit | 0 | —successP50— |
- Pricing
- $0.002
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/apish/mlb/v1/roster- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
team_id | URL query parametersquery | string | Yes | Team id (147) or abbreviation (nyy, lad ...). |
type | URL query parametersquery | string | No | Roster type. enum: "active", "40Man", "fullSeason", "fullRoster", "depthChart", "allTime", "coach", "nonRosterInvitees", "gameday" |
season | URL query parametersquery | string | No | Season year. |
date | URL query parametersquery | string | No | Roster on this date (YYYY-MM-DD). |
raw | URL query parametersquery | string | No | 0 leaves out the bulky `raw` source blocks (often 10-30x smaller). enum: "0", "1" |
fields | URL query parametersquery | string | No | Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included. |
fresh | URL query parametersquery | string | No | 1 skips the 24-hour cache and fetches live. enum: "1" |
output | URL query parametersquery | string | No | JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported. enum: "json" |
records | URL query parametersquery | string | No | With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row. |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
applied_filtersobjectdatenullseasonnulltypestring
cachedbooleancountintegercredits_usedintegerfetched_atstringplayersobject[]ageintegerbatsstringbirth_countrystringbirth_datestringdebutstring | nullheightstringidintegerjerseystring | nulljobnullnamestringpositionstringposition_namestringposition_typestringstatusstringthrowsstringweightinteger
team_idinteger
Composite rule pricing
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.
| Fee item | Price | Metering source | When | Quantity limit |
|---|---|---|---|---|
| Actual API.SH credits consumed | $0.002000 / billing credit | Response · /credits_used · Numeric value | Always | 1 billing credit · Decimal places: 0 |
Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.002000.
Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.
Pricing parameters and defaults
[]
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example · Live API.SH response · Minimal request
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 9
Review these request fields before running. Keep the published provider and request method unchanged.
team_id- Team id (147) or abbreviation (nyy, lad ...).
type- Roster type.
season- Season year.
date- Roster on this date (YYYY-MM-DD).
raw- 0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
fields- Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
fresh- 1 skips the 24-hour cache and fetches live.
output- JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
records- With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/apish/mlb/v1/roster?output=json&raw=0&team_id=147' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "applied_filters": { "date": null, "season": null, "type": "active" }, "cached": false, "count": 38, "credits_used": 1, "fetched_at": "2026-11-19T12:22:07.662Z", "players": [ { "age": 34, "bats": "R", "birth_country": "USA", "birth_date": "1992-04-26", "debut": "2016-08-13", "height": "6' 7\"", "id": 592450, "jersey": "99", "job": null, "name": "Aaron Judge", "position": "RF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "R", "weight": 282 }, { "age": 29, "bats": "R", "birth_country": "Venezuela", "birth_date": "1997-01-20", "debut": "2020-08-10", "height": "6' 0\"", "id": 645305, "jersey": "39", "job": null, "name": "Ali Sánchez", "position": "C", "position_name": "Catcher", "position_type": "Catcher", "status": "Active", "throws": "R", "weight": 200 }, { "age": 24, "bats": "R", "birth_country": "Dominican Republic", "birth_date": "2002-07-28", "debut": "2024-06-03", "height": "6' 2\"", "id": 683409, "jersey": "57", "job": null, "name": "Angel Chivilli", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 185 }, { "age": 25, "bats": "R", "birth_country": "USA", "birth_date": "2001-04-28", "debut": "2023-03-30", "height": "5' 10\"", "id": 683011, "jersey": "11", "job": null, "name": "Anthony Volpe", "position": "SS", "position_name": "Shortstop", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 197 }, { "age": 27, "bats": "L", "birth_country": "USA", "birth_date": "1999-07-12", "debut": "2023-09-01", "height": "6' 1\"", "id": 669224, "jersey": "28", "job": null, "name": "Austin Wells", "position": "C", "position_name": "Catcher", "position_type": "Catcher", "status": "Active", "throws": "R", "weight": 220 }, { "age": 27, "bats": "L", "birth_country": "USA", "birth_date": "1999-02-22", "debut": "2024-06-18", "height": "6' 2\"", "id": 700250, "jersey": "22", "job": null, "name": "Ben Rice", "position": "DH", "position_name": "Designated Hitter", "position_type": "Hitter", "status": "Active", "throws": "R", "weight": 228 }, { "age": 27, "bats": "R", "birth_country": "USA", "birth_date": "1999-02-10", "debut": "2026-08-14", "height": "6' 4\"", "id": 690440, "jersey": "93", "job": null, "name": "Bradley Hanner", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 210 }, { "age": 28, "bats": "R", "birth_country": "USA", "birth_date": "1998-10-06", "debut": "2026-05-07", "height": "6' 2\"", "id": 694341, "jersey": "89", "job": null, "name": "Brendan Beck", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 218 }, { "age": 28, "bats": "L", "birth_country": "USA", "birth_date": "1997-12-17", "debut": "2023-04-19", "height": "6' 6\"", "id": 687396, "jersey": "47", "job": null, "name": "Brent Headrick", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "L", "weight": 235 }, { "age": 25, "bats": "R", "birth_country": "USA", "birth_date": "2001-02-05", "debut": "2025-07-09", "height": "6' 6\"", "id": 693645, "jersey": "31", "job": null, "name": "Cam Schlittler", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 215 }, { "age": 23, "bats": "R", "birth_country": "Dominican Republic", "birth_date": "2003-05-25", "debut": null, "height": "6' 7\"", "id": 801739, "jersey": null, "job": null, "name": "Carlos Lagrange", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 248 }, { "age": 33, "bats": "L", "birth_country": "USA", "birth_date": "1992-12-10", "debut": "2015-04-21", "height": "6' 2\"", "id": 607074, "jersey": "55", "job": null, "name": "Carlos Rodón", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "L", "weight": 255 }, { "age": 25, "bats": "R", "birth_country": "USA", "birth_date": "2001-08-07", "debut": null, "height": "6' 2\"", "id": 694633, "jersey": null, "job": null, "name": "Chase Hampton", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 225 }, { "age": 30, "bats": "R", "birth_country": "USA", "birth_date": "1996-02-20", "debut": "2020-09-04", "height": "6' 1\"", "id": 657376, "jersey": "36", "job": null, "name": "Clarke Schmidt", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 210 }, { "age": 31, "bats": "L", "birth_country": "USA", "birth_date": "1995-07-13", "debut": "2017-04-25", "height": "6' 3\"", "id": 641355, "jersey": "35", "job": null, "name": "Cody Bellinger", "position": "LF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "L", "weight": 204 }, { "age": 32, "bats": "L", "birth_country": "USA", "birth_date": "1994-10-10", "debut": "2019-09-01", "height": "6' 1\"", "id": 670280, "jersey": "53", "job": null, "name": "David Bednar", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 250 }, { "age": 23, "bats": "L", "birth_country": "Puerto Rico", "birth_date": "2003-08-18", "debut": "2026-04-29", "height": "6' 4\"", "id": 695684, "jersey": "71", "job": null, "name": "Elmer Rodríguez", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 177 }, { "age": 36, "bats": "R", "birth_country": "Puerto Rico", "birth_date": "1990-03-28", "debut": "2022-09-02", "height": "6' 2\"", "id": 518585, "jersey": "63", "job": null, "name": "Fernando Cruz", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 237 }, { "age": 26, "bats": "R", "birth_country": "USA", "birth_date": "2000-06-28", "debut": null, "height": "6' 3\"", "id": 682003, "jersey": null, "job": null, "name": "Garrett Martin", "position": "RF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "R", "weight": 217 }, { "age": 21, "bats": "R", "birth_country": "USA", "birth_date": "2005-06-02", "debut": "2026-08-04", "height": "6' 2\"", "id": 806146, "jersey": "96", "job": null, "name": "George Lombard Jr.", "position": "SS", "position_name": "Shortstop", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 190 }, { "age": 36, "bats": "R", "birth_country": "USA", "birth_date": "1990-09-08", "debut": "2013-06-11", "height": "6' 4\"", "id": 543037, "jersey": "45", "job": null, "name": "Gerrit Cole", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 220 }, { "age": 37, "bats": "R", "birth_country": "USA", "birth_date": "1989-11-08", "debut": "2010-06-08", "height": "6' 5\"", "id": 519317, "jersey": "27", "job": null, "name": "Giancarlo Stanton", "position": "DH", "position_name": "Designated Hitter", "position_type": "Hitter", "status": "Active", "throws": "R", "weight": 245 }, { "age": 27, "bats": "R", "birth_country": "Puerto Rico", "birth_date": "1999-09-07", "debut": "2022-04-10", "height": "5' 11\"", "id": 671218, "jersey": "34", "job": null, "name": "Heliot Ramos", "position": "LF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "R", "weight": 235 }, { "age": 31, "bats": "L", "birth_country": "USA", "birth_date": "1995-04-24", "debut": "2025-03-29", "height": "6' 2\"", "id": 641555, "jersey": "25", "job": null, "name": "J.C. Escarra", "position": "C", "position_name": "Catcher", "position_type": "Catcher", "status": "Active", "throws": "R", "weight": 220 }, { "age": 23, "bats": "S", "birth_country": "Dominican Republic", "birth_date": "2003-02-07", "debut": "2023-09-01", "height": "5' 9\"", "id": 691176, "jersey": "24", "job": null, "name": "Jasson Domínguez", "position": "RF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "R", "weight": 218 }, { "age": 30, "bats": "R", "birth_country": "Panama", "birth_date": "1996-08-30", "debut": "2023-04-15", "height": "5' 9\"", "id": 676609, "jersey": "72", "job": null, "name": "José Caballero", "position": "SS", "position_name": "Shortstop", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 190 }, { "age": 27, "bats": "R", "birth_country": "Venezuela", "birth_date": "1999-02-07", "debut": "2021-09-07", "height": "5' 10\"", "id": 665645, "jersey": "74", "job": null, "name": "Kervin Castro", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 234 }, { "age": 24, "bats": "L", "birth_country": "USA", "birth_date": "2002-05-06", "debut": null, "height": "6' 1\"", "id": 694805, "jersey": null, "job": null, "name": "Kyle Carr", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "L", "weight": 175 }, { "age": 26, "bats": "L", "birth_country": "USA", "birth_date": "2000-05-16", "debut": "2020-08-14", "height": "6' 1\"", "id": 671277, "jersey": "26", "job": null, "name": "Luis García Jr.", "position": "1B", "position_name": "First Base", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 216 }, { "age": 28, "bats": "R", "birth_country": "Dominican Republic", "birth_date": "1998-06-03", "debut": "2021-08-03", "height": "6' 3\"", "id": 661563, "jersey": "81", "job": null, "name": "Luis Gil", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 215 }, { "age": 25, "bats": "R", "birth_country": "Dominican Republic", "birth_date": "2001-09-10", "debut": "2023-07-26", "height": "6' 1\"", "id": 682617, "jersey": null, "job": null, "name": "Marco Luciano", "position": "SS", "position_name": "Shortstop", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 215 }, { "age": 32, "bats": "L", "birth_country": "USA", "birth_date": "1994-01-18", "debut": "2017-08-08", "height": "6' 4\"", "id": 608331, "jersey": "54", "job": null, "name": "Max Fried", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "L", "weight": 190 }, { "age": 29, "bats": "R", "birth_country": "USA", "birth_date": "1997-06-11", "debut": "2024-04-12", "height": "6' 0\"", "id": 680474, "jersey": "30", "job": null, "name": "Max Schuemann", "position": "LF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "R", "weight": 198 }, { "age": 31, "bats": "L", "birth_country": "USA", "birth_date": "1994-12-14", "debut": "2017-08-12", "height": "6' 2\"", "id": 641857, "jersey": "19", "job": null, "name": "Ryan McMahon", "position": "3B", "position_name": "Third Base", "position_type": "Infielder", "status": "Active", "throws": "R", "weight": 211 }, { "age": 26, "bats": "R", "birth_country": "USA", "birth_date": "1999-12-17", "debut": "2020-10-06", "height": "6' 1\"", "id": 677960, "jersey": "40", "job": null, "name": "Ryan Weathers", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "L", "weight": 230 }, { "age": 25, "bats": "L", "birth_country": "USA", "birth_date": "2001-05-14", "debut": "2026-05-08", "height": "6' 7\"", "id": 682987, "jersey": "78", "job": null, "name": "Spencer Jones", "position": "CF", "position_name": "Outfielder", "position_type": "Outfielder", "status": "Active", "throws": "L", "weight": 240 }, { "age": 27, "bats": "R", "birth_country": "USA", "birth_date": "1999-06-16", "debut": "2024-07-30", "height": "6' 2\"", "id": 701542, "jersey": "29", "job": null, "name": "Will Warren", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 200 }, { "age": 28, "bats": "R", "birth_country": "Dominican Republic", "birth_date": "1997-12-12", "debut": "2022-05-25", "height": "6' 3\"", "id": 660787, "jersey": "73", "job": null, "name": "Yerry De los Santos", "position": "P", "position_name": "Pitcher", "position_type": "Pitcher", "status": "Active", "throws": "R", "weight": 230 } ], "team_id": 147 }