|

How to Build an MLB Stats Website with WordPress (No Manual Data Entry)

MLB has 2,430 regular season games. Each game produces batting stats, pitching stats, scoring plays, and a box score. Multiply that across 30 teams and 750+ players.

Nobody is typing all that in by hand.

Daily pitching leaders table with Game Score badges, color gradients, and strikeout splits

I’ve been building sports websites with WordPress for years. The old way was painful – create a custom post for every game, manually enter scores, copy stats from ESPN, update standings by hand. For football (soccer) with 380 games per season, it was tedious. For baseball with 2,430? Forget it.

This guide shows you how to set up a fully automated MLB stats website on WordPress. Real box scores, live scores during games, player stats, standings – all imported from a professional sports API. No copy-pasting. No data entry.

Here’s what the finished product looks like:

Finished MLB game page showing header with innings scores, leaders, and batting box scores

What You Need

Three things:

  1. A WordPress site – any theme works, any host with PHP 7.4+
  2. Sports API Hub plugin – the WordPress plugin that handles import, storage, and display
  3. A sports data API subscription – the source of the actual baseball data

That’s it. No coding required. No custom development. Let me walk through each piece.

The Plugin: Sports API Hub

Sports API Hub is a WordPress plugin built specifically for importing and displaying sports data from professional APIs. It covers 8 sports – basketball, baseball, cricket, rugby, ice hockey, American football, handball, and volleyball.

For baseball, you get:

  • Automated import of entire MLB seasons (all 2,430 games)
  • Live scores with 30-second polling during games
  • Batting and pitching box scores with 25+ stat columns, sortable tables
  • Play-by-play timelines with scoring badges (HR, 3B, 2B, RBI)
  • Game flow charts showing score progression and lead changes
  • Team pages with rosters, standings, schedule, and season record
  • Player pages with game logs, career stats, splits (home/away, monthly), and stat ring charts with league rank badges
  • Standings updated automatically after every game
  • 14 shortcodes for embedding games, standings, calendars, brackets, highlights, pitching leaders, and more anywhere on your site
  • Layout builder with 60+ drag-and-drop blocks to customize every page type
  • Video highlights – YouTube highlight clips auto-imported and displayed in a filterable grid

Everything lives in your own WordPress database. 19 custom tables with proper indexes. You own your data.

Team page showing header with season record, calendar, standings, and roster

The API: Where the Data Comes From

Sports API Hub connects to professional sports data APIs via RapidAPI. You have two options for baseball:

Option 1: AllSportsAPI2 (Recommended) – $19.99/mo

This is the recommended provider. You get:

  • All 8 sports in one subscription (basketball, baseball, cricket, rugby, ice hockey, American football, handball, volleyball)
  • Unlimited requests on the Pro plan
  • Live scores – real-time game updates
  • Bulk odds endpoint – fetch betting lines for all games on a date in one call
  • Full import capabilities – fixtures, results, box scores, rosters, standings, highlights

One API key covers everything. If you ever want to add basketball or hockey to your site, you’re already set.

Option 2: BaseballApi – $9.99/mo

A dedicated baseball-only API with the same data structure and endpoints. Cheaper, but the 15,000 requests/day limit on the Pro plan needs careful consideration:

  • Baseball only – no other sports
  • 15,000 requests/day on the Pro plan (not unlimited)
  • All features work – import, live scores, box scores, rosters, standings, highlights, pitch-by-pitch data
  • No bulk odds endpoint (per-game odds exist but return no data)

The daily limit is where it gets tricky. Here’s a realistic breakdown:

OperationAPI callsNotes
Full season import (2,430 games)~12,600Fixtures + details + rosters + standings. Takes 1 full day
Each additional historical season~12,6001 more day per season (KBO, NPB, or past MLB)
Daily background sync (no live)~250-400Finished games, standings, fixtures, highlights, odds
Live scores (60s poll, 15 games)~5,000-7,000Manageable with headroom
Live scores (30s poll, 15 games)~9,000-13,500Tight on busy 15-game days
Pitch-by-pitch data (15 games)~1,200~80 calls per game

Daily sync without live? 15,000 is more than enough. With live scores at 60s polling? Works fine – around 5,500-7,500 total including sync. 30s polling + pitch data on a full 15-game day? You’re at ~11,000-15,000 calls – close to the ceiling. And you can’t run a season import on the same day as live games.

These numbers are approximate and may change between plugin versions as features and sync behavior evolve.

BaseballApi is a solid budget option if you’re running one MLB season without aggressive live polling. For multi-season historical data, multiple leagues (KBO, NPB), or worry-free live scores, AllSportsAPI2’s unlimited plan is worth the extra $10/mo. You can switch between providers at any time – just change the API host in settings.

API Config page showing provider selection dropdown

Which API Plan Should You Pick?

For AllSportsAPI2, go with Pro ($19.99/mo). Unlimited requests, 6 requests per second. That’s more than enough for importing, live scores, and daily sync – all running simultaneously without worry.

For BaseballApi, Pro ($9.99/mo) gives you 15,000 requests/day. That’s enough for daily operations and moderate live polling, but plan your initial imports for non-game days to avoid hitting the limit.

๐Ÿ’ฐ What It Actually Costs

Let’s be specific. No hidden fees, no “contact us for pricing.”

With AllSportsAPI2 (full features)

ItemMonthlyAnnual
Sports API Hub plugin$12/mo (Early Access)$119/yr (Early Access)
AllSportsAPI2 Pro$19.99/mo$239.88/yr
Total$31.99/mo$358.88/yr

That’s about $1/day for a fully automated MLB stats website with live scores, box scores, play-by-play, player stats, and standings across 8 sports.

With BaseballApi (budget option)

ItemMonthlyAnnual
Sports API Hub plugin$12/mo (Early Access)$119/yr (Early Access)
BaseballApi Pro$9.99/mo$119.88/yr
Total$21.99/mo$238.88/yr

Baseball-only with a 15,000 calls/day limit. All features work including live scores, but budget your API calls on busy game days. See the usage breakdown above.

Lifetime option

Don’t want a recurring plugin subscription? Sports API Hub offers a $399 lifetime license (Early Access). You still pay the monthly API fee to RapidAPI, but the plugin is yours forever. After ~3.5 years, the lifetime license pays for itself vs annual.

๐Ÿš€ Step-by-Step Setup

1. Install the Plugin

Upload the ZIP file in WordPress admin (Plugins > Add New > Upload). Activate it. Four menu groups appear in your sidebar. Full details in the installation guide.

WordPress admin sidebar showing four API Hub menu groups

2. Connect Your API

Go to API & Import > API Config. Paste your RapidAPI key, select your provider (AllSportsAPI2 or BaseballApi), pick Baseball from the sports list. Hit Test Connection. Step-by-step in the API setup guide.

Green checkmark? You’re connected.

API Config page showing green checkmark after successful connection test

3. Import Your First Season

Go to API & Import > Import. Select USA, MLB, and your season. Click “Start Import.” The plugin runs through a task queue. See the first import guide for the full walkthrough.

  1. Hierarchy – leagues, groups, season structure
  2. Fixtures – all 2,430 game slots
  3. Teams – 30 MLB teams with logos and metadata
  4. Finished games – box scores, batting stats, pitching stats, play-by-play (5 games per batch)
  5. Rosters – current rosters for all 30 teams
  6. Standings – league tables
  7. Highlights – YouTube video highlights for finished games

The full import takes 1-2 hours depending on your API plan’s rate limit. You can watch it work or close the tab – it runs in the background.

Import page showing task queue progress with completed and running tasks

4. Check Your Data

After import, go to Hub Data > Games. You’ll see every imported game with scores, status, and import level.

Click any finished game. You’ve got a full game page – header with scores and team colors, batting stats, pitching stats, play-by-play timeline, game flow chart, team stats comparison, odds (if enabled), and video highlights.

Games admin list showing imported games with scores, status, and import level columns

What You Get: The Baseball Pages

Game Pages

Every imported game gets its own page with a unique URL (/baseball/game/yankees-vs-red-sox-abc123). The layout depends on game status.

Finished games show the game header with final score, team colors, and innings scores (R/H/E). Below that: batting box scores, pitching stats with decisions, play-by-play timeline with scoring badges, game flow chart, team stats comparison, key players, matchup history, recent form, standings context, betting odds, and video highlights.

Play-by-play timeline with scoring badges alongside score lines and lead tracker charts

Upcoming games show the matchup header with team records, betting odds, stats comparison with dual radar charts (current + previous season), key players by season averages, recent form, standings context, and matchup history.

Upcoming game page with standings context and key players from both teams
Stats comparison with dual radar charts and percentile rank bars for batting and pitching

Live games (AllSportsAPI2 only) update in real-time – scores refresh every 30 seconds, box scores show current at-bat stats, play-by-play events appear as they happen. A pulsing orange dot shows the game is live, and score changes trigger a brief yellow flash animation.

The layout builder lets you customize which blocks appear and in what order. Drag and drop. No code.

Team Pages

Each of the 30 MLB teams gets a page with: team header (logo, colors, season record with home/away splits), full roster grouped by position, current standings with team highlighted, schedule navigator, recent results with win/loss indicators, form chart, game calendar, and season leaders.

Player Pages

Every player with game data gets a page. The header shows their photo, jersey number, position, team, and 3 highlight stats (e.g., .287 AVG / 24 HR / 78 RBI for batters, or 3.12 ERA / 187 SO / 14-6 W-L for pitchers).

Player stat ring charts showing 8 key stats with league rank badges

Below that: 8 SVG ring charts showing key stats with league rank badges (how does this player compare to everyone else?), a full game log in a sortable table with running averages, career stats across seasons, splits (home/away, monthly, wins/losses), and per-opponent stats.

Player game log table with sortable columns and running averages

Season Pages

The season page ties everything together: full standings, team directory, scoreboard slider (ESPN-style horizontal carousel), season leaders for batting and pitching, team rankings, playoff bracket, and video highlights grid.

Season stat leaders showing batting leaders (AVG, HR, RBI) and pitching leaders (ERA, Wins, SO)

Daily Pitching Leaders

This one deserves its own section. The [anwphub-pitching-leaders] shortcode generates an automated daily table showing every starting pitcher’s performance. No manual spreadsheet work – it pulls from the same box score data that’s already imported.

What makes it different from the stat tables you see on Reddit:

  • Game Score badge – colored tier badge (Elite/Great/Solid/Avg/Poor) so you can instantly see who had the best start
  • K composition – strikeouts split by Looking vs Swinging (e.g., 8 3L/5S). High looking% = elite command, high swinging% = unhittable stuff
  • Milestone badges – QS (Quality Start), CG (Complete Game), SHO (Shutout), MDX (Maddux – CGSO under 100 pitches), NH (No-Hitter)
  • Whiff metrics (optional) – Whiffs, SwStr%, CSW% from pitch-by-pitch data. Enable it in settings, the plugin fetches pitch-level data for every at-bat (~75 API calls per game)
  • Color gradients on K%, K-BB%, SwStr%, CSW%, Strike%, and ERA – quickly spot the standout performances
  • Bold best values per column – your eye goes straight to the leader in each stat

Date navigation built in. Defaults to yesterday. Previous/next arrows. In-memory cache so revisiting a date is instant.

Pitching leaders table with Game Score badges, strikeout splits, and color gradients
Pitching leaders with outlined team badges and whiff data columns

Fantasy baseball managers and MLB bloggers: this is the kind of content that gets upvotes on r/fantasybaseball. Except yours updates itself every day.

Pitching leaders legend showing column abbreviations, milestone badges, and Game Score tier colors

Shortcodes: Put Baseball Anywhere

14 shortcodes let you embed baseball content in any post, page, or widget:

ShortcodeWhat It Does
[anwphub-games]Game list/grid with filters
[anwphub-standings]League standings table
[anwphub-calendar]Interactive day-by-day game browser
[anwphub-scoreboard]ESPN-style horizontal game slider
[anwphub-bracket]Playoff bracket with team path highlighting
[anwphub-leaders]Statistical leaders (batting + pitching)
[anwphub-roster]Team roster card grid
[anwphub-team-stats]Team stats comparison table
[anwphub-highlights]Video highlight grid with league filter
[anwphub-game]Single game mini-page (last game, next game, or specific)
[anwphub-standings-full]Full standings with all groups and stats
[anwphub-leagues]League directory with country flags
[anwphub-pitching-leaders]Daily pitching leaders with Game Score, K splits, whiff metrics
[anwphub-entity-posts]Related blog posts for any entity

Each shortcode has a visual builder in the admin – pick your options, preview it, copy the shortcode. No documentation lookup needed.

Shortcode builder with form fields and live preview iframe

The Layout Builder

This is where Sports API Hub separates from anything else in the WordPress plugin space.

Every entity page (game, team, player, season) is built from blocks you drag and drop. 60+ blocks available. You control which blocks appear on each page type, block order, row layouts (2-column, 3-column, fluid grid), tabbed sections, spacing, colors, borders, and per-block visibility.

The builder has 3 separate game layouts – one for upcoming, one for live, one for finished. The plugin automatically switches between them based on game status. During a live game, the page transitions from the upcoming layout to the live layout without a page reload. When the game ends, it swaps to the finished layout.

Layout builder admin page with draggable blocks and block palette

Live Scores

Live scores work with both API providers. The plugin polls the API during active games, updating scores on the page without reloading:

  • Configurable poll interval (30 or 60 seconds)
  • Scores, box scores, and play-by-play update in real-time
  • A pulsing orange dot shows the game is live
  • Score changes trigger a brief yellow flash animation
  • Smart activation – polling starts 20 minutes before game time and stops cleanly after the game ends

Game cards on list pages, calendars, and scoreboards also update in real-time. If you have a homepage with today’s games, scores update across all cards simultaneously.

With AllSportsAPI2 (unlimited requests), you can run 30-second polling without worrying about usage. With BaseballApi (15,000/day), 60-second polling keeps you comfortably under the limit. See the live scores documentation for setup details.

After the Initial Import

Once your season is imported, the plugin keeps things current with background sync:

  • New results synced automatically (configurable schedule)
  • Fixture updates (schedule changes, postponements)
  • Roster changes (trades, callups)
  • Standings recalculated after every game
  • Video highlights checked daily for new YouTube clips

You don’t need to open the admin panel to keep data fresh. Set it up once, and the sync handles the rest.

Customization Without Code

Text overrides – 140+ labels can be changed. Want “Final” to say “F”? Want “Innings” in Spanish? Change it in settings.

Entity translations – team names, player names, league names can all be translated. The originals are preserved; your translations display to visitors.

Color palette – 9-slot color system. Works with Kadence theme natively. Set your accent colors once, and every template respects them.

Template overrides – copy any template to your child theme and modify the HTML/PHP directly. Every template is overridable.

CSS design tokens – border radius, border color, and background accent are CSS variables you control from settings. One slider changes the corner rounding across every component on your site.

Who Is This For?

MLB bloggers and fan sites – write about games, the stats are already there. Link your posts to games, teams, and players. Focus on writing, not data entry.

Fantasy baseball sites – player stats, game logs, splits, and per-opponent data are exactly what fantasy players research. Ring charts with league ranks show instantly how a player compares.

Multi-sport sites – one plugin, one API subscription, 8 sports. Add basketball season alongside baseball with zero additional setup.

Web developers building client sites – hand over a site that updates itself. Client doesn’t need to touch the admin (and can’t accidentally break the data).

FAQ

How long does the initial import take?
1-2 hours for a full MLB season (2,430 games with full details). The import runs in batches and you can close the browser tab.

Does it work with my theme?
Yes. Sports API Hub works with any WordPress theme. Templates use their own CSS with design tokens, so they adapt to your site’s look.

Can I import multiple seasons?
Yes. Import as many seasons as you want. Historical data stays in your database.

What happens if the API goes down?
Your data is stored locally in WordPress. Visitors see everything that’s already imported. Live scores would pause until the API recovers. Historical data is unaffected.

Can I use this alongside Football Leagues or Sports Leagues?
Yes. Sports API Hub is a separate plugin. It can run alongside ANWP Football Leagues or Sports Leagues without conflicts.

Is there a free trial?
No free trial, but there’s a 7-day money-back guarantee. And the demo site at livescoreapi.com shows exactly what you get before you buy.

Get Started

Sports API Hub is currently in Early Access with 20% off all plans, locked forever:

PlanPrice
Monthly$12/mo
Annual$119/yr
Lifetime$399 (one-time)

All plans include all 8 sports, all features, 2 website activations.


Sports API Hub is built by the team behind ANWP Football Leagues and ANWP Sports Leagues – WordPress sports plugins used by thousands of sites worldwide.

Similar Posts