Quick Start

Welcome to the RotoWire API

The RotoWire API gives you programmatic access to real-time sports data across all major leagues — injuries, news, lineups, depth charts, projections, and more. This guide walks you through authentication, making your first call, and building reliable integrations.


Authentication

Every request requires your API key passed as a query parameter.

https://api.rotowire.com/{sport}/{endpoint}.php?key=YOUR_API_KEY
🔑

Your API key is unique to your account. Keep it secret — do not expose it in client-side code or public repositories.

Example — NBA Injuries:

curl "https://api.rotowire.com/Basketball/get-nba-injuries.php?key=YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rotowire.com"

resp = requests.get(f"{BASE_URL}/Basketball/get-nba-injuries.php", params={"key": API_KEY})
data = resp.json()
print(data)
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rotowire.com';

const resp = await fetch(`${BASE_URL}/Basketball/get-nba-injuries.php?key=${API_KEY}`);
const data = await resp.json();
console.log(data);

Base URL & Available Sports

All endpoints share the same base URL:

https://api.rotowire.com

Endpoints are organized by sport:

SportPath Prefix
Basketball (NBA, WNBA, CBB)/Basketball/
Baseball (MLB, KBO, NPB)/Baseball/
Football (NFL, CFB, CFL)/Football/
Hockey (NHL)/Hockey/
Soccer (EPL, MLS, UCL, etc.)/Soccer/
Golf (PGA)/Golf/
NASCAR / Racing/Racing/
MMA / UFC/MMA/

Use the sidebar to browse all available endpoints within each sport.


Your First API Call

Let's retrieve today's NBA injury report in three steps.

Step 1 — Make the request:

curl "https://api.rotowire.com/Basketball/get-nba-injuries.php?key=YOUR_API_KEY"

Step 2 — Inspect the response:

{
  "League": "NBA",
  "Date": "2025-01-15",
  "Updates": [
    {
      "Id": "530628",
      "DateTime": "2025-01-15T14:19:59-07:00",
      "Headline": "Game-time call for Game 6",
      "Notes": "Robinson (back) is questionable...",
      "Injury": {
        "Status": "GTD",
        "Type": "Back",
        "Location": "Torso",
        "Detail": "Soreness"
      },
      "Player": {
        "FirstName": "Duncan",
        "LastName": "Robinson",
        "Position": "F",
        "InjuryStatus": "GTD",
        "NBAInjuryStatus": "QUESTIONABLE"
      },
      "Team": {
        "Name": "Detroit Pistons",
        "Code": "DET"
      }
    }
  ]
}

Step 3 — Filter by priority (optional):

curl "https://api.rotowire.com/Basketball/get-nba-injuries.php?key=YOUR_API_KEY&max_priority=2"

Priority 1 = highest impact (star players, game-time decisions). Priority 3 = lower impact.


Key Parameters

Most endpoints support these common parameters:

ParameterTypeDescription
keystringRequired. Your API key.
datestringFilter results to a specific date. Format: YYYY-MM-DD. Defaults to today.
hoursintegerReturn updates from the last N hours. Useful for polling recent changes.
max_priorityintegerReturn only updates at or above this priority level (1 = most important).
formatstringResponse format. Defaults to json. Some endpoints support xml.
💡

Use hours=1 when polling frequently — it returns only the most recent updates and keeps payloads small.


Data Categories

The RotoWire API provides the following data types across all sports:

Injuries & News

Real-time injury reports and player news updates with analysis. Updated continuously throughout the day.

  • get-nba-injuries.php — Full injury list with status, body part, and return dates
  • get-nba-news.php — All news updates
  • get-nba-news-updates.php — Recent news filtered by hours
  • get-nba-top-headlines.php — Highest-priority updates only

Lineups

Official starting lineups as they are confirmed, typically 60–90 minutes before tip-off/first pitch.

  • get-nba-lineups.php — Projected and confirmed starters with home/away context

Depth Charts

Full roster depth ordering by position, updated to reflect trades, injuries, and coaching decisions.

  • get-nba-depth-charts.php — Full team depth by position

Projections & DFS

Fantasy and DFS projections with salary and expected value data.

  • get-nba-dfs-projections.php — Per-player stat projections and DFS site salaries

Players & Transactions

Full player rosters with biographical data, and a transaction log of signings, trades, and waivers.

  • get-nba-players.php — Full player list with team, position, and status
  • get-nba-transactions.php — Recent roster moves

Polling Best Practices

The RotoWire API is a REST polling API — there are no webhooks or streaming connections. Build your integration around these guidelines:

Data TypeRecommended Poll Interval
Injuries / News (game day)Every 5–10 minutes
Injuries / News (off-day)Every 30–60 minutes
LineupsEvery 5 minutes starting 2 hours before game time
Depth ChartsEvery 4–6 hours
ProjectionsOnce daily, or after lineup confirmation
TransactionsEvery 30–60 minutes

Use the hours parameter when polling to avoid reprocessing data you've already ingested:

curl "https://api.rotowire.com/Basketball/get-nba-news-updates.php?key=YOUR_API_KEY&hours=1"

Cache responses when upstream data hasn't changed. Check the Date and DateTime fields on updates to detect new records rather than re-processing full payloads.

Handle errors gracefully. Network timeouts and occasional 5xx errors are normal. Implement exponential backoff — wait 5s, then 15s, then 60s before retrying.


Next Steps

  • Browse the API Reference in the sidebar to see all available endpoints
  • Check the Leagues & Sports Reference page for a full list of league codes
  • View example responses on each endpoint page to understand the data shape before you build