GET/api/v1/lotteries/analytics

Lottery Analytics & Statistics API Endpoint

Retrieve 30-day frequency analytics, Hot & Cold numbers, sum range distributions, top ball pair combinations, skip counts, and Chi-Square randomness test metrics for any US lottery game.

Query Parameters

ParameterTypeRequiredDefaultDescription
gamestringOptionalpowerballGame slug or all for multi-game summary. (e.g. powerball, megamillions, cash4life, ny-take5).
daysnumberOptional30Time window in days for statistical analysis (e.g., 30 for last 30 days). Min: 7, Max: 365.

Request Code Examples

Request Examples
curl -X GET "https://uslotteryapi.com/api/v1/lotteries/analytics?game=powerball&days=30" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response Field Definitions

hotMain & coldMain

Top 5 most frequent (Hot) and least drawn (Cold) ball numbers within the 30-day window, including total hit counts, percentage occurrence rate, and average draw gap (avgGap).

sumStats

Contains minimum sum (minSum), maximum sum (maxSum), mean average (meanSum), median (medianSum), and grouped sum range bins (sumBins).

patternStats & topPairs

Odd/Even ratio counts (3O-2E), High/Low ratio counts (3H-2L), and top 10 most frequent 2-ball combinations drawn together (topPairs).

randomnessStats & gapStats

Current skip count per ball number (currentSkip), consecutive draw repeat counts (repeatStats), Chi-Square statistic (chiSquare), and uniform randomness verdict (isRandom).

Example JSON Response

{
  "success": true,
  "data": {
    "lotteryType": "powerball",
    "gameName": "Powerball",
    "daysPeriod": 30,
    "totalDraws": 13,
    "dateRange": {
      "earliest": "2026-07-04",
      "latest": "2026-08-01"
    },
    "oddRatio": 51,
    "evenRatio": 49,
    "hotMain": [
      { "number": 36, "count": 4, "lastDrawn": "2026-07-29", "percentage": 30.8 },
      { "number": 50, "count": 3, "lastDrawn": "2026-08-01", "percentage": 23.1 }
    ],
    "coldMain": [
      { "number": 65, "count": 0, "lastDrawn": "", "percentage": 0 }
    ],
    "specialBallName": "powerball",
    "hotSpecial": [
      { "number": 5, "count": 2, "lastDrawn": "2026-08-01", "percentage": 15.4 }
    ],
    "sumStats": {
      "sums": [140, 155, 171, 188, 205],
      "minSum": 140,
      "maxSum": 205,
      "meanSum": 171.8,
      "medianSum": 171,
      "sumBins": {
        "120–149": 3,
        "150–179": 7,
        "180–209": 3
      }
    },
    "patternStats": {
      "oddEven": { "3O-2E": 6, "2O-3E": 5, "4O-1E": 2 },
      "highLow": { "3H-2L": 7, "2H-3L": 4, "4H-1L": 2 },
      "topPairs": [
        { "pair": "06 + 50", "ball1": 6, "ball2": 50, "count": 2 }
      ]
    },
    "gapStats": {
      "currentSkip": { "1": 5, "2": 12 },
      "topOverdue": [
        { "number": 65, "skipCount": 13, "lastDrawn": "30+ days ago" }
      ]
    },
    "randomnessStats": {
      "repeatStats": { "0": 9, "1": 3, "2": 1, "3": 0, "4+": 0 },
      "chiSquare": 14.82,
      "dof": 68,
      "chiCritical": 90.72,
      "isRandom": true
    }
  }
}