calottery.com APIcalottery.com ↗
Access California Lottery draw results via API. Retrieve all draw game IDs, winning numbers, prize breakdowns, and historical draws for Powerball, Mega Millions, and more.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/c59a13d8-9bcd-46f1-ac0d-b46305ac45f2/get_all_draw_games_list' \ -H 'X-API-Key: $PARSE_API_KEY'
Returns a list of all available draw games with their IDs. These IDs can be used with the get_draw_game_past_results endpoint.
No input parameters required.
{
"type": "object",
"fields": {
"games": "array of objects each containing name (string) and game_id (integer)"
},
"sample": {
"data": {
"games": [
{
"name": "Powerball",
"game_id": 12
},
{
"name": "Mega Millions",
"game_id": 15
},
{
"name": "Superlotto Plus",
"game_id": 8
},
{
"name": "Fantasy 5",
"game_id": 10
},
{
"name": "Daily 3",
"game_id": 9
},
{
"name": "Daily 4",
"game_id": 14
},
{
"name": "Daily Derby",
"game_id": 11
}
]
},
"status": "success"
}
}About the calottery.com API
The California Lottery API provides 2 endpoints to retrieve draw game listings and historical draw results from calottery.com. Use get_all_draw_games_list to enumerate every supported game and its numeric ID, then pass that ID to get_draw_game_past_results to retrieve winning numbers, prize data, and up to 50 draws per page across the full historical record — including games like Powerball, Mega Millions, and SuperLotto Plus.
Game Discovery
get_all_draw_games_list takes no parameters and returns an array of game objects, each containing a name string and a game_id integer. This list covers all California Lottery draw games currently available, and the IDs it returns are the canonical inputs for the second endpoint. Known examples include game ID 12 for Powerball, 15 for Mega Millions, and 8 for SuperLotto Plus.
Draw Results and Pagination
get_draw_game_past_results accepts a required game_id integer, an optional page integer, and an optional page_size integer (maximum 50 per page). The response includes MostRecentDraw — an object with WinningNumbers and Prizes for the latest completed draw — alongside NextDraw with upcoming draw details, and a PreviousDraws array for older results. The TotalPreviousDraws integer tells you how many historical draws exist for that game, which you can use to plan pagination across the full archive.
Response Shape Details
Every response from get_draw_game_past_results also carries Name (the game name as a string) and DrawGameId (the same integer you passed in), which is useful for bookkeeping when making parallel requests across multiple games. The PreviousDraws array follows the same structure as MostRecentDraw, so parsing is consistent across the full history of any game.
- Check the latest Powerball or Mega Millions winning numbers programmatically using
MostRecentDraw - Build a historical archive of SuperLotto Plus results by paginating through
PreviousDraws - Display upcoming draw dates and information by reading the
NextDrawobject for any game - Enumerate all active California Lottery draw games to keep a game catalog in sync with
get_all_draw_games_list - Analyze prize tier frequency over time by aggregating the
Prizesfield across paginated draw history - Notify users of new results by comparing the latest
DrawGameIdand winning numbers against a stored snapshot
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the California Lottery have an official developer API?+
What does MostRecentDraw contain, and how is it different from PreviousDraws?+
MostRecentDraw is a single object representing the latest completed draw, including WinningNumbers and Prizes. PreviousDraws is an array of older draw objects with the same structure. Both are returned in a single call to get_draw_game_past_results, so you get the current result and historical context together.How much draw history is available for each game?+
TotalPreviousDraws integer in each response tells you the full count of available historical draws for that game. You can page through them using the page and page_size parameters, with a maximum of 50 draws per page. Depth varies by game.Does the API cover scratch-off (instant) games or only draw games?+
get_all_draw_games_list with their associated result history. Scratch-off game data is not included. You can fork this API on Parse and revise it to add an endpoint covering instant game data.Can I filter draw results by date range?+
get_draw_game_past_results accepts game_id, page, and page_size for pagination, but not a start or end date. To find results within a specific date range, retrieve pages sequentially and filter by the date fields in the PreviousDraws objects client-side. You can fork this API on Parse and revise it to add server-side date filtering as a parameter.