Quickstart

Quickstart

Get started with Sports Stack API in 5 minutes.

Step 1: Get Your API Key

  1. Sign up for a Sports Stack account
  2. Navigate to your dashboard
  3. Generate an API key from Settings → API Keys
  4. Copy your API key (you'll need it for all requests)

Step 2: Make Your First Request

Let's fetch a list of NFL teams:

curl -X GET "https://api.sportsstack.io/api/v1/teams?league_id=nfl" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json"
}

response = requests.get(
    "https://api.sportsstack.io/api/v1/teams",
    params={"league_id": "nfl"},
    headers=headers
)

teams = response.json()
print(f"Found {len(teams['data'])} teams")
const fetch = require('node-fetch');

const response = await fetch(
  'https://api.sportsstack.io/api/v1/teams?league_id=nfl',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Accept': 'application/json'
    }
  }
);

const data = await response.json();
console.log(`Found ${data.data.length} teams`);

Step 3: Explore the API

Now that you've made your first request, explore other endpoints:

  • Events: GET /api/v1/events - Get game schedules and results
  • Players: GET /api/v1/players - Get player information
  • Stats: GET /api/v1/event-stats - Get game statistics
  • Markets: GET /api/v1/markets - Get betting markets
  • Futures: GET /api/v1/futures - Get future markets (outrights, season totals)
  • Odds: GET /api/v1/odds - Get betting odds from sportsbooks

Next Steps