API Documentation
Complete reference for accessing NBA and NCAAB analytics data programmatically. Build custom integrations, mobile apps, and automated workflows with SportsFBI's powerful multi-sport REST API.
Getting Started
Prerequisites
To use the SportsFBI API, you need:
- PRO or ELITE subscription - API access requires paid subscription
- API Key - Generate from your API Keys page
- HTTPS support - All API requests must use HTTPS
Base URL
https://blowoutalert.sportsfbi.com/api
Quick Start
Make your first API request in under 60 seconds:
# Get today's NBA games
curl -X GET "https://blowoutalert.sportsfbi.com/api/nba/games/today" \
-H "Authorization: Bearer YOUR_API_KEY"
Authentication
All API requests require authentication using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer sfbi_abc123...
Getting Your API Key
- Sign in to your SportsFBI account
- Navigate to API Keys
- Click "Generate New API Key"
- Copy and securely store your key (shown only once)
⚠️ Security Best Practices
- Never commit API keys to version control
- Use environment variables to store keys
- Rotate keys regularly (at least every 90 days)
- Revoke compromised keys immediately
- Use different keys for development and production
Rate Limits
API rate limits are based on your subscription tier and enforce fair usage across all users:
API key requests per minute
- Full API access
- Advanced stats
- Matchup analysis
- Up to 5 API keys
API key requests per minute
- Everything in PRO
- 4x higher rate limit
- Player props
- Priority support
Rate Limit Headers
Every API response includes rate limit information in headers:
RateLimit-Limit: 150
RateLimit-Remaining: 142
RateLimit-Reset: 1672531200
Handling Rate Limits
When you exceed your rate limit, the API returns a 429 Too Many Requests status. Implement exponential backoff:
// Example: Exponential backoff in JavaScript
async function fetchWithRetry(url, retries = 3) {
for (let i = 0; i < retries; i++) {
const response = await fetch(url);
if (response.status !== 429) return response;
const delay = Math.pow(2, i) * 1000; // 1s, 2s, 4s
await new Promise(resolve => setTimeout(resolve, delay));
}
throw new Error('Max retries exceeded');
}
API Endpoints
All endpoints are served from: https://blowoutalert.sportsfbi.com
Free endpoints require no authentication. Pro/Elite endpoints require a valid API key with the appropriate subscription tier.
Games
Today's NBA games with quality ratings, team standings, and injuries.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Optional | YYYY-MM-DD (defaults to today) |
| tzOffsetMin | integer | Optional | Timezone offset in minutes, −720 to 720 (e.g. −300 for EST) |
Starting lineups, bench players, injuries, and team standings for a specific game.
Key Suspects analysis — players likely to exceed prop projections based on matchup, role, and usage trends.
Streak alerts for both teams in a game — precomputed every 5 min via the feature store (10-min Redis TTL).
Team PPG / PAPG trends for both teams — precomputed every 5 min via the feature store (10-min Redis TTL).
Play-by-play data organized by quarter.
Spreads, moneylines, and totals for one or more games.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| gameIds | string | Required | Comma-separated NBA game IDs |
| vendor | string | Required | Sportsbook vendor name |
Slate & DFS
Precomputed DFS score ranking for today's slate. Refreshed every 5 min by cron and served from Redis (~5 ms). Falls back to on-demand computation if Redis is unavailable.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| vendor | string | Optional | draftkings (default) or fanduel |
Players on active consecutive over-streaks. Looks at last 20 games, counts consecutive overs from most recent. Minimum streak of 2. Sorted by streak length descending.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| propType | string | Optional | points_rebounds_assists (default), points, rebounds, assists, points_rebounds, points_assists, rebounds_assists |
Players — Free Tier
Player profile (name, position, height, weight, team).
List of seasons the player has box-score data for.
Game-by-game statistics for a season.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year (e.g. 2024) |
Season averages (pts, reb, ast, etc.).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year |
Current injury status and history for a player.
All-time stats for this player versus a specific team.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| teamAbbr | string | Required | Team abbreviation (e.g. LAL) |
Player box score for a specific game.
All current player injuries across the league.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| teamId | integer | Optional | Filter by team ID |
| status | string | Optional | out, doubtful, questionable, dtd, probable |
Players — Pro/Elite
Game-by-game advanced metrics: PIE, ORtg, DRtg, TS%, and more.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year |
Player contract details by season.
Last 5 games averaged stats with archetype detection.
Detailed 18-role breakdown with scores and probabilities for the player's current archetype classification.
Condensed role analysis: primary role and top 3 role distribution — optimized for UI insights.
Lightweight verdict-only endpoint for icon color-coding in lineup cards. Skips full projection engine — returns favorable / neutral / unfavorable in milliseconds.
Comprehensive matchup analysis including player archetype, opponent defensive profile, usage trends, zone data, and projected score delta.
Player prop betting lines for a specific game.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| game_id | string | Required | NBA API game ID |
Historical over/under hit rates by prop type. Precomputed and cached in Redis (1-hour TTL).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | Number of recent games to analyse, 1–50 (default: 25) |
| propType | string | Optional | Prop category filter (e.g. points) |
| line | number | Optional | Prop line value filter |
Clutch performance — stats in close games (final margin ≤5) vs. overall season averages. Precomputed and cached in Redis (10-min TTL).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year |
Leaderboards
Statistical leaderboards for live, daily, or full-season stats.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | Required | pts, reb, ast, stl, blk, fg3m, fgm, fga, ftm, fta, plus_minus |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | Optional | today (live), daily (completed games), season — default: today |
| limit | integer | Optional | Max results 1–50 (default: 10) |
| seasonYear | integer | Optional | Season year for season mode (e.g. 2024) |
| date | string | Optional | YYYY-MM-DD for daily mode |
| tzOffsetMin | integer | Optional | Timezone offset in minutes |
| onlyTodayPlayers | boolean | Optional | Season mode — restrict to players in today's games (true/false) |
Current league averages (pace, defensive rating, etc.).
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| refresh | string | Optional | true to force recalculation from the database |
DFS scoring rules reference (DraftKings and FanDuel point values).
Teams
Predicted starting lineup based on last 15 games of player usage.
Team schedule with results and upcoming games.
Full team roster with positions, jersey numbers, and contract status.
Team season averages — PPG, PAPG, pace, offensive and defensive ratings.
Detailed defensive statistics: season averages, rim protection, paint defence, pace, and positional matchup breakdowns.
DFS Lineup Projections
DFS lineup projection engine — returns per-player DFS projections, lineup synergy scoring, opponent defensive profile, and role compatibility analysis for a given 2–5 player lineup.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| playerIds | array | Required | Array of 2–5 internal player IDs |
| opponentTeamAbbr | string | Required | Opponent team abbreviation (e.g. GSW) |
Games
Today's NCAAB games with team info, scores, status, and game quality ratings.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Optional | YYYY-MM-DD (defaults to today) |
| tzOffsetMin | integer | Optional | Timezone offset in minutes, −720 to 720 |
Starting lineups, bench players, injuries, and team standings for a specific NCAAB game.
Key Suspects analysis for NCAAB — college players likely to exceed projections based on matchup and usage context.
Player box score for a specific NCAAB game.
Play-by-play data organized by half.
Spreads, moneylines, and totals for NCAAB games.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| gameIds | string | Required | Comma-separated NCAAB game IDs |
| vendor | string | Required | Sportsbook vendor name |
Players
Player profile (name, position, height, weight, team, jersey number).
List of seasons the player has box-score data for.
Game-by-game statistics for a NCAAB season.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year (e.g. 2024) |
Season averages for a NCAAB player.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| season | integer | Required | Season start year |
Matchup breakdown for a NCAAB player vs a specific opponent — usage context, defensive profile, and projected impact.
Leaderboards
Statistical leaderboards for NCAAB — live, daily, or season modes.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | Required | pts, reb, ast, stl, blk, fg3m, fgm, fga, ftm, fta, plus_minus |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | Optional | today, daily, or season (default: today) |
| limit | integer | Optional | Max results 1–50 (default: 10) |
| seasonYear | integer | Optional | Season year for season mode |
| date | string | Optional | YYYY-MM-DD for daily mode |
| tzOffsetMin | integer | Optional | Timezone offset in minutes |
Teams
NCAAB team schedule with results and upcoming games.
Full team roster with player positions and jersey numbers.
Team statistics including PPG, PAPG, pace, and offensive / defensive breakdowns.
Team season averages across all games played.
System & Utilities
System health check. Reports database connectivity, Redis status, and feature store pipeline freshness (gameFeatures and playerFeatures staleness flags).
Your current rate-limit usage and remaining quota for the active window.
Current authentication status — tier, subscription state, and API key validity.
Error Handling
The API uses standard HTTP status codes and returns errors in JSON format:
HTTP Status Codes
| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Insufficient subscription tier |
| 404 | Not Found | Resource doesn't exist |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Error Response Format
{
"error": "Invalid API key",
"statusCode": 401,
"timestamp": "2026-02-09T12:34:56.789Z"
}
Code Examples
JavaScript (Node.js)
const fetch = require('node-fetch');
const API_KEY = process.env.SPORTSFBI_API_KEY;
const BASE_URL = 'https://blowoutalert.sportsfbi.com/api';
async function getTodayGames() {
const response = await fetch(`${BASE_URL}/nba/games/today`, {
headers: {
'Authorization': `Bearer ${API_KEY}`
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return await response.json();
}
getTodayGames()
.then(games => console.log(games))
.catch(err => console.error(err));
Python
import requests
import os
API_KEY = os.environ['SPORTSFBI_API_KEY']
BASE_URL = 'https://blowoutalert.sportsfbi.com/api'
def get_today_games():
headers = {
'Authorization': f'Bearer {API_KEY}'
}
response = requests.get(
f'{BASE_URL}/nba/games/today',
headers=headers
)
response.raise_for_status()
return response.json()
try:
games = get_today_games()
print(games)
except requests.exceptions.RequestException as e:
print(f'Error: {e}')
cURL
# Get today's games
curl -X GET "https://blowoutalert.sportsfbi.com/api/nba/games/today" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get player profile
curl -X GET "https://blowoutalert.sportsfbi.com/api/nba/players/123" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get leaderboard
curl -X GET "https://blowoutalert.sportsfbi.com/api/nba/leaderboard/pts?mode=today&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get matchup analysis (Pro/Elite)
curl -X GET "https://blowoutalert.sportsfbi.com/api/nba/players/123/matchup-analysis/LAL" \
-H "Authorization: Bearer YOUR_API_KEY"
Response Example
{
"success": true,
"data": [
{
"id": 1234,
"nbaGameId": "0022600789",
"status": "live",
"homeTeam": {
"id": 5,
"name": "Lakers",
"abbreviation": "LAL",
"score": 98
},
"awayTeam": {
"id": 10,
"name": "Warriors",
"abbreviation": "GSW",
"score": 95
},
"period": 3,
"gameClock": "5:23",
"startTime": "2026-02-09T19:30:00Z"
}
]
}
Support & Resources
Need help with the API? We're here to assist:
- API Keys: Manage your API keys
- Profile: View subscription and rate limits
- Upgrade: Increase your rate limits
- Issues: Check the GitHub Issues
📧 Contact Support
For API-specific questions or issues, please contact our support team with your API key ID (not the full key) and a description of your issue.