Discover/NPB API
live

NPB APInpb.jp

Access Nippon Professional Baseball stats via the NPB.jp API. Get team rosters, batting/pitching stats, career histories, and league standings for all 12 NPB teams.

This API takes change requests — .
Endpoint health
verified 15h ago
get_player_career_stats
get_team_standings
get_team_batting_stats
get_team_pitching_stats
get_team_roster
7/7 passing latest checkself-healing
Endpoints
7
Updated
14h ago

What is the NPB API?

The NPB.jp API covers 7 endpoints that expose player statistics, team rosters, and league standings from Nippon Professional Baseball. Use get_team_batting_stats to pull per-player batting averages, home runs, OBP, and slugging for any team in the current season, or call get_player_career_stats with an 8-digit player_id to retrieve year-by-year batting and pitching history for a specific player across their entire NPB career.

Try it
NPB team identifier.
Season year in YYYY format.
When true, dynamically crawls all available calendar months for the season (April through current month), follows each game link, extracts per-player batting stats from English /bis/eng/ game pages, and aggregates cumulative season totals. New game days are automatically included as they appear on the calendar.
api.parse.bot/scraper/91b61a4d-e14a-4af5-81b6-71f15bad9fee/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/91b61a4d-e14a-4af5-81b6-71f15bad9fee/get_team_batting_stats?team=hanshin&season=2026&auto_update=false' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace npb-jp-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: NPB Stats SDK — bounded, re-runnable; every call capped."""
from parse_apis.NPB_Stats_API import Npb, Team_, PlayerNotFound

client = Npb()

# List active players filtered to one team
for player in client.active_players.list(team=Team_.HANSHIN, limit=3):
    print(player.name, player.team, player.player_id)

# Get both leagues' standings in one call
both = client.both_standingses.get()
print(both.season)
for standing in both.central[:3]:
    print(standing.Team, standing.W, standing.L, standing.PCT)

# Get batting stats for a team (standard mode)
for batter in client.team("hanshin").batting_stats(limit=3):
    print(batter.Player, batter.AVG, batter.HR)

# Get batting stats with auto_update (crawls game pages dynamically)
for batter in client.team("hanshin").batting_stats(auto_update=True, limit=3):
    print(batter.Player, batter.G, batter.AB, batter.H, batter.AVG)

# Get roster and drill into a player's career stats
player = client.team("hanshin").roster(limit=1).first()
try:
    career = player.career_stats()
    print(career.bio.name, career.bio.team)
except PlayerNotFound as e:
    print("player gone:", e.player_id)

# Get Central League standings
for standing in client.league("central").standings(limit=3):
    print(standing.Team, standing.GB)

print("exercised: active_players.list / both_standingses.get / team.batting_stats / team.roster / player.career_stats / league.standings")
All endpoints · 7 totalmissing one? ·

Retrieve current-season batting statistics for all players on a specified NPB team. Each player entry includes games played, at-bats, hits, home runs, RBI, batting average, slugging, OBP, and other standard batting metrics. Stats reflect the most recent game day. When auto_update is true, the endpoint dynamically crawls calendar game pages from April through the current month, follows each game link, extracts per-player batting stats from /bis/eng/ pages, and aggregates cumulative season totals.

Input
ParamTypeDescription
teamrequiredstringNPB team identifier.
seasonstringSeason year in YYYY format.
auto_updatebooleanWhen true, dynamically crawls all available calendar months for the season (April through current month), follows each game link, extracts per-player batting stats from English /bis/eng/ game pages, and aggregates cumulative season totals. New game days are automatically included as they appear on the calendar.
Response
{
  "type": "object",
  "fields": {
    "team": "team identifier used in the request",
    "season": "season year",
    "players": "array of player batting stat records",
    "auto_update": "boolean indicating auto_update mode was used (present only when auto_update=true)",
    "games_total": "total number of games found on calendar for the team (present only when auto_update=true)",
    "games_processed": "number of game pages successfully crawled (present only when auto_update=true)"
  },
  "sample": {
    "data": {
      "team": "hanshin",
      "season": "2026",
      "players": [
        {
          "G": "32",
          "H": "32",
          "R": "20",
          "2B": "5",
          "3B": "0",
          "AB": "128",
          "BB": "15",
          "CS": "2",
          "HP": "1",
          "HR": "0",
          "PA": "145",
          "SB": "6",
          "SF": "1",
          "SH": "0",
          "SO": "24",
          "TB": "37",
          "AVG": ".250",
          "GDP": "1",
          "IBB": "0",
          "OBP": ".331",
          "RBI": "5",
          "SLG": ".289",
          "Player": "Chikamoto, Koji"
        }
      ]
    },
    "status": "success"
  }
}

About the NPB API

Player and Roster Data

The get_team_roster endpoint returns all registered players on an NPB team, including jersey number, position group, birth date, physical measurements, and the player_id field that serves as the key for get_player_career_stats. That career endpoint returns a bio object (name, number, team, position, physical info) alongside either batting_stats or pitching_stats arrays — one record per season — depending on the player's position.

get_all_active_players spans all 12 NPB teams in a single call. It accepts an optional team filter and returns English-language names, team names, and player IDs. Entries containing Japanese characters are filtered out of the response, so the dataset reflects only players whose names are represented in the English-language roster pages.

Team Stats

get_team_batting_stats and get_team_pitching_stats each accept a required team identifier and an optional season year in YYYY format. Batting records include games played, at-bats, hits, home runs, RBI, batting average, slugging percentage, and OBP. Pitching records include wins, losses, saves, holds, ERA, innings pitched, and strikeouts. Both endpoints reflect the most recent completed game day.

Standings

get_team_standings returns standings for either the Central League or Pacific League, with wins, losses, ties, winning percentage, games behind, and head-to-head records against each opponent. get_both_standings retrieves both leagues in one request, returning central and pacific arrays ordered by current position. Both accept an optional season parameter to query historical seasons.

Reliability & maintenanceVerified

The NPB API is a managed, monitored endpoint for npb.jp — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when npb.jp changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official npb.jp API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
15h ago
Latest check
7/7 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Track real-time NPB standings for both leagues using get_both_standings to power a standings widget
  • Build a player comparison tool by querying get_player_career_stats for multiple player_ids and comparing year-by-year ERA or batting average
  • Populate team roster pages with jersey numbers, positions, and physical measurements from get_team_roster
  • Identify top home run hitters on a given team using get_team_batting_stats and filtering by home run totals
  • Monitor bullpen performance across the season by tracking saves and holds via get_team_pitching_stats
  • Compile an all-active-players database for NPB fantasy leagues using get_all_active_players across all 12 teams
  • Analyze historical season-by-season trends for a pitcher by requesting get_player_career_stats and examining the pitching_stats array
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does NPB have an official developer API?+
NPB (Nippon Professional Baseball) does not publish an official public developer API. The official site at npb.jp provides statistics and roster data for fans, but there is no documented API for developer access.
How do I get the player_id needed for get_player_career_stats?+
Call get_team_roster with the team identifier you want. Each player record in the returned players array includes a player_id field — an 8-digit numeric string — that you pass directly to get_player_career_stats.
Does get_all_active_players return Japanese player name spellings?+
No. The endpoint filters out entries that contain Japanese characters, so it returns only players whose names appear in the English-language roster pages. If you need Japanese-script names, that data is not currently exposed. You can fork this API on Parse and revise it to pull from the Japanese-language pages and include the additional name fields.
Are game-by-game box scores or play-by-play logs available?+
Not currently. The API covers season-aggregate batting and pitching stats, team standings, and career year-by-year records. Individual game logs and play-by-play data are not included in any endpoint. You can fork this API on Parse and revise it to add endpoints targeting game-level data.
How current are the stats returned by the batting and pitching endpoints?+
Both get_team_batting_stats and get_team_pitching_stats note that stats reflect the most recent game day. The standings endpoints update daily during the active season. There is no intra-game or live feed; data represents completed game days only.
Page content last updated . Spec covers 7 endpoints from npb.jp.
Related APIs in SportsSee all →
baseball-reference.com API
Access comprehensive MLB and college baseball (NCAA Division I) statistics from Baseball-Reference. Retrieve player career and season stats, team rosters and performance data, game box scores, season schedules, league leaders, and college conference standings — all from a single API.
mykbostats.com API
Access comprehensive KBO league data including team standings, schedules, rosters, player profiles, and game details to track Korean baseball statistics and performance metrics. Search for players, view depth charts, get foreign player information, and analyze win matrices to stay informed about the Korean Baseball Organization.
cpbl.com.tw API
Access comprehensive CPBL baseball data including live game schedules, detailed box scores, player statistics, and play-by-play game feeds to stay updated on the Chinese Professional Baseball League. Build applications that display team standings, player rosters, news updates, and advanced performance metrics for all CPBL games and athletes.
cba.sports.sina.com.cn API
Access comprehensive sports data including live game details, team information, player statistics rankings, schedules, and current round results. Track performances across teams and players while staying updated on upcoming matchups and real-time game outcomes.
rotowire.com API
Access MLB player news, statistics, projected lineups, and betting props from RotoWire. Search for players by name, retrieve season stats and performance projections, browse weekly lineup predictions, and explore player prop odds across multiple sportsbooks.
nhl.com API
Access data from nhl.com.
stats.ncaa.org API
Access comprehensive NCAA sports statistics to search for players, teams, and coaches, view game box scores and play-by-play data, and review team schedules, rosters, and rankings. Get detailed head coach records and scoreboard information to analyze performance across college sports.
statmuse.com API
Get instant access to comprehensive sports statistics, player performance data, and team information across NBA, NFL, MLB, NHL, and more using natural language queries. Search for specific athletes or teams and discover historical sports information with intuitive search suggestions.