Operated by Sourcelane✓ verified
A web-scraping connector that extracts Major League Baseball data on demand across seven scraping modes to produce structured sports statistics: team metadata, active rosters with current-season batting and pitching stat lines, game schedules with status and venue, per-team box-score details (runs, hits, extra-base hits, home runs, RBIs, walks, strikeouts, innings pitched, pitching ERA), season-level player stat lines for hitting/pitching/fielding, division and league standings (rank, wins, losses, win percentage, games back, streak), and ranked stat leaderboards. Supports queries by date or date range, seasons, leagues/divisions, teams, players, and game identifiers, and emits typed records for mixed-mode extraction useful for aggregation, time-series analysis, fantasy and betting models, media feeds, and analytics.
Verified Sep 28, 12:10 AM
$0.004
per record
Up to 100 per call. Only pay for results returned; failed calls are refunded.
| Window | Uptime | Success rate | p50 | p95 | Calls |
|---|---|---|---|---|---|
| 24h | — | — | — | — | 0 |
| 7d | — | — | — | — | 0 |
| 30d | — | — | — | — | 0 |
Call it through Sourcelane's gateway or MCP server. We run the connector, apply your agent's spend guardrails, and bill only the results returned.
Call it via Sourcelane
curl -X POST https://cool-puffin-608.convex.site/v1/call \
-H "Authorization: Bearer sl_live_your_agent_key" \
-H "Content-Type: application/json" \
-d '{"listing":"mlb-stats-scraper","params":{"mode":"teams","maxItems":5},"maxResults":10}'Request params
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | required | What to scrape. 'teams' lists all MLB teams. 'roster' returns a team's active roster with player season stats. 'schedule' returns games/scores for a date or date range. 'standings' returns division and league standings. 'playerStats' returns full season stat lines for specific players or teams. 'gameDetails' returns per-team box score lines (2 rows per game). 'leaders' returns ranked statistical l |
teamId | integer | optional | MLB team ID for 'roster' mode, e.g. 147 for the New York Yankees. Run 'teams' mode first to look up IDs. Ignored in other modes. |
teamAbbreviation | string | optional | Optional alternative to Team ID for 'roster' mode, e.g. 'NYY'. Used only if Team ID is not set. Ignored in other modes. |
date | string | optional | Single date in YYYY-MM-DD format for 'schedule' mode, or for 'gameDetails' mode when Game PKs are not set. Leave empty to use today's date, or set Start Date / End Date instead for a range. Ignored in other modes. |
startDate | string | optional | Start of a date range (YYYY-MM-DD) for 'schedule' mode or for 'gameDetails' mode when Game PKs are not set. Requires End Date to also be set; overrides Date when both are present. Ignored in other modes. |
endDate | string | optional | End of a date range (YYYY-MM-DD) for 'schedule' mode or for 'gameDetails' mode when Game PKs are not set. Requires Start Date to also be set. Ignored in other modes. |
gameType | string | optional | Filters games by MLB game type in 'schedule' mode and in 'gameDetails' mode (when Game PKs are not set), and tags the game type used for 'leaders' mode. Default is Regular Season. Note: MLB has no single generic 'postseason' filter — select the specific postseason round (Wild Card, Division Series, LCS, or World Series). |
leagueId | string | optional | Which league's standings to return in 'standings' mode. Ignored in other modes. |
seasons | array | optional | Four-digit season years, e.g. ['2025','2026']. Used by 'playerStats', 'standings', and 'leaders' modes — when multiple seasons are given, each mode loops over all of them and tags every output row with its 'season' field so a multi-season run stays separable in one results. Leave empty to use the current season. In 'roster' mode only the first season is used (roster reflects the current team, not |
teamIds | array | optional | MLB team IDs for 'playerStats' mode. Every player on each team's active roster gets a stat line for the selected Stat group and each selected season. Ignored if Player IDs is set. Ignored in other modes. |
playerIds | array | optional | MLB player IDs for 'playerStats' mode, e.g. ['592450'] for Aaron Judge. When set, fetches these specific players' stats directly instead of resolving via Team IDs. Ignored in other modes. |
statGroup | string | optional | Which stat category to return in 'playerStats' and 'leaders' modes. Ignored in other modes. |
leaderCategories | array | optional | MLB stat leader category keys for 'leaders' mode, e.g. ['homeRuns','battingAverage','earnedRunAverage','strikeouts','saves']. Must match the selected Stat group (hitting categories with statGroup=hitting, pitching categories with statGroup=pitching, etc). Defaults to ['homeRuns']. Ignored in other modes. |
gamePks | array | optional | Specific MLB game IDs (gamePk) for 'gameDetails' mode, e.g. ['824911']. When set, fetches box scores for exactly these games instead of deriving games from Date / Start Date / End Date. Ignored in other modes. |
maxItems | integer | optional | Maximum results records to return in this run. 0 = no cap. 'gameDetails' mode produces 2 rows per game, so its effective game count is roughly half this value (also safety-capped at 50 games when unlimited). Mainly relevant for 'roster', 'schedule', 'playerStats', 'gameDetails', and 'leaders' modes; 'teams' always returns 30 or fewer and 'standings' returns one record per team per season. Capped at 100 per call. |
Each result contains
| Field | Type | Description |
|---|---|---|
recordType | string | Record Type |
gamePk | integer | — |
gameDate | string | — |
officialDate | string | — |
status | string | — |
gameType | string | — |
seriesDescription | string | — |
venue | string | — |
homeTeamId | integer | — |
homeTeam | string | — |
homeScore | integer | — |
awayTeamId | integer | — |
awayTeam | string | — |
awayScore | integer | — |
winner | string | — |
Pick your tool and connect in under a minute. Then just ask — for example: “What are the current odds for this weekend's Premier League matches?”
Connect Claude
Web, desktop and mobile. Paste one URL.
Adds the Sourcelane MCP server with your key as a header.
claude mcp add --transport http sourcelane https://cool-puffin-608.convex.site/mcp \
--header "Authorization: Bearer sl_live_your_agent_key"Alternative to the connector URL: add to claude_desktop_config.json, then restart Claude.
{
"mcpServers": {
"sourcelane": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://cool-puffin-608.convex.site/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer sl_live_your_agent_key"
}
}
}
}Add to ~/.cursor/mcp.json (or Windsurf's mcp_config.json).
{
"mcpServers": {
"sourcelane": {
"url": "https://cool-puffin-608.convex.site/mcp",
"headers": {
"Authorization": "Bearer sl_live_your_agent_key"
}
}
}
}Save as .vscode/mcp.json. VS Code prompts for your key once.
{
"servers": {
"sourcelane": {
"type": "http",
"url": "https://cool-puffin-608.convex.site/mcp",
"headers": {
"Authorization": "Bearer ${input:sourcelane-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "sourcelane-key",
"description": "Sourcelane agent key",
"password": true
}
]
}Create a GPT → Actions → Import from URL, then Authentication: API Key, Bearer.
https://sourcelane-amber.vercel.app/openapi.jsonOne POST. Pass maxResults to cap cost.
curl -X POST https://cool-puffin-608.convex.site/v1/call \
-H "Authorization: Bearer sl_live_your_agent_key" \
-H "Content-Type: application/json" \
-d '{"listing":"mlb-stats-scraper","params":{"mode":"teams","maxItems":5},"maxResults":10}'Wrap the REST call as a tool, or point an MCP client at the endpoint.
import requests
res = requests.post(
"https://cool-puffin-608.convex.site/v1/call",
headers={"Authorization": "Bearer sl_live_your_agent_key"},
json={
"listing": "mlb-stats-scraper",
"params": {"mode":"teams","maxItems":5},
"maxResults": 10,
},
timeout=300,
)
body = res.json()
print(body["receipt"]["chargedMicros"], "micro-USD for", body["receipt"]["results"], "results")
print(body["data"])—
0 reviews
Leave a review
Loading reviews…