Sports & Fitness · head-to-head

MLB Records and Stats vs NBA Stats

MLB Records and Stats

This entry documents MLB's own `statsapi.mlb.com` backend -- the same undocumented, keyless JSON API that powers MLB.com and its official apps -- covering teams, rosters, schedules, box scores, standings, and decades of historical stats, reverse-engineered and mirrored in the community `mlb-data-api-docs` reference. There's no official support or SLA since MLB never published it as a public product, but it has stayed stable and free for years. A live probe of the real host returned data with no API key and a wildcard `Access-Control-Allow-Origin`, resolving `cors: unknown -> yes` and correcting `https: false -> true` -- the stored `false` was stale, the host is https-only.

NBA Stats

"NBA Stats" refers to stats.nba.com, the unofficial internal API that powers NBA.com's own statistics pages rather than a published, supported product -- there's no official developer signup or docs, and its former any-api.com docs mirror now permanently redirects to an unrelated marketplace. The community-maintained swar/nba_api project (and its companion documentation site) is the best available reference, covering box scores, play-by-play, shot charts, and historical stats back to the 1996-97 season. No API key is required, but requests must spoof browser-like headers to get past NBA's bot filtering, and access is blocked outright from many data-center IP ranges -- treat it as an unofficial, goodwill-rate-limited source, not a guaranteed-uptime service.

MLB Records and StatsNBA Stats
AuthenticationNoneNone
Pricingfreefree
FormatsJSONJSON
CORSyesunknown
HTTPSYesYes

MLB Records and Stats supports CORS, while NBA Stats doesn't — pick MLB Records and Stats for direct browser calls.

More comparisons