Skip to content
On this page

API Examples

This page is a copyable example book for the customer-facing Scottfree Sports REST API.

Production base URL:

text
https://sports-api.scottfreellc.com

Use your key in X-API-Key:

bash
export SFS_API_KEY="sk_alphapysports_PASTE_YOUR_KEY"

Sports:

text
mlb, nba, nfl, nhl, ncaaf, ncaab

Model types:

text
over_under, won_on_points, won_on_spread

For moneyline and spread, probabilities are home-team relative. For totals, probabilities are over-relative.

Discovery

List available sports and model types:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  https://sports-api.scottfreellc.com/api/v1/sports

Predictions

MLB moneyline:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/predictions/mlb/won_on_points"

NBA spread, including the whole prediction artifact:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/predictions/nba/won_on_spread?upcoming_only=false"

NHL total:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/predictions/nhl/over_under"

Read the prediction row this way:

MarketPositive sideKey fields
over_underOverover_under, open_over_under, over_line, under_line
won_on_pointsHome moneylinehome_money_line, away_money_line, opener moneyline fields
won_on_spreadHome spreadhome_point_spread, away_point_spread, opener spread fields

Free Website ML Predictions

These endpoints are public and unauthenticated. They power the free ML Predictions page.

bash
curl "https://sports-api.scottfreellc.com/api/v1/public/ml-picks/mlb/moneyline"
bash
curl "https://sports-api.scottfreellc.com/api/v1/public/ml-picks/nba/spread"
bash
curl "https://sports-api.scottfreellc.com/api/v1/public/ml-picks/nhl/over_under"

Public markets map to authenticated model types:

Public marketModel type
moneylinewon_on_points
spreadwon_on_spread
over_underover_under

Current Odds

Current MLB odds:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/odds/mlb"

Current NBA odds:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/odds/nba"

Results

Recent MLB moneyline results:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/mlb/won_on_points?limit=25"

Recent NBA spread results:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/nba/won_on_spread?limit=50"

Recent NHL total results:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/nhl/over_under?limit=50"

Results Page Data

Rolling result curves:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/nfl/won_on_spread/rolling"

Result distribution payload:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/nba/over_under/density"

Team form:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/results/mlb/won_on_points/team-form"

Summary

MLB moneyline model summary:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/summary/mlb/won_on_points"

NBA spread model summary:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/summary/nba/won_on_spread"

NHL total model summary:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/summary/nhl/over_under"

Account

Show your account:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/customers/me"

Show monthly usage:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/customers/me/usage"

List keys:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/customers/me/api-keys"

Create another key:

bash
curl -X POST \
  -H "X-API-Key: $SFS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Research Laptop"}' \
  "https://sports-api.scottfreellc.com/api/v1/customers/me/api-keys"

Rename a key:

bash
curl -X PATCH \
  -H "X-API-Key: $SFS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key_to_rename":"sk_alphapysports_abcd*****","new_name":"Desktop App"}' \
  "https://sports-api.scottfreellc.com/api/v1/customers/me/api-keys/rename"

Revoke a key:

bash
curl -X DELETE \
  -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/customers/me/api-keys/sk_alphapysports_abcd*****"

The API will not let you revoke the same key used for that request.

Sports Data Refresh

Sports Data is separate from Basic and Premium. It refreshes historical datasets already attached to your account.

Check refresh status:

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/scottfree-sports-data/status"

Generate fresh signed download links:

bash
curl -X POST \
  -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/scottfree-sports-data/refresh"

Refresh links expire quickly. Download the files after the refresh response returns.

Health Checks

These are unauthenticated connectivity checks:

bash
curl "https://sports-api.scottfreellc.com/api/v1/health"
curl "https://sports-api.scottfreellc.com/api/v1/readiness"
curl "https://sports-api.scottfreellc.com/api/v1/liveness"

Compatibility Endpoints

These endpoints remain available so older clients receive explicit empty payloads instead of broken responses. No validated betting selector is active.

bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/picks/today"
bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/picks/2026-05-23"
bash
curl -H "X-API-Key: $SFS_API_KEY" \
  "https://sports-api.scottfreellc.com/api/v1/picks/performance?sport=MLB&market=total"
bash
curl "https://sports-api.scottfreellc.com/api/v1/edge-picks"
bash
curl "https://sports-api.scottfreellc.com/api/v1/edge-picks/2026-05-23"
bash
curl "https://sports-api.scottfreellc.com/api/v1/edge-picks/track-record"

Response Shapes

For field-level response notes, see:

Sports model data and research tools