1. Quick start
- Request a key (free for non-commercial use, or subscribe to a paid plan) and confirm your e-mail address.
- Once approved, sign in and create a key. It looks like
so_AbCd2345_…and is shown once. - 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 withkey_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 includetiesonly for leagues that have ties (NFL, NHL). - Every response carries an
X-Request-Idheader — 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
| Plan | Per minute | Per day (UTC) | Past the daily limit |
|---|---|---|---|
| Free (non-commercial) | 30 | 5,000 | Refused until 00:00 UTC |
| Developer | 120 | 100,000 | Allowed, billed at $9 per 1,000 requests (up to your spending cap) |
| Business | 300 | 1,000,000 | Allowed, billed at $9 per 1,000 requests (up to your spending cap) |
| Data license | 600 | 5,000,000 | By agreement |
The per-minute limit is a rolling 60-second window. Every metered response includes:
| X-RateLimit-Limit | Requests allowed per minute |
| X-RateLimit-Remaining | Requests left in the current window |
| X-RateLimit-Reset | Seconds until the window fully resets |
| X-Daily-Limit / X-Daily-Remaining | Your daily quota and what's left of it today (UTC) |
| X-Overage: true | This request was past your daily limit and counts as billable overage |
| Retry-After | On 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:
| id | League | Seasons |
|---|---|---|
| nfl | NFL | 1990–2026 |
| ncaaf | College Football | 1980–2026 |
| ncaam | Men's College Basketball | 2001–2026 |
| nba | NBA | 1990–2026 |
| nhl | NHL | 1990–2026 (no 2004) |
| mlb | MLB | 1990–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.
| Field | Meaning |
|---|---|
| teamId, team, confDiv, league | Team id (use it with the games endpoint), name, conference/division, and (MLB) AL/NL |
| rank.thisWeek / lastWeek / twoWeeksAgo / threeWeeksAgo | Overall rank now and in the previous three weeks (null before the season started) |
| rank.ratingImproved | The rating went up since last week |
| record | Wins, losses (and ties) |
| rating | Overall 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 / rank | Strength of schedule and its rank (1 = toughest) |
| strengthOfSchedule.benchmarkWinPctPerGame | How 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.projectedExpectedLosses | Losses the benchmark team would expect over the full schedule -- the site's projected schedule W-L (higher = tougher) |
| recordStrength.benchmarkOdds / rank | Record 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.winsAboveBenchmark | The team's wins minus the wins the benchmark team would expect against the same games |
| allMargin.rating / rank | Rating counting every point (goal, run) of margin -- only for seasons without recordStrength (MLB) |
| noMargin.rating / rank | Rating from wins and losses only -- only for seasons without recordStrength (MLB) |
| offense.rating / rank | Points (goals, runs) a game the team would score against the hypothetical average team; rank 1 = best. Seasons rebuilt since November 2026 |
| defense.rating / rank | Points 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 / ties | Most likely final record |
| projection.chanceWithinOneGame | Chance the final record lands within one game of the projection (while games remain) |
| projection.rank, recordStrengthRank | Expected 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, final | Projected full-season SOS rank, games left, and whether the season is complete |
| extra | Any 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.
| Field | Meaning |
|---|---|
| team | Name, current rank, record and most likely final record |
| games[].date, status | Game date; final or scheduled |
| games[].away / home | teamId, team, current rank, record, score and (football) qb1Out — the starting quarterback is out |
| games[].neutralSite, playoff | Played at a neutral site; playoff game |
| games[].outcome | For this team: W, L or T (final games) |
| games[].projectedOutcome | Projected W/L for games not yet played |
| games[].expected.favorite, spread, text | Projected 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.favoriteWinProbability | The favorite's win probability as shown on the site |
| games[].expected.teamWinProbability, teamFavored | This team's win probability, and whether it's the favorite |
| games[].deviation | Actual result minus the expected margin (final games) |
| games[].projectedPoints | Projected points: away, home and total (seasons rebuilt with projected points; omitted otherwise) |
| games[].bettingLine | Betting 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.result | Final 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, chanceToWinOut | Most 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.
| Field | Meaning |
|---|---|
| date, gameId, neutralSite, playoff | The game |
| away / home | teamId, team, rank going into that week, wins, losses (and ties) before the game, score |
| model | Stats Orb’s homeMargin (positive = home favored), total and homeWinProb, frozen before the game once played |
| line, firstLine | The betting line’s homeMargin, total and (NHL) marketHomeWinProb; firstLine is the first line we captured (or the opener) with capturedOn and source |
| modelResult | Final 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.
| Field | Meaning |
|---|---|
| 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…" }
| Status | code | What to do |
|---|---|---|
| 400 | key_in_query | Send the key in a header, not the URL |
| 400 | invalid_season · invalid_team · invalid_week | Check the season range (see leagues) or the team id |
| 401 | missing_api_key · invalid_api_key | Add your key / check it for typos |
| 401 | key_expired · key_revoked | Renew the key or create a new one in your account |
| 402 | payment_required | A subscription payment failed — update your card |
| 403 | key_suspended · account_pending · account_inactive | See the message; contact us if unexpected |
| 403 | ip_not_allowed | The request came from an IP outside the key's allowlist |
| 403 | export_not_included | Bulk export needs a data license |
| 404 | unknown_league · season_not_played · team_not_found · no_data · not_available · not_found | Check the address and ids |
| 405 | method_not_allowed | The API is read-only — use GET |
| 429 | rate_limited · daily_limit_reached · overage_cap_reached · too_many_failed_attempts | Wait Retry-After seconds; consider a bigger plan or raising your overage cap |
| 503 | upstream_unavailable · api_disabled | Temporary — 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 getip_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.