Mega Millions APImegamillions.com ↗
Fetch Mega Millions winning numbers, jackpot amounts, historical drawings, top jackpots, and participating states via a structured JSON API.
What is the Mega Millions API?
The Mega Millions API exposes 4 endpoints covering current drawing results, paginated drawing history, all-time top jackpots, and participating state contact data. The get_latest_results endpoint returns the full prize matrix alongside winning numbers, Megaplier, current and next jackpot cash values, and the next scheduled drawing date — everything needed to build a live lottery tracker or results widget.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/e571c99b-6bc1-4447-b4d3-a4a8a5697105/get_latest_results' \ -H 'X-API-Key: $PARSE_API_KEY'
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 megamillions-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.
from parse_apis.mega_millions_lottery_api import MegaMillions
client = MegaMillions()
# Get the latest drawing results
latest = client.latestresults.get()
print(latest.drawing.play_date, latest.drawing.n1, latest.drawing.n2, latest.drawing.n3, latest.drawing.n4, latest.drawing.n5, latest.drawing.mega_ball)
print(latest.jackpot.current_prize_pool, latest.jackpot.next_prize_pool)
print(latest.next_drawing_date)
for tier in latest.prize_tiers:
print(tier.tier, tier.winners, tier.multiplier)
# List top jackpots
for jp in client.topjackpots.list():
print(jp.play_date, jp.jackpot, jp.winner_text)
# Browse drawing history with date filtering
for drawing in client.drawings.list(start_date="01/01/2026", end_date="06/01/2026", page_size=10):
print(drawing.play_date, drawing.n1, drawing.n2, drawing.n3, drawing.n4, drawing.n5, drawing.mega_ball, drawing.megaplier)
# List participating lottery states
for state in client.lotterystates.list():
print(state.state_short_name, state.state_display_name, state.state_lottery_url)
Get the latest Mega Millions drawing results, including winning numbers, jackpot details, prize tiers, prize matrix, and next drawing date. Returns a single composite object with Drawing, Jackpot, PrizeTiers, PrizeMatrix, MatchWinners, and NextDrawingDate fields.
No input parameters required.
{
"type": "object",
"fields": {
"Drawing": "object containing winning numbers (N1-N5, MBall), PlayDate, Megaplier, and update metadata",
"Jackpot": "object with CurrentPrizePool, NextPrizePool, CurrentCashValue, NextCashValue, Winners count",
"PrizeTiers": "array of prize tier objects with Tier level, Winners count, IsMegaplier, and Multiplier",
"PrizeMatrix": "object with game rules including WhiteBallMax, MegaBallMax, TicketPrice, and tier odds",
"MatchWinners": "object with WinnerText and match details",
"NextDrawingDate": "ISO datetime string for the next scheduled drawing"
},
"sample": {
"data": {
"Drawing": {
"N1": 9,
"N2": 30,
"N3": 36,
"N4": 38,
"N5": 40,
"MBall": 3,
"PlayDate": "2026-06-09T00:00:00",
"Megaplier": -1
},
"Jackpot": {
"Winners": 0,
"Verified": true,
"NextCashValue": 182600000,
"NextPrizePool": 413000000,
"CurrentCashValue": 173300000,
"CurrentPrizePool": 392000000
},
"PrizeTiers": [
{
"Tier": 0,
"Winners": 0,
"Multiplier": "",
"IsMegaplier": false
}
],
"PrizeMatrix": {
"MegaBallMax": 24,
"TicketPrice": 5,
"WhiteBallMax": 70
},
"MatchWinners": {
"WinnerText": "Match 5 + 0:"
},
"NextDrawingDate": "2026-06-12T23:00:00"
},
"status": "success"
}
}About the Mega Millions API
Drawing Results and Jackpot Data
The get_latest_results endpoint returns the most recent drawing as a structured Drawing object with fields N1 through N5 plus MBall and Megaplier. Alongside the numbers, the Jackpot object carries CurrentPrizePool, NextPrizePool, CurrentCashValue, and NextCashValue so you can display both annuity and lump-sum figures. The PrizeMatrix object documents game rules including WhiteBallMax, MegaBallMax, TicketPrice, and per-tier odds, while the PrizeTiers array breaks down winners at each tier with their multiplier details.
Historical Drawings
get_drawing_history supports start_date and end_date filtering in MM/DD/YYYY format, with page_number and page_size for pagination. The response includes a DrawingData array of drawing objects — each with the same N1–N5, MBall, Megaplier, and PlayDate fields — plus a TotalResults count so you can build correct pagination controls. Date ranges can be as narrow or as wide as needed, making this endpoint practical for statistical analysis of number frequency over any interval.
Top Jackpots and Participating States
get_top_jackpots returns the 10 largest jackpots in Mega Millions history, each with the Jackpot dollar amount, PlayDate, and WinnerText describing the winning ticket(s) and state(s). The WinnerState field provides a two-letter abbreviation where applicable. get_lottery_states lists every participating state with StateShortName, StateDisplayName, StateLotteryURL, and both public and media contact details, giving you a reference table for linking to state-level lottery resources.
The Mega Millions API is a managed, monitored endpoint for megamillions.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when megamillions.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 megamillions.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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display live Mega Millions winning numbers and jackpot amounts on a lottery results site
- Build a number frequency analyzer using paginated drawing history from
get_drawing_history - Send jackpot threshold alerts by polling
CurrentPrizePoolfromget_latest_results - Render a historical jackpot leaderboard using the top-10 data from
get_top_jackpots - Generate a state lottery directory with contact info and official URLs from
get_lottery_states - Calculate prize tier statistics by parsing the
PrizeTiersarray across multiple drawings - Track next drawing countdowns using the
NextDrawingDatefield fromget_latest_results
| 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 | 100 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 Mega Millions have an official developer API?+
What does `get_drawing_history` return and how do I filter by date range?+
DrawingData array of drawing objects — each with PlayDate, N1–N5, MBall, and Megaplier — plus a TotalResults count. Pass start_date and end_date as strings in MM/DD/YYYY format to limit the range. Use page_number and page_size to paginate through large result sets.Does the API return individual ticket winners or just aggregate winner counts?+
PrizeTiers array provides winner counts per tier and the MatchWinners object includes descriptive WinnerText. Individual ticket holder identities and claimant details are not included. You can fork this API on Parse and revise it to add an endpoint targeting any publicly available winner announcement data.Are second-chance or promotional drawings included?+
How far back does the drawing history go?+
get_drawing_history endpoint reflects the historical data published on megamillions.com. The full result count is available in the TotalResults field on any paginated response, so you can determine the actual coverage for your date range at query time.