DocumentationAPI Reference
Developer

API Reference

Integrate SportCheck predictions and data into your own applications.

Quick Start

curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.sportcheck.ai/v1/predictions
Authentication

API Keys

All API requests require authentication via API key. Generate keys in your dashboard under Settings > API Keys. Keep your keys secure and never expose them in client-side code.

Using Your Key

Include your API key in the Authorization header as a Bearer token: Authorization: Bearer sk_live_xxxx

Key Types

Create separate keys for different environments (development, staging, production) and applications. Each key can be revoked independently.

Key Permissions

Keys can have different permission scopes: read-only (predictions, odds), read-write (includes bet history), or admin (full access).

Security Best Practices

Rotate keys periodically, use environment variables, and never commit keys to version control. Enable IP whitelisting for production keys.

API Endpoints

Base URL

All API requests should be made to: https://api.sportcheck.ai/v1

Predictions Endpoint

GET /predictions - List predictions for upcoming games. Supports filters for sport, date, and confidence level.

Games Endpoint

GET /games - Get game information including teams, odds, and status. Use /games/{id} for specific games.

Odds Endpoint

GET /odds - Real-time odds across sportsbooks. Filter by game, sport, or bet type.

Historical Data

GET /history - Access historical predictions and results. Useful for backtesting and model evaluation.

Example Request

// Example: Fetch today's NBA predictions
const response = await fetch(
  'https://api.sportcheck.ai/v1/predictions?sport=nba&date=today',
  {
    headers: {
      'Authorization': 'Bearer sk_live_xxxx',
      'Content-Type': 'application/json'
    }
  }
);

const predictions = await response.json();
console.log(predictions);
Rate Limits

Default Limits

Free tier: 100 requests/day, Pro tier: 10,000 requests/day, Premium tier: 100,000 requests/day. Rate limits reset at midnight UTC.

Rate Limit Headers

Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers to track your usage.

Handling Limits

When rate limited, you'll receive a 429 status code. Implement exponential backoff and respect the Retry-After header.

Burst Limits

In addition to daily limits, there's a burst limit of 10 requests/second to prevent abuse. Space out rapid requests.

Increasing Limits

Need higher limits? Contact us for enterprise plans with custom rate limits and dedicated infrastructure.

Example Response
{
  "predictions": [
    {
      "game_id": "nba_20241204_lal_gsw",
      "home_team": "Los Angeles Lakers",
      "away_team": "Golden State Warriors",
      "predicted_winner": "home",
      "win_probability": 0.62,
      "confidence": 78,
      "spread_prediction": -3.5,
      "total_prediction": 228.5,
      "value_rating": 4,
      "timestamp": "2024-12-04T15:30:00Z"
    }
  ],
  "meta": {
    "total": 12,
    "page": 1,
    "per_page": 10
  }
}