Free, read-only lottery data API. No authentication required.
https://www.drawanalytics.com/api/v1
RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset)
are included in every response.
All endpoints return a consistent JSON wrapper:
{
"success": true,
"data": [ ... ],
"meta": {
"timestamp": "2026-04-12T12:00:00.000Z",
"api_version": "1.0",
"count": 45
}
}
Error responses use the same shape:
{
"success": false,
"error": "State not found"
}
List all supported states with their available games and timezone.
// Response data item
{
"id": "california",
"name": "California",
"abbreviation": "CA",
"slug": "california",
"games": ["daily3", "daily4", "fantasy5", "powerball", "mega_millions", "superlotto_plus"],
"timezone": "America/Los_Angeles"
}
List games for a specific state with configuration details.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug, ID, or abbreviation (e.g. california, CA) |
// Response data item
{
"id": "powerball",
"name": "Powerball",
"type": "pick5plus1",
"mainBalls": 5,
"mainRange": [1, 69],
"bonusBalls": 1,
"bonusRange": [1, 26],
"bonusName": "Powerball",
"drawDays": [1, 3, 6],
"drawTimes": null
}
Get the most recent draw result for a game.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug or abbreviation |
| :game | path | Game ID (e.g. powerball, daily3) |
// Lotto-style response
{
"draw_date": "2026-04-11",
"draw_number": 1234,
"numbers": [5, 12, 28, 43, 61],
"bonus_ball": 17,
"jackpot": 250000000,
"multiplier": 3,
"sum": 149
}
// Digit-game response
{
"draw_date": "2026-04-11",
"draw_time": "evening",
"draw_number": 5678,
"numbers": [3, 7, 1],
"combo": "137",
"sum": 11
}
Get historical draw results with date range filtering and pagination.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug or abbreviation |
| :game | path | Game ID |
| start_date | query | Start date, YYYY-MM-DD (default: 30 days ago) |
| end_date | query | End date, YYYY-MM-DD (default: today) |
| limit | query | Results per page, 1-100 (default: 50) |
| offset | query | Pagination offset (default: 0) |
Meta includes total, limit, and offset for pagination.
Number frequency counts over a configurable time window.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug or abbreviation |
| :game | path | Game ID |
| days | query | Lookback window in days, 1-365 (default: 30) |
// Lotto-style: sorted by count descending
[{ "ball": 7, "count": 12, "pct": 40.0 }, ...]
// Digit-game: one entry per digit 0-9
[{ "digit": 0, "count": 45, "pct": 15.0 }, ...]
Top hot and cold numbers based on frequency over a time window.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug or abbreviation |
| :game | path | Game ID |
| days | query | Lookback window in days, 1-365 (default: 30) |
| count | query | Number of hot/cold entries, 1-20 (default: 5) |
{
"hot": [{ "number": 7, "count": 12 }, ...],
"cold": [{ "number": 42, "count": 1 }, ...]
}
Current gap (draws since last appearance) for each number. Higher gap = more overdue.
| Param | Type | Description |
|---|---|---|
| :state | path | State slug or abbreviation |
| :game | path | Game ID |
// Sorted by gap descending (most overdue first, lotto-style)
[{ "number": 55, "gap": 42 }, { "number": 12, "gap": 38 }, ...]
# List all states curl https://www.drawanalytics.com/api/v1/states # Get California Powerball latest draw curl https://www.drawanalytics.com/api/v1/california/powerball/latest # Get last 30 days of results with pagination curl "https://www.drawanalytics.com/api/v1/california/powerball/results?limit=20&offset=0" # Frequency analysis (last 60 days) curl "https://www.drawanalytics.com/api/v1/california/powerball/frequency?days=60" # Hot and cold numbers curl "https://www.drawanalytics.com/api/v1/california/powerball/hot-cold?days=30&count=5" # Check rate limit headers curl -I https://www.drawanalytics.com/api/v1/states
const BASE = 'https://www.drawanalytics.com/api/v1';
// Fetch latest Powerball draw
const res = await fetch(`${BASE}/california/powerball/latest`);
const { success, data, meta } = await res.json();
if (success) {
console.log('Draw date:', data.draw_date);
console.log('Numbers:', data.numbers.join(', '));
console.log('Bonus:', data.bonus_ball);
}
// Paginate through results
async function getAllResults(state, game, startDate) {
let offset = 0;
const all = [];
while (true) {
const url = `${BASE}/${state}/${game}/results?start_date=${startDate}&limit=100&offset=${offset}`;
const r = await fetch(url);
const json = await r.json();
all.push(...json.data);
if (all.length >= json.meta.total) break;
offset += 100;
}
return all;
}
import requests
BASE = "https://www.drawanalytics.com/api/v1"
# Fetch latest Powerball draw
r = requests.get(f"{BASE}/california/powerball/latest")
data = r.json()
if data["success"]:
draw = data["data"]
print(f"Draw: {draw['draw_date']}")
print(f"Numbers: {draw['numbers']}")
print(f"Bonus: {draw['bonus_ball']}")
# Get hot/cold numbers for last 60 days
r = requests.get(f"{BASE}/california/powerball/hot-cold", params={"days": 60, "count": 10})
hc = r.json()["data"]
print("Hot:", [n["number"] for n in hc["hot"]])
print("Cold:", [n["number"] for n in hc["cold"]])
california), ID, or abbreviation (CA).powerball, mega_millions, daily3). Use the /states or /:state/games endpoint to discover valid IDs.Access-Control-Allow-Origin: *).frequency endpoint returns percentage relative to total draws (lotto) or total digit slots (digit games).gaps endpoint scans the most recent 200 draws.