OpenAny
Get API keyAPI Key
APIData

mlb-stats logo
MLB Team Profile API

Fetch an MLB team profile by ID or abbreviation via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as id, output, raw, and retrieve structured data including MLB team identifier, official team full name, short club abbreviation, team division name, and team league name to build club landing pages and automated data workflows.

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
USE THIS API

MLB Team Profile 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
Connect your agent
On this page

Overview

Overview
MLB Team Profile API

MLB Team Profile API

Pass id (numeric team ID such as 147 or abbreviation such as nyy, lad or bos) and optional season. The JSON response returns franchise names, logo, league, division, home venue, record summary, previous_games[] and next_games[].

Quick Facts

Fact Value
Access OpenAny REST
Authentication OpenAny API key in the Authorization header
Core inputs Required query: id (team ID or abbreviation). Optional season, raw=0, fields and fresh=1.
Selected implementation apish · MLB team with record and recent and next games API
Billing See the pricing area for the selected implementation and request options

What You Can Build

  • Build club landing pages: Combine franchise metadata, logo, venue, division and record in a single API call.
  • Show recent form and upcoming fixtures: Render previous_games[] scores and next_games[] matchups without querying separate schedule calls.
  • Link into rosters and box scores: Pass id to MLB Team Roster API and previous_games[].id to MLB Game Box Score API.

Returned Data

Field Meaning
id MLB team identifier
name Official team full name
abbreviation Short club abbreviation
division.name Team division name
league.name Team league name
venue.name Home ballpark name
record Current or season team record summary
previous_games[].id Recent game identifier (gamePk)
previous_games[].home.score Home team score in a recent game
next_games Upcoming scheduled games list

Quick Start

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
curl --request GET --get \
  https://api.openany.si/v1/agent-apis/apish/mlb/v1/team \
  -H "Authorization: Bearer ${OPENANY_API_KEY}" \
  --data-urlencode id=nyy \
  --data-urlencode output=json \
  --data-urlencode raw=0

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 Profile 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

View FAQ

Related APIs

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Team id (147) or abbreviation (nyy, lad, bos ...).
Optional parameters (6)
Season year.
0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
1 skips the 24-hour cache and fetches live.
JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
apishCurrent
MLB team with record and recent and next games API · GET · View API reference
$0.002 / billing credit0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · apishUSD / billing credit
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/team
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
idURL query parametersquerystringYes

Team id (147) or abbreviation (nyy, lad, bos ...).

seasonURL query parametersquerystringNo

Season year.

rawURL query parametersquerystringNo

0 leaves out the bulky `raw` source blocks (often 10-30x smaller).

enum: "0", "1"

fieldsURL query parametersquerystringNo

Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.

freshURL query parametersquerystringNo

1 skips the 24-hour cache and fetches live.

enum: "1"

outputURL query parametersquerystringNo

JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.

enum: "json"

recordsURL query parametersquerystringNo

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

Inferred from examples
  • abbreviationstring
  • activeboolean
  • cachedboolean
  • club_namestring
  • credits_usedinteger
  • divisionobject
    • idinteger
    • namestring
  • fetched_atstring
  • first_yearinteger
  • franchise_namestring
  • idinteger
  • leagueobject
    • idinteger
    • namestring
  • locationstring
  • logostring
  • namestring
  • next_gamesunknown[]
  • parent_orgnull
  • previous_gamesobject[]
    • abstract_statestring
    • awayobject
      • is_winnerboolean | null
      • probable_pitchernull
      • recordobject
        • lossesinteger
        • pctstring
        • winsinteger
      • scoreinteger | null
      • series_numberinteger
      • teamobject
        • abbreviationnull
        • idinteger
        • namestring
    • datestring
    • day_nightstring
    • decisionsnull
    • double_headerstring
    • game_numberinteger
    • game_typestring
    • games_in_seriesinteger
    • homeobject
      • is_winnerboolean | null
      • probable_pitchernull
      • recordobject
        • lossesinteger
        • pctstring
        • winsinteger
      • scoreinteger | null
      • series_numberinteger
      • teamobject
        • abbreviationnull
        • idinteger
        • namestring
    • idinteger
    • linescorenull
    • scheduled_inningsinteger
    • seasonstring
    • seriesstring
    • series_game_numberinteger
    • start_timestring
    • statusstring
    • status_codestring
    • urlstring
    • venueobject
      • idinteger
      • namestring
  • recordnull
  • seasoninteger
  • short_namestring
  • sport_idinteger
  • spring_leaguestring
  • spring_venueinteger
  • team_namestring
  • urlstring
  • venueobject
    • fieldobject
      • capacityinteger
      • centerinteger
      • leftCenterinteger
      • leftLineinteger
      • rightCenterinteger
      • rightLineinteger
      • roofTypestring
      • turfTypestring
    • idinteger
    • locationobject
      • address1string
      • azimuthAngleinteger
      • citystring
      • countrystring
      • defaultCoordinatesobject
        • latitudenumber
        • longitudenumber
      • elevationinteger
      • phonestring
      • postalCodestring
      • statestring
      • stateAbbrevstring
    • namestring

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 itemPriceMetering sourceWhenQuantity limit
Actual API.SH credits consumed$0.002000 / billing creditResponse · /credits_used · Numeric valueAlways1 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.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 7

    Review these request fields before running. Keep the published provider and request method unchanged.

    id
    Team id (147) or abbreviation (nyy, lad, bos ...).
    season
    Season year.
    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 · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/apish/mlb/v1/team?id=nyy&output=json&raw=0' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "abbreviation": "NYY",
      "active": true,
      "cached": false,
      "club_name": "Yankees",
      "credits_used": 1,
      "division": {
        "id": 201,
        "name": "American League East"
      },
      "fetched_at": "2026-11-19T12:22:12.202Z",
      "first_year": 1903,
      "franchise_name": "New York",
      "id": 147,
      "league": {
        "id": 103,
        "name": "American League"
      },
      "location": "Bronx",
      "logo": "https://www.mlbstatic.com/team-logos/147.svg",
      "name": "New York Yankees",
      "next_games": [],
      "parent_org": null,
      "previous_games": [
        {
          "abstract_state": "Final",
          "away": {
            "is_winner": false,
            "probable_pitcher": null,
            "record": {
              "losses": 62,
              "pct": ".608",
              "wins": 96
            },
            "score": 2,
            "series_number": 51,
            "team": {
              "abbreviation": null,
              "id": 139,
              "name": "Tampa Bay Rays"
            }
          },
          "date": "2026-09-23",
          "day_night": "night",
          "decisions": null,
          "double_header": "N",
          "game_number": 1,
          "game_type": "R",
          "games_in_series": 4,
          "home": {
            "is_winner": true,
            "probable_pitcher": null,
            "record": {
              "losses": 67,
              "pct": ".576",
              "wins": 91
            },
            "score": 9,
            "series_number": 51,
            "team": {
              "abbreviation": null,
              "id": 147,
              "name": "New York Yankees"
            }
          },
          "id": 823492,
          "linescore": null,
          "scheduled_innings": 9,
          "season": "2026",
          "series": "Regular Season",
          "series_game_number": 3,
          "start_time": "2026-09-23T23:05:00Z",
          "status": "Final",
          "status_code": "F",
          "url": "https://www.mlb.com/gameday/823492",
          "venue": {
            "id": 3313,
            "name": "Yankee Stadium"
          }
        },
        {
          "abstract_state": "Final",
          "away": {
            "is_winner": false,
            "probable_pitcher": null,
            "record": {
              "losses": 63,
              "pct": ".604",
              "wins": 96
            },
            "score": 4,
            "series_number": 51,
            "team": {
              "abbreviation": null,
              "id": 139,
              "name": "Tampa Bay Rays"
            }
          },
          "date": "2026-09-24",
          "day_night": "night",
          "decisions": null,
          "double_header": "N",
          "game_number": 1,
          "game_type": "R",
          "games_in_series": 4,
          "home": {
            "is_winner": true,
            "probable_pitcher": null,
            "record": {
              "losses": 67,
              "pct": ".579",
              "wins": 92
            },
            "score": 6,
            "series_number": 51,
            "team": {
              "abbreviation": null,
              "id": 147,
              "name": "New York Yankees"
            }
          },
          "id": 823493,
          "linescore": null,
          "scheduled_innings": 9,
          "season": "2026",
          "series": "Regular Season",
          "series_game_number": 4,
          "start_time": "2026-09-24T23:05:00Z",
          "status": "Final",
          "status_code": "F",
          "url": "https://www.mlb.com/gameday/823493",
          "venue": {
            "id": 3313,
            "name": "Yankee Stadium"
          }
        },
        {
          "abstract_state": "Final",
          "away": {
            "is_winner": true,
            "probable_pitcher": null,
            "record": {
              "losses": 81,
              "pct": ".494",
              "wins": 79
            },
            "score": 10,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 110,
              "name": "Baltimore Orioles"
            }
          },
          "date": "2026-09-25",
          "day_night": "night",
          "decisions": null,
          "double_header": "Y",
          "game_number": 1,
          "game_type": "R",
          "games_in_series": 3,
          "home": {
            "is_winner": false,
            "probable_pitcher": null,
            "record": {
              "losses": 68,
              "pct": ".575",
              "wins": 92
            },
            "score": 2,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 147,
              "name": "New York Yankees"
            }
          },
          "id": 823491,
          "linescore": null,
          "scheduled_innings": 9,
          "season": "2026",
          "series": "Regular Season",
          "series_game_number": 1,
          "start_time": "2026-09-25T20:05:00Z",
          "status": "Final",
          "status_code": "F",
          "url": "https://www.mlb.com/gameday/823491",
          "venue": {
            "id": 3313,
            "name": "Yankee Stadium"
          }
        },
        {
          "abstract_state": "Final",
          "away": {
            "is_winner": false,
            "probable_pitcher": null,
            "record": {
              "losses": 82,
              "pct": ".491",
              "wins": 79
            },
            "score": 3,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 110,
              "name": "Baltimore Orioles"
            }
          },
          "date": "2026-09-25",
          "day_night": "night",
          "decisions": null,
          "double_header": "Y",
          "game_number": 2,
          "game_type": "R",
          "games_in_series": 3,
          "home": {
            "is_winner": true,
            "probable_pitcher": null,
            "record": {
              "losses": 68,
              "pct": ".578",
              "wins": 93
            },
            "score": 6,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 147,
              "name": "New York Yankees"
            }
          },
          "id": 823489,
          "linescore": null,
          "scheduled_innings": 9,
          "season": "2026",
          "series": "Regular Season",
          "series_game_number": 2,
          "start_time": "2026-09-25T20:10:00Z",
          "status": "Final",
          "status_code": "F",
          "url": "https://www.mlb.com/gameday/823489",
          "venue": {
            "id": 3313,
            "name": "Yankee Stadium"
          }
        },
        {
          "abstract_state": "Final",
          "away": {
            "is_winner": null,
            "probable_pitcher": null,
            "record": {
              "losses": 82,
              "pct": ".491",
              "wins": 79
            },
            "score": null,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 110,
              "name": "Baltimore Orioles"
            }
          },
          "date": "2026-09-27",
          "day_night": "day",
          "decisions": null,
          "double_header": "N",
          "game_number": 1,
          "game_type": "R",
          "games_in_series": 3,
          "home": {
            "is_winner": null,
            "probable_pitcher": null,
            "record": {
              "losses": 68,
              "pct": ".578",
              "wins": 93
            },
            "score": null,
            "series_number": 52,
            "team": {
              "abbreviation": null,
              "id": 147,
              "name": "New York Yankees"
            }
          },
          "id": 823490,
          "linescore": null,
          "scheduled_innings": 9,
          "season": "2026",
          "series": "Regular Season",
          "series_game_number": 3,
          "start_time": "2026-09-27T17:05:00Z",
          "status": "Cancelled",
          "status_code": "CR",
          "url": "https://www.mlb.com/gameday/823490",
          "venue": {
            "id": 3313,
            "name": "Yankee Stadium"
          }
        }
      ],
      "record": null,
      "season": 2026,
      "short_name": "NY Yankees",
      "sport_id": 1,
      "spring_league": "Grapefruit League",
      "spring_venue": 2523,
      "team_name": "Yankees",
      "url": "https://www.mlb.com/yankees",
      "venue": {
        "field": {
          "capacity": 46537,
          "center": 408,
          "leftCenter": 399,
          "leftLine": 318,
          "rightCenter": 385,
          "rightLine": 314,
          "roofType": "Open",
          "turfType": "Grass"
        },
        "id": 3313,
        "location": {
          "address1": "One East 161st Street",
          "azimuthAngle": 75,
          "city": "Bronx",
          "country": "USA",
          "defaultCoordinates": {
            "latitude": 40.82919482,
            "longitude": -73.9264977
          },
          "elevation": 55,
          "phone": "(718) 293-4300",
          "postalCode": "10451",
          "state": "New York",
          "stateAbbrev": "NY"
        },
        "name": "Yankee Stadium"
      }
    }

Common questions

Can I look up a team using its abbreviation like nyy or lad?

Yes. The id parameter accepts either a numeric team ID (such as 147) or an abbreviation (such as nyy, lad or bos).

Does this endpoint include recent and upcoming games?

Yes. It returns previous_games[] and next_games[] arrays alongside team profile metadata and record.

Why might next_games be empty?

During the offseason or after a club's final scheduled game of the season, next_games[] can return an empty array.

How do I get the club's full active roster?

Pass the team's ID or abbreviation to the MLB Team Roster API.

Can I query a club's profile for a past season?

Yes. Pass the optional season year parameter to inspect that season's club context.

How do caching and response trimming work?

Pass fresh=1 to skip the 24-hour cache, raw=0 to omit bulky raw blocks and fields to select specific keys.

Use MLB Team Profile API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.