Vexaloom Labs

MLB Teams, Player Search & Season Schedule Lookup

Look up every current MLB team, search for a player by name, or pull a full season's schedule and scores, with stadium, roster, and matchup details for each record.

Input schema

Input fields, types, required flags, descriptions, defaults, and prefills come from the published definition. Prefill examples are distinct from defaults.

FieldTypeRequiredDescription
modestringrequiredWhat data to fetch.
searchQuerystringoptionalPlayer name for players mode.
seasonstringoptionalMLB season year.
Show all input fields
FieldTypeRequiredDescription
modestringrequiredWhat data to fetch.
searchQuerystringoptionalPlayer name for players mode.
seasonstringoptionalMLB season year.
maxItemsintegeroptionalMaximum records to return.

Download the published input schema

View complete JSON
{
  "description": "Scrape MLB teams, players, and game results from TheSportsDB free API.",
  "properties": {
    "maxItems": {
      "default": 20,
      "description": "Maximum records to return.",
      "maximum": 200,
      "minimum": 1,
      "prefill": 20,
      "title": "Max items",
      "type": "integer"
    },
    "mode": {
      "default": "teams",
      "description": "What data to fetch.",
      "editor": "select",
      "enum": [
        "teams",
        "players",
        "games"
      ],
      "enumTitles": [
        "MLB Teams",
        "Player Search",
        "Season Games"
      ],
      "prefill": "teams",
      "title": "Mode",
      "type": "string"
    },
    "searchQuery": {
      "default": "Shohei Ohtani",
      "description": "Player name for players mode.",
      "editor": "textfield",
      "prefill": "Shohei Ohtani",
      "title": "Search query",
      "type": "string"
    },
    "season": {
      "default": "2024",
      "description": "MLB season year.",
      "editor": "select",
      "enum": [
        "2022",
        "2023",
        "2024"
      ],
      "enumTitles": [
        "2022",
        "2023",
        "2024"
      ],
      "prefill": "2024",
      "title": "Season",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "MLB Stats Scraper Input",
  "type": "object"
}

Output schema

Published result links and storage locations. This schema is not an exhaustive contract for every field in a dataset record.

FieldTypeRequiredDescription
resultsstringoptionalDataset containing all scraped MLB team, player, or game records.

Download the published output schema

View complete JSON
{
  "actorOutputSchemaVersion": 1,
  "description": "One record per MLB team, matched player, or scheduled/completed game, depending on the selected mode.",
  "properties": {
    "results": {
      "description": "Dataset containing all scraped MLB team, player, or game records.",
      "template": "{{links.apiDefaultDatasetUrl}}/items",
      "title": "MLB Records",
      "type": "string"
    }
  },
  "title": "MLB Teams, Player Search & Season Schedule Lookup Output"
}

Dataset schema

Published dataset views and any declared field definitions. A view can select only a subset of the returned record fields.

Download the published dataset schema

View complete JSON
{
  "actorSpecification": 1,
  "views": {
    "overview": {
      "display": {
        "component": "table",
        "properties": {}
      },
      "title": "MLB Stats Scraper",
      "transformation": {
        "fields": [
          "teamName",
          "playerName",
          "eventName",
          "homeTeam",
          "awayTeam",
          "matchDate"
        ]
      }
    }
  }
}

Key-value schema

Published key-value store definitions, when provided by this build.

This definition is not present in the default published build. See the published README for available documentation.

Published README

Read the full published documentation

MLB Teams, Player Search & Season Schedule Lookup

Pull Major League Baseball reference data in three shapes: the full list of current MLB teams with their stadium and founding details, a name search across MLB players with bio and position info, or a season's full schedule of games with final or in-progress scores.

What this actor does

  • Lists every current MLB team with city, stadium, founding year, and official website
  • Searches MLB players by name and returns position, physical stats, nationality, and a short bio
  • Pulls a full season's game schedule with home/away teams, scores, venue, and status
  • Tags every record with a recordType so mixed exports stay easy to filter
  • Only includes a field when the data source actually supplied it — no blank or placeholder values

Output per team (recordType: "mlb_team")

  • teamId — unique team identifier
  • teamName — full team name
  • shortName — abbreviated team name
  • city — team's home location
  • stadium — home stadium name
  • formedYear — year the franchise was founded
  • website — official team website
  • logoUrl — team logo image URL
  • teamUrl — reference page for the team
  • scrapedAt — ISO 8601 timestamp of when the record was collected

Output per player (recordType: "mlb_player")

  • playerId — unique player identifier
  • playerName — player's full name
  • team — current team name
  • nationality — player's nationality
  • position — playing position
  • height / weight — physical stats as published
  • birthDate — date of birth
  • description — short biography (truncated to 300 characters)
  • imageUrl — player photo or cutout image
  • profileUrl — reference page for the player
  • scrapedAt — ISO 8601 timestamp of when the record was collected

Output per game (recordType: "mlb_game")

  • eventId — unique game/event identifier
  • eventName — game title (typically "Away Team vs Home Team")
  • homeTeam / awayTeam — team names
  • homeScore / awayScore — final or current score (omitted for games that haven't been played yet)
  • season — season the game belongs to
  • matchDate — date the game was/is scheduled
  • venue — stadium where the game is played
  • status — game status as published
  • eventUrl — reference page for the game
  • scrapedAt — ISO 8601 timestamp of when the record was collected

Input

Field Type Default Description
mode string teams teams (all current MLB teams), players (search by name), or games (a season's schedule)
searchQuery string Shohei Ohtani Player name to search; used only in players mode
season string 2024 Season year to pull games for (2022, 2023, or 2024); used only in games mode
maxItems integer 20 Maximum records to return (1–200)

Example: list all current MLB teams

{
    "mode": "teams",
    "maxItems": 30
}

Example: search for a player

{
    "mode": "players",
    "searchQuery": "Aaron Judge",
    "maxItems": 10
}

Example: pull a season's schedule

{
    "mode": "games",
    "season": "2023",
    "maxItems": 200
}

Use cases

  • Fantasy baseball tools pulling player bios and team reference data to enrich a roster app
  • Sports content sites keeping a simple, always-current list of MLB teams and stadiums
  • Analytics projects building a season-by-season game log without hand-collecting scores
  • Trivia and reference apps looking up a player's position, nationality, or physical stats by name
  • Data pipelines that need a lightweight MLB reference layer without a paid sports-data subscription

FAQ

Do I need an API key or MLB account? No — all three modes read from a free, public sports-data source and require no authentication.

Why does players mode only return results for one name at a time? Each run searches the single name given in searchQuery; run it again with a different name to look up another player.

Why are homeScore/awayScore sometimes missing from a game record? Those fields are only included once a score has actually been published for that game; scheduled-but-not-yet-played games omit them rather than showing a zero.

Which seasons can I pull with games mode? 2022, 2023, or 2024 — pick the one you need in the season input.

Why is description cut off at 300 characters? Player biographies are truncated to keep records a consistent, manageable size; the full bio is not currently returned.

Is this affiliated with Major League Baseball? No. This is an independent actor that reads publicly available MLB reference data; it is not endorsed by or affiliated with MLB or any team.

Python quickstart

Use a schema-derived input and the Python standard library to start a run. An Apify account and token are required for execution.

Open the step-by-step Python guide →

Source build V6ZY83AGWDTk4LlbA. Documentation is regenerated from the default published build; private drafts are not included.