Discover/calottery API
live

calottery APIcalottery.com

Retrieve California Lottery draw results for Powerball, Mega Millions, SuperLotto Plus, Fantasy 5, Daily 3, Daily 4, and Daily Derby via a simple 2-endpoint API.

Endpoint health
verified 4d ago
get_draw_game_past_results
get_all_draw_games_list
2/2 passing latest checkself-healing
Endpoints
2
Updated
26d ago

What is the calottery API?

The California Lottery API provides draw results across 7 supported games through 2 endpoints. Use get_all_draw_games_list to retrieve numeric game IDs, then pass any ID to get_draw_game_past_results to get the most recent draw, upcoming jackpot info, and a paginated history of past draws — each with full winning numbers and prize breakdowns.

Try it

No input parameters required.

api.parse.bot/scraper/c59a13d8-9bcd-46f1-ac0d-b46305ac45f2/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
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'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace calottery-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""California Lottery draw results — list games, fetch results, inspect draws."""
from parse_apis.california_lottery_api import CaliforniaLottery, GameId, GameNotFound

client = CaliforniaLottery()

# List all available draw games
for game in client.games.list(limit=7):
    print(game.name, game.game_id)

# Construct a game by enum ID and fetch its past results
powerball = client.game(game_id=GameId.POWERBALL)
results = powerball.past_results(page=1, page_size=3)
print(results.name, results.total_previous_draws, results.has_jackpot)

# Inspect the most recent draw's winning numbers and prizes
if results.most_recent_draw:
    draw = results.most_recent_draw
    print(draw.draw_number, draw.draw_date)
    for pos, ball in draw.winning_numbers.items():
        print(pos, ball.number, ball.is_special)
    for tier, prize in draw.prizes.items():
        print(tier, prize.prize_type_description, prize.amount, prize.count)

# Typed error handling
try:
    mega = client.game(game_id=GameId.MEGA_MILLIONS)
    mega.past_results()
except GameNotFound as exc:
    print(f"Game not found: {exc}")

print("exercised: games.list / game().past_results / Draw.winning_numbers / Draw.prizes")
All endpoints · 2 totalmissing one? ·

Returns all available California Lottery draw games with their numeric IDs. These IDs are required input for get_draw_game_past_results. The list is static and covers Powerball, Mega Millions, SuperLotto Plus, Fantasy 5, Daily 3, Daily 4, and Daily Derby.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "games": "array of game 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 API

Endpoints Overview

The API exposes two endpoints. get_all_draw_games_list takes no inputs and returns an array of game objects, each with a name (string) and game_id (integer). These IDs are stable references used as the required game_id parameter in the second endpoint. Supported games include Powerball (12), Mega Millions (15), SuperLotto Plus (8), Fantasy 5, Daily 3, Daily 4, and Daily Derby.

Draw Results and Pagination

get_draw_game_past_results accepts a required game_id integer and optional page and page_size parameters (maximum 50 results per page). The response includes a MostRecentDraw object with DrawNumber, DrawDate, WinningNumbers, and Prizes. It also returns a NextDraw object covering the upcoming draw's DrawNumber, DrawDate, JackpotAmount, and EstimatedCashValue. TotalPreviousDraws tells you the full count of historical records available for pagination.

Response Shape Details

Each entry in the PreviousDraws array mirrors the MostRecentDraw structure: DrawNumber, DrawDate, WinningNumbers, and Prizes. The top-level HasJackpot boolean indicates whether the selected game carries a progressive jackpot, which is useful for filtering display logic when building interfaces that handle both jackpot and non-jackpot games. DrawGameId echoes back the integer ID you supplied, confirming which game the results belong to.

Reliability & maintenanceVerified

The calottery API is a managed, monitored endpoint for calottery.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when calottery.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official calottery.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Display the latest Powerball or Mega Millions winning numbers on a news or results aggregator site.
  • Build a historical lottery number frequency analyzer using paginated PreviousDraws data.
  • Send push notifications when a new MostRecentDraw is available for a user-selected game.
  • Populate a jackpot tracker showing NextDraw JackpotAmount and EstimatedCashValue for multiple games.
  • Archive draw history by paginating through TotalPreviousDraws across all game IDs.
  • Build a prize breakdown display using the Prizes array from MostRecentDraw for any supported game.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does the California Lottery have an official developer API?+
The California Lottery does not publish a documented public developer API. The calottery.com website (https://www.calottery.com) is the authoritative source for draw results, but no official API credentials or documentation are available to third-party developers.
What does get_draw_game_past_results return beyond the latest draw?+
It returns three distinct sections: MostRecentDraw (the last completed draw with winning numbers and prize tiers), NextDraw (upcoming draw date, jackpot amount, and estimated cash value), and a paginated PreviousDraws array. Use page and page_size (up to 50) to page through historical results. TotalPreviousDraws tells you how many records exist in total.
Does the API cover scratch-off tickets or second-chance promotions?+
No. The API covers draw game results only — Powerball, Mega Millions, SuperLotto Plus, Fantasy 5, Daily 3, Daily 4, and Daily Derby. Scratch-off ticket data and second-chance promotions are not included. You can fork this API on Parse and revise it to add an endpoint targeting those sections of the site.
How far back does the historical draw data go?+
The TotalPreviousDraws field in each response tells you exactly how many historical records are available for that game. The depth varies by game — longer-running games like SuperLotto Plus have more history than newer multi-state games. Paginate using page and page_size to retrieve the full set.
Can I look up results for a specific draw date rather than paginating through all results?+
Not currently. The API returns results in reverse-chronological order and requires pagination via page and page_size to locate a specific historical draw. There is no date-range filter or draw-number lookup parameter. You can fork this API on Parse and revise it to add date-filtered or draw-number-specific endpoints.
Page content last updated . Spec covers 2 endpoints from calottery.com.
Related APIs in Government PublicSee all →
powerball.com API
Check the latest Powerball drawing results, historical winning numbers, current jackpot amounts, and prize information all in one place. Browse past draws by date, view odds and prize breakdowns, and explore stories from winners to stay informed about your favorite lottery game.
megamillions.com API
Check the latest Mega Millions winning numbers and jackpot amounts, browse historical drawings, and discover the top jackpots across participating lottery states. Stay updated on lottery results and track winning combinations whenever you need them.
lotterypost.com API
Check daily lottery results and jackpot amounts across 20+ US states and multi-state games, plus browse historical drawing data to track past winners and prize trends. Quickly compare results from multiple states or look up specific games all in one place.
lotteryusa.com API
Check the latest winning numbers and jackpot amounts across all US lotteries, and view detailed prize breakdowns by state and game. Stay updated on lottery results instantly without visiting multiple lottery websites.
usamega.com API
Check the latest Mega Millions and Powerball results, jackpot amounts, and winning odds all in one place. Analyze drawing details and tax implications to make smarter lottery decisions.
nylottery.ny.gov API
Access New York Lottery draw results, historical winning numbers, and scratch-off game information. Retrieve number frequency statistics, search for nearby retailers, and browse recent winners across all available games.
sportstoto.com.my API
Access Sports Toto Malaysia lottery jackpots, draw results, and past results calendars. Retrieve winning numbers, prize amounts, and comprehensive 4D frequency statistics for historical analysis.
bet.hkjc.com API
Check the latest Hong Kong Jockey Club Mark Six lottery results with prize breakdowns and view historical frequency statistics for all 49 numbers to analyze winning patterns. Find out when the next draw is scheduled and see detailed information about completed draws.