// developers / docs

API documentation

Version 1 · base URL https://www.statsorb.com/api/v1 · JSON over HTTPS · machine-readable spec: openapi.json

1. Quick start

  1. Request a key (free for non-commercial use, or subscribe to a paid plan) and confirm your e-mail address.
  2. Once approved, sign in and create a key. It looks like so_AbCd2345_… and is shown once.
  3. Make your first request:
curl -H "Authorization: Bearer $STATSORB_KEY" \
  https://www.statsorb.com/api/v1/leagues/nfl/seasons/2026/ratings?pretty

Python

import os, requests

r = requests.get(
    "https://www.statsorb.com/api/v1/leagues/nfl/seasons/2026/ratings",
    headers={"Authorization": f"Bearer {os.environ['STATSORB_KEY']}"},
    timeout=30,
)
r.raise_for_status()
for team in r.json()["data"][:5]:
    print(team["rank"]["thisWeek"], team["team"], team["rating"])

JavaScript (Node.js 18+)

const res = await fetch("https://www.statsorb.com/api/v1/leagues/nba/seasons/2026/standings", {
  headers: { Authorization: `Bearer ${process.env.STATSORB_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const { data } = await res.json();

2. Authentication

Every data endpoint needs an API key, sent in a header:

Authorization: Bearer so_AbCd2345_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# or
X-API-Key: so_AbCd2345_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Never put the key in the URL (?api_key= is refused with key_in_query) — URLs end up in logs and browser history.
  • Keep keys on your server. The API doesn't allow calls from web pages in other sites (no CORS), so a key in front-end code would only leak.
  • Lock a key to your servers' IP addresses (see Managing keys) so it's useless if it ever leaks.
  • All of your account's keys share its rate limits and daily quota.

3. Responses

Successful responses are JSON with two parts: data (what you asked for) and meta (league, season, when it was generated and the attribution line). Add ?pretty to any request for indented output.

{
  "data": [ … ],
  "meta": {
    "generatedAt": "2026-10-21T19:04:11Z",
    "attribution": "Data: Stats Orb (statsorb.com)",
    "league": "nfl",
    "season": 2026,
    "plan": "free"
  }
}
  • Dates are YYYY-MM-DD; times are UTC (ISO 8601). Probabilities are decimals from 0 to 1.
  • Fields that don't apply are null (for example a score for a game not played yet). Records include ties only for leagues that have ties (NFL, NHL).
  • Every response carries an X-Request-Id header — include it if you contact us about a problem.
  • Ratings are recalculated as results come in; data is cached for about a minute, so polling faster than that returns the same numbers.

4. Rate limits & quotas

PlanPer minutePer day (UTC)Past the daily limit
Free (non-commercial)305,000Refused until 00:00 UTC
Developer120100,000Allowed, billed at $9 per 1,000 requests (up to your spending cap)
Business3001,000,000Allowed, billed at $9 per 1,000 requests (up to your spending cap)
Data license6005,000,000By agreement

The per-minute limit is a rolling 60-second window. Every metered response includes:

X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetSeconds until the window fully resets
X-Daily-Limit / X-Daily-RemainingYour daily quota and what's left of it today (UTC)
X-Overage: trueThis request was past your daily limit and counts as billable overage
Retry-AfterOn a 429, how many seconds to wait

When you get a 429, wait for Retry-After seconds before retrying. Clients that keep sending requests while limited may be suspended automatically. Requests refused by a limit don’t count toward your quota; /usage and /status are free.

5. Leagues

GET/api/v1/leagues

The leagues and seasons available. League ids:

idLeagueSeasons
nflNFL1990–2026
ncaafCollege Football1980–2026
ncaamMen's College Basketball2001–2026
nbaNBA1990–2026
nhlNHL1990–2026 (no 2004)
mlbMLB1990–2026

GET/api/v1/leagues/{league}

{ "data": { "id": "nhl", "name": "NHL", "recordsIncludeTies": true, "playerRatings": false, "leaguesRatedSeparatelyBefore": null,
            "seasons": { "first": 1990, "last": 2026, "default": 2026, "skipped": [2004] } } }

A season is identified by the year it starts in; for MLB, by its calendar year.

MLB notes. MLB ratings are in runs (an all-margin rating of 51.0 is about one run a game better than average). Every MLB team row also has league ("AL" or "NL"). Before 1997 the two leagues met only in the World Series, which the ratings leave out, so each league is rated on its own scale: for those seasons meta.ratedByLeague is true, every rank (this week's, rank history, SOS, all-margin, no-margin, projected standings, team games) is within the team's league, vsTopTeams is empty, and AL and NL ratings shouldn't be compared. Postseason games count in MLB records and ratings.

6. Ratings

GET/api/v1/leagues/{league}/seasons/{season}/ratings

Every team's current rating, ranks and projection, ordered by this week's rank — the data behind the ratings pages.

FieldMeaning
teamId, team, confDiv, leagueTeam id (use it with the games endpoint), name, conference/division, and (MLB) AL/NL
rank.thisWeek / lastWeek / twoWeeksAgo / threeWeeksAgoOverall rank now and in the previous three weeks (null before the season started)
rank.ratingImprovedThe rating went up since last week
recordWins, losses (and ties)
ratingOverall team rating (higher is better) -- the rating behind the ranks. In seasons rebuilt since November 2026 it rates teams on their results; game projections use a separate prediction rating that isn't published
strengthOfSchedule.value / rankStrength of schedule and its rank (1 = toughest)
strengthOfSchedule.benchmarkWinPctPerGameHow often the benchmark team (a top-25 team in college, the hypothetical average team in the pro leagues) would win against the schedule so far, per game -- the site's "Schedule so far" W-L is this times games played (lower = tougher)
strengthOfSchedule.projectedExpectedLossesLosses the benchmark team would expect over the full schedule -- the site's projected schedule W-L (higher = tougher)
recordStrength.benchmarkOdds / rankRecord strength: the chance (0 to 1) the benchmark team would have a record at least this good against the same games at the same sites (ties count half). Lower = a rarer, stronger record; rank follows it (1 = strongest). Seasons rebuilt since November 12, 2026
recordStrength.winsAboveBenchmarkThe team's wins minus the wins the benchmark team would expect against the same games
allMargin.rating / rankRating counting every point (goal, run) of margin -- only for seasons without recordStrength (MLB)
noMargin.rating / rankRating from wins and losses only -- only for seasons without recordStrength (MLB)
offense.rating / rankPoints (goals, runs) a game the team would score against the hypothetical average team; rank 1 = best. Seasons rebuilt since November 2026
defense.rating / rankPoints a game it would allow to the hypothetical average team (lower is better); rank 1 = best. Ratings in seasons rebuilt since November 2026 are centered on the hypothetical average team's points a game rather than 50
vsTopTeams[]Record against teams currently in the top N (top = N; pro leagues 5/10/15, college 10/25/100)
projection.text / wins / losses / tiesMost likely final record
projection.chanceWithinOneGameChance the final record lands within one game of the projection (while games remain)
projection.rank, recordStrengthRankExpected final rank (by the rating each team would end with if every remaining game ends as projected) and expected final record-strength rank (equal to the actual ranks once the season is over)
projection.strengthOfScheduleRank, gamesRemaining, finalProjected full-season SOS rank, games left, and whether the season is complete
extraAny additional values we add in the future, before they get a documented name

7. Projected standings

GET/api/v1/leagues/{league}/seasons/{season}/standings

Projected final standings, grouped by division (pro leagues) or conference (college), in projected finishing order.

{ "data": { "groupType": "division", "groups": [
  { "name": "AFC East", "teams": [
    { "rank": 5, "teamId": null, "team": "…", "projected": { "wins": 11, "losses": 6, "ties": 0 }, "gamesRemaining": 11 } ] } ] } }

College groups show projectedOverall and projectedConference records and conferenceGamesRemaining.

8. Teams

GET/api/v1/leagues/{league}/seasons/{season}/teams

A light list of teamId, team, confDiv and current rank — handy for looking up team ids.

9. Team games & projections

GET/api/v1/leagues/{league}/seasons/{season}/teams/{teamId}/games

One team's full schedule with results, expectations and the odds of every possible final record.

College football Featured Picks are not part of the API, for anyone (passes included): games that are featured picks in a week still on sale are left out until that week is over (Tuesday morning Eastern), and no pick, tier or record is ever included. When games are left out, meta.featuredPicksWithheld.games says how many. The same applies to the weekly games endpoint and the bulk export.

FieldMeaning
teamName, current rank, record and most likely final record
games[].date, statusGame date; final or scheduled
games[].away / hometeamId, team, current rank, record, score and (football) qb1Out — the starting quarterback is out
games[].neutralSite, playoffPlayed at a neutral site; playoff game
games[].outcomeFor this team: W, L or T (final games)
games[].projectedOutcomeProjected W/L for games not yet played
games[].expected.favorite, spread, textProjected favorite and expected margin, e.g. "Houston Texans (-2.27)". College football: above 28 points, a quarter of each further point comes off the projected margin (blowout underdogs keep scoring), while the win probability stays on the full margin, so in those games the two no longer follow the usual curve
games[].expected.favoriteWinProbabilityThe favorite's win probability as shown on the site
games[].expected.teamWinProbability, teamFavoredThis team's win probability, and whether it's the favorite
games[].deviationActual result minus the expected margin (final games)
games[].projectedPointsProjected points: away, home and total (seasons rebuilt with projected points; omitted otherwise)
games[].bettingLineBetting market: homeSpread (home team point spread, negative = home favored), total, dailySnapshots (the number of daily lines in the week before the game whose median is shown; empty for a consensus closing line) source and, for the NHL, marketHomeWinProb (the home team's chance to win from the moneylines, bookmaker margin removed; NHL has no point spread) -- NFL, college football, men's college basketball, NBA and NHL; omitted otherwise
games[].bettingLine.resultFinal games: the green / red marks on the team pages. spread and total are "model" when the result landed on the model's side of the line (projected margin or total vs. the line), "market" when it did not, and null for a push, a projection exactly on the line or no line. NHL: winner is "model" when the team the model rated higher than the market won, "market" when it lost, null for a game stored as a tie
projection.mostLikelyRecord, gamesRemaining, chanceToWinOutMost likely final record; games left; chance of winning all of them
projection.distribution[]Every possible final record with its probability (and newTies for the NFL)

10. Games by week

GET/api/v1/leagues/{league}/seasons/{season}/games?week=2026-11-10

Every game of a season, as on the website’s games pages (NFL, college football, men’s college basketball, NBA, NHL). Add week (any date, yyyy-MM-dd) for just the league’s week holding that date: Tuesday to Monday in the NFL and college football, Monday to Sunday elsewhere.

FieldMeaning
date, gameId, neutralSite, playoffThe game
away / hometeamId, team, rank going into that week, wins, losses (and ties) before the game, score
modelStats Orb’s homeMargin (positive = home favored), total and homeWinProb, frozen before the game once played
line, firstLineThe betting line’s homeMargin, total and (NHL) marketHomeWinProb; firstLine is the first line we captured (or the opener) with capturedOn and source
modelResultFinal games: the model’s side against the line and the total, "win", "loss" or null (push, no line)

11. Coach ratings

GET/api/v1/leagues/{league}/coaches

The coach ratings behind /ratings/{league}/coaches (NFL, college football, men’s college basketball): headCoaches (current), offensivePlayCallers and defensivePlayCallers (football), and headCoachesAllTime, with the same columns as the website tables in camel case, plus info.

12. NFL players & GMs

GET/api/v1/leagues/nfl/seasons/{season}/players

GET/api/v1/leagues/nfl/gms

The NFL player ratings for a season (players) and the general manager ratings (currentGms, allGms), with the same columns as /ratings/nfl/players and /ratings/nfl/gms in camel case.

13. MLB pitchers & hitters

GET/api/v1/leagues/mlb/seasons/{season}/players

The player ratings behind the MLB pages, best first, in three lists. Players appear with their latest team; before 1997 each player is rated within his league, and a player who changed leagues mid-season has a row per league. Other leagues answer 404 not_available.

FieldMeaning
pitchers[]Every pitcher with a start: rank, player, teamId, team, league, gamesStarted, games, inningsPitched ("182.1" = 182⅓) and innings (decimal), era, fip, rating (FIP regressed toward the league average, ERA scale — lower is better), runsSavedPer9, qualified (one inning per team game)
hitters[]Every player with a plate appearance: rank, player, teamId, team, league, games, plateAppearances, avg, obp, slg, homeRuns, rating (runs above average per 600 plate appearances, regressed — higher is better), rawRunsPer600 (as hit), qualified (3.1 plate appearances per team game)
teams[]Team components: rank, teamId, team, confDiv, offense and defense (runs per game better than average, neutral park), starterFip, bullpenFip, bullpenRunsSavedPer9, parkFactor (1.000 = neutral)

14. Bulk export data license

GET/api/v1/leagues/{league}/seasons/{season}/export

Everything for one league-season in a single response: ratings, standings and every team's games and projections (for MLB, also players). Available on the data-license plan (export_not_included otherwise). AI-training rights and historical bulk files are arranged by contract — contact us.

15. Your usage

GET/api/v1/usage

Your plan, limits, the key you called with and requests per day for the last 30 days. Doesn't count toward your daily quota (it does count toward the per-minute limit). GET /api/v1/status (no key needed) reports whether the API is up.

16. Errors

Errors use normal HTTP status codes and a consistent body:

{ "error": { "status": 429, "code": "rate_limited",
             "message": "Too many requests: your plan allows 30 per minute.",
             "docs": "https://www.statsorb.com/developers/docs#errors" },
  "requestId": "req_7hQ2…" }
StatuscodeWhat to do
400key_in_querySend the key in a header, not the URL
400invalid_season · invalid_team · invalid_weekCheck the season range (see leagues) or the team id
401missing_api_key · invalid_api_keyAdd your key / check it for typos
401key_expired · key_revokedRenew the key or create a new one in your account
402payment_requiredA subscription payment failed — update your card
403key_suspended · account_pending · account_inactiveSee the message; contact us if unexpected
403ip_not_allowedThe request came from an IP outside the key's allowlist
403export_not_includedBulk export needs a data license
404unknown_league · season_not_played · team_not_found · no_data · not_available · not_foundCheck the address and ids
405method_not_allowedThe API is read-only — use GET
429rate_limited · daily_limit_reached · overage_cap_reached · too_many_failed_attemptsWait Retry-After seconds; consider a bigger plan or raising your overage cap
503upstream_unavailable · api_disabledTemporary — retry with backoff (e.g. 1 min, 2 min, 4 min)

17. Managing keys

  • IP allowlist (recommended): limit a key to specific IP addresses or ranges (e.g. 203.0.113.7, 198.51.100.0/24). Requests from anywhere else get ip_not_allowed.
  • Rotation with overlap: “Rotate” creates a replacement key; the old one keeps working for 7 days so you can switch without downtime, then stops.
  • Expiry & renewal: keys last 365 days. We e-mail you 14 and 3 days before expiry; “Renew” extends a key without changing it.
  • Automatic suspension: to protect you and the service, a key is suspended automatically if it's used from more than 25 different IP addresses in an hour (a sign it's been shared or leaked), keeps sending requests after hitting its rate limit (600 refused requests in an hour), or gets 100 requests from outside its IP allowlist in an hour. We e-mail you; it's reinstated automatically after 24 hours.
  • Revoke a key immediately if it may have leaked, and create a new one.

18. Attribution & rules (summary)

  • Free keys: non-commercial use only, and you must credit “Data: Stats Orb (statsorb.com)” wherever the data appears (with a link to statsorb.com where possible).
  • No AI training on any plan except under a data license.
  • Don't share keys, resell or redistribute the raw data in bulk, or try to get around limits (for example with several free accounts).
  • Scraping the website instead of using the API isn't allowed — automated requests to the ratings pages are redirected here.

The full rules are in the API terms.

19. Versioning & support

We may add new endpoints and fields to v1 at any time, so ignore fields you don't recognize. Anything that would break existing code will come in a new version (/api/v2), with at least 90 days' notice by e-mail before v1 changes. Questions or problems: contact us and include the X-Request-Id.