League Leaders Who Led?

League Leaders API

Season and career statistical leaders for five leagues, as JSON. No key, no account, no cost.

Every endpoint is a GET request that returns JSON, with CORS open and no authentication. The data covers MLB from 1871 (the Negro Leagues included), the NFL from 1922, the NBA from 1951–52, the NHL from 1917–18 and the WNBA from 1997. It is free to use under CC BY 4.0 — every response carries the canonical URL of the page its data came from, and a link back to that page is the only thing asked in return.

Start here

Step Call
1. See what exists /api/categories.php
2. Find a player id /api/search.php?q=gretzky
3. Ask a question /api/leaders.php?sport=nhl&group=skating&cat=p&year=1986

Machine-readable description

The whole API is described by an OpenAPI 3.1 document, in YAML as well. Point a generator at either and you have a typed client in whichever language you work in, without reading any of the prose below.

https://leagueleaders.com/api/openapi.json
https://leagueleaders.com/api/openapi.yaml

/api/categories.php

Every league, its season coverage, and every category it ranks.

ParameterNotes
sport optional — one league instead of all five

Try it →

/api/search.php

Name to player id. Call this first; ids are what everything else takes.

ParameterNotes
q required, two characters or more
sport optional
limit optional, default 20

Try it →

/api/leaders.php

One season's leaderboard for one category.

ParameterNotes
sport required
group required
cat required
year required
lg optional sub-league
qual optional, 0 to drop the qualification minimum
limit optional, default 50, max 500
offset optional

Try it →

/api/career.php

The all-time career leaderboard for one category.

ParameterNotes
sport required
group required
cat required
qual optional
limit optional
offset optional

Try it →

/api/player.php

One player: bio, every category they led and when, all-time standing.

ParameterNotes
sport required
id required
seasons optional, 1 to include the year-by-year record

Try it →

/api/records.php

Who has led a category most often, and how its single-season record moved. Omit cat for titles of any kind.

ParameterNotes
sport required
group optional
cat optional
limit optional

Try it →

Terms, briefly

  • Licence. CC BY 4.0. Use it commercially, build on it, redistribute it — credit League Leaders and link to the source page named in each response.
  • Rate limit. 600 requests an hour per address. That is a courtesy limit, not a policy; if you need more, get in touch and say what you are building.
  • Stability. Field names and endpoint paths will not change without a new path. New fields may be added, so parse permissively.
  • Coverage. Each league's data starts where its source starts, and every career response states its own span. A career total here means "since the first season we hold".
  • Provenance. MLB from the Lahman database maintained by SABR, the NFL from nflverse, the NBA and NHL from the leagues' own statistics feeds.