Lottery API
The Lottery API provides winning numbers, jackpots and draw history for Powerball, Mega Millions and the draw games of every US state lottery, plus Puerto Rico and the US Virgin Islands: over 230 games, including keno-style games that draw every few minutes. Every result is validated against the game's rules and cross-checked against independent sources.
The free plan shows each result about 60 minutes after the draw. Paid plans get results within minutes, plus jackpot estimates, date lookups, deeper history and the ticket checker.
Available endpoints:
- /v1/lottery - Latest or dated draw for a game, state or country
- /v1/lotteryhistorical - Past draws
- /v1/lotterygames - Game rules, schedules and odds
- /v1/lotterycheck - Check a ticket
- /v1/lotteryjackpots - Upcoming jackpots
Game guides: Powerball API and Mega Millions API.
Covered games
| Region | Games | Game values |
|---|---|---|
| US multi-state | 2by2, Lotto America, Mega Millions, Millionaire for Life, Powerball, Powerball Xs & Os | 2by2lottoamericamegamillionsmillionaireforlifepowerballpowerballxsandos |
| US multi-state (archive) | Cash4Life, retired | cash4life |
| Tri-State (Maine, New Hampshire, Vermont) | Gimme 5, Megabucks, Pick 3, Pick 4 | us-tristate-gimme5us-tristate-megabucksus-tristate-pick3us-tristate-pick4 |
| Arizona | 5/10/45 (hourly), 5 In A Line (hourly), Fantasy 5, Hi-Lo (hourly), Lucky Links (hourly), Money Roll (hourly), One To Win (hourly), Pick 3, Pick 4, Pick Your Bet (hourly), The Pick, Triple Twist, Two To Win (hourly) | us-az-51045us-az-5inalineus-az-fantasy5us-az-hilous-az-luckylinksus-az-moneyrollus-az-onetowinus-az-pick3us-az-pick4us-az-pickyourbetus-az-thepickus-az-tripletwistus-az-twotowin |
| Arkansas | Cash 3, Cash 4, LOTTO, Natural State Jackpot | us-ar-cash3us-ar-cash4us-ar-lottous-ar-naturalstatejackpot |
| California | Daily 3, Daily 4, Daily Derby, Fantasy 5, Hot Spot (every few minutes), SuperLotto Plus | us-ca-daily3us-ca-daily4us-ca-dailyderbyus-ca-fantasy5us-ca-hotspotus-ca-superlottoplus |
| Colorado | Cash 5, Colorado Lotto+, Pick 3 | us-co-cash5us-co-lottoplusus-co-pick3 |
| Connecticut | Cash5, Keno (every few minutes), Lotto!, Play3, Play4 | us-ct-cash5us-ct-kenous-ct-lottous-ct-play3us-ct-play4 |
| Delaware | Keno (every few minutes), Multi-Win Lotto, Play 3, Play 4, Play 5 | us-de-kenous-de-multiwinlottous-de-play3us-de-play4us-de-play5 |
| District of Columbia | DC-3, DC-4, DC-5, DC Keno (every few minutes), Race2Riches (every few minutes) | us-dc-dc3us-dc-dc4us-dc-dc5us-dc-kenous-dc-race2riches |
| Florida | Cash Pop, Fantasy 5, Jackpot Triple Play, Florida Lotto, Pick 2, Pick 3, Pick 4, Pick 5 | us-fl-cashpopus-fl-fantasy5us-fl-jackpottripleplayus-fl-lottous-fl-pick2us-fl-pick3us-fl-pick4us-fl-pick5 |
| Georgia | Cash 3, Cash 4, Cash Pop, Fantasy 5, Georgia FIVE, KENO! (every few minutes) | us-ga-cash3us-ga-cash4us-ga-cashpopus-ga-fantasy5us-ga-georgiafiveus-ga-keno |
| Idaho | Idaho Cash, Pick 3, Pick 4 | us-id-idahocashus-id-pick3us-id-pick4 |
| Illinois | Lotto, Lucky Day Lotto, Pick 3, Pick 4 | us-il-lottous-il-luckydaylottous-il-pick3us-il-pick4 |
| Indiana | Cash 5, Cash Pop, Daily 3, Daily 4, Hoosier Lotto, Quick Draw | us-in-cash5us-in-cashpopus-in-daily3us-in-daily4us-in-hoosierlottous-in-quickdraw |
| Iowa | Pick 3, Pick 4 | us-ia-pick3us-ia-pick4 |
| Kansas | Keno (every few minutes), Pick 3, Racetrax (every few minutes), Super Kansas Cash | us-ks-kenous-ks-pick3us-ks-racetraxus-ks-superkansascash |
| Kentucky | Cash Ball 225, Cash Pop (every few minutes), Keno (every few minutes), Pick 3, Pick 4 | us-ky-cashball225us-ky-cashpopus-ky-kenous-ky-pick3us-ky-pick4 |
| Louisiana | Easy 5, Lotto, Pick 3, Pick 4, Pick 5 | us-la-easy5us-la-lottous-la-pick3us-la-pick4us-la-pick5 |
| Maine | Cash POP | us-me-cashpop |
| Maryland | Bonus Match 5, Cash Pop, Keno (every few minutes), Multi-Match, Pick 3, Pick 4, Pick 5, Racetrax (every few minutes) | us-md-bonusmatch5us-md-cashpopus-md-kenous-md-multimatchus-md-pick3us-md-pick4us-md-pick5us-md-racetrax |
| Massachusetts | Keno (every few minutes), Mass 3, Mass 4, Mass Cash, Megabucks, The Numbers Game, The Wheel of Luck (every few minutes) | us-ma-kenous-ma-mass3us-ma-mass4us-ma-masscashus-ma-megabucksus-ma-numbersus-ma-wheelofluck |
| Michigan | Club Keno (every few minutes), Daily 3, Daily 4, Daily 5, Fantasy 5, Keno!, Lotto 47, Poker Lotto | us-mi-clubkenous-mi-daily3us-mi-daily4us-mi-daily5us-mi-fantasy5us-mi-kenous-mi-lotto47us-mi-pokerlotto |
| Minnesota | Gopher 5, North 5, Pick 3 | us-mn-gopher5us-mn-north5us-mn-pick3 |
| Mississippi | Cash 3, Cash 4, Cash Pop, Mississippi Match 5 | us-ms-cash3us-ms-cash4us-ms-cashpopus-ms-match5 |
| Missouri | Cash Pop, Club Keno (every few minutes), MO Millions, Pick 3, Pick 4, Show Me Cash | us-mo-cashpopus-mo-clubkenous-mo-momillionsus-mo-pick3us-mo-pick4us-mo-showmecash |
| Montana | Big Sky Bonus, Montana Cash | us-mt-bigskybonusus-mt-montanacash |
| Nebraska | MyDaY, Pick 3, Pick 4, Pick 5 | us-ne-mydayus-ne-pick3us-ne-pick4us-ne-pick5 |
| New Hampshire | KENO 603 (every few minutes) | us-nh-keno603 |
| New Jersey | Jersey Cash 5, Cash Pop (every few minutes), Pick-3, Pick-4, Pick-6, Quick Draw (every few minutes) | us-nj-cash5us-nj-cashpopus-nj-pick3us-nj-pick4us-nj-pick6us-nj-quickdraw |
| New Mexico | Pick 3 Plus, Pick 4 Plus, Roadrunner Cash | us-nm-pick3plusus-nm-pick4plusus-nm-roadrunnercash |
| New York | NY Lotto, Numbers, Pick 10, Quick Draw (every few minutes), Take 5, Win 4 | us-ny-lottous-ny-numbersus-ny-pick10us-ny-quickdrawus-ny-take5us-ny-win4 |
| North Carolina | Cash 5, Cash Pop, Keno (every few minutes), Pick 3, Pick 4 | us-nc-cash5us-nc-cashpopus-nc-kenous-nc-pick3us-nc-pick4 |
| Ohio | Classic Lotto, Pick 3, Pick 4, Pick 5, Rolling Cash 5 | us-oh-classiclottous-oh-pick3us-oh-pick4us-oh-pick5us-oh-rollingcash5 |
| Oklahoma | Cash 5, Pick 3 | us-ok-cash5us-ok-pick3 |
| Oregon | Cash Pop (hourly), Keno (every few minutes), Megabucks, Pick 4, Win for Life | us-or-cashpopus-or-kenous-or-megabucksus-or-pick4us-or-winforlife |
| Pennsylvania | Cash 5, Cash Pop, Derby Cash (every few minutes), Keno (every few minutes), Match 6, Pick 2, Pick 3, Pick 4, Pick 5, Treasure Hunt | us-pa-cash5us-pa-cashpopus-pa-derbycashus-pa-kenous-pa-match6us-pa-pick2us-pa-pick3us-pa-pick4us-pa-pick5us-pa-treasurehunt |
| Puerto Rico | Kino (every few minutes), Lotería Tradicional, Loto Cash, Pega 2, Pega 3, Pega 4 | us-pr-kinous-pr-loteriatradicionalus-pr-lotocashus-pr-pega2us-pr-pega3us-pr-pega4 |
| Rhode Island | Bingo (every few minutes), Keno (every few minutes), The Numbers, Wild Money | us-ri-bingous-ri-kenous-ri-numbersus-ri-wildmoney |
| South Carolina | Cash Pop, Palmetto Cash 5, Pick 3, Pick 4 | us-sc-cashpopus-sc-palmettocash5us-sc-pick3us-sc-pick4 |
| South Dakota | Dakota Cash | us-sd-dakotacash |
| Tennessee | Cash 3, Cash 4, Daily Tennessee Jackpot, Tennessee Cash | us-tn-cash3us-tn-cash4us-tn-dailytennesseejackpotus-tn-tennesseecash |
| Texas | All or Nothing, Cash Five, Daily 4, Lotto Texas, Pick 3, Texas Two Step | us-tx-allornothingus-tx-cashfiveus-tx-daily4us-tx-lottotexasus-tx-pick3us-tx-texastwostep |
| US Virgin Islands | Caribbean Numbers!, Lucky Pick, Pick 3, Pick 4, Super Lotto | us-vi-caribbeannumbersus-vi-luckypickus-vi-pick3us-vi-pick4us-vi-superlotto |
| Virginia | Bank a Million, Cash 5, Cash Pop, Keno (every few minutes), Pick 3, Pick 4, Pick 5 | us-va-bankamillionus-va-cash5us-va-cashpopus-va-kenous-va-pick3us-va-pick4us-va-pick5 |
| Washington | Cash Pop, Daily Keno, Hit 5, Lotto, Match 4, Pick 3 | us-wa-cashpopus-wa-dailykenous-wa-hit5us-wa-lottous-wa-match4us-wa-pick3 |
| West Virginia | Cash 25, Ca$h Pop (every few minutes), Daily 3, Daily 4, Keno (every few minutes) | us-wv-cash25us-wv-cashpopus-wv-daily3us-wv-daily4us-wv-keno |
| Wisconsin | All or Nothing, Badger 5, Megabucks, Pick 3, Pick 4, SuperCash! | us-wi-allornothingus-wi-badger5us-wi-megabucksus-wi-pick3us-wi-pick4us-wi-supercash |
| Wyoming | Cowboy Draw, KENO (every few minutes) | us-wy-cowboydrawus-wy-keno |
https://api.api-ninjas.com/v1/lottery
Returns the latest draw for a game, the draw on a given date, or the latest draw of every game in a US state or a country. On paid plans results usually appear within minutes of the official publication; on the free plan they appear about 60 minutes later.
Parameters
Provide game, state or country.
gameoptionalGame slug, e.g.
powerball,megamillions,us-ny-take5. Common spellings such asmega-millionsalso work. See /v1/lotterygames for every game.stateoptional Business tier and above, or any annual planUS state or territory code (e.g.
IL,TX,PR). Returns the latest draw of every covered game in that state, including the national games it sells, in one call.countryoptional Business tier and above, or any annual planISO 3166-1 alpha-2 code (e.g.
US). Returns the latest draw of every covered game in that country, in one call.dateoptional Premium onlyDraw date (YYYY-MM-DD). Developer plans: the last two years. Business tier and above: any date in the archive.
sessionoptionalFor games with several draws a day (e.g.
midday,evening). Defaults to the latest draw that day.draw_numberoptional Premium onlyFor games that draw every few minutes (keno and similar): return this draw. Searched within
dateif given, otherwise the last 3 days.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/lottery endpoint returns a JSON object with the following fields (a JSON array of them when state or country is used), or an error if the request is unsuccessful.
gameGame slug, e.g.
powerball.game_nameDisplay name of the game.
countryISO 3166-1 alpha-2 country code.
draw_dateDraw date in the operator's local time zone (YYYY-MM-DD).
sessionOnly for games with several named draws a day: e.g.
middayorevening.draw_numberThe operator's draw number. Games that draw every few minutes (keno and similar) are identified by it.
draw_timeScheduled draw time in ISO 8601 with the operator's UTC offset.
main_numbersWinning numbers as integers. Digit games (Pick 3, Cash 4, Numbers...) keep draw order and racing games list the runners in finishing order; other games use the order the operator publishes.
bonus_numbersSeparately drawn bonus ball(s), e.g. the Powerball, Mega Ball or a Pick game's Fireball or Wild Ball;
[]for games without one.bonus_nameName of the bonus ball, when the game has one.
multiplierDrawn multiplier (e.g. Power Play), when the game draws one.
multiplier_nameName of the multiplier.
secondary_drawsExtra draws on the same ticket, e.g. Powerball
Double Playor Illinois Lotto'sLotto Million 1andLotto Million 2.extrasGame-specific details, e.g. a keno Bulls-Eye or a race time. Each key is described in the game's
extrasin /v1/lotterygames.jackpotJackpot for this draw:
currency,amount(advertised),cash_value,estimatedandwon.jackpot.cash_valuePremium onlyCash value of this draw's jackpot. On the free plan it reads
This field is for premium subscribers only.next_drawDate and time of the next draw, and its estimated
jackpot.next_draw.jackpotPremium onlyEstimated jackpot and cash value of the next draw. On the free plan it reads
This field is for premium subscribers only.rules_versionEffective date of the number format in force on this draw date. Use it to read older draws correctly when a game's format changed.
revisionStarts at 1 and increases if the operator corrects the draw.
sourceThe lottery operator that ran the draw (
name,url), when we retrieved it (retrieved_at), andcross_checked: true once a second independent source has confirmed the numbers.messageOnly on the free plan: explains the 60-minute delay and the premium fields.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/lottery?game=powerball" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/lotteryhistorical
Returns past draws for a game, newest first. The free plan gets the latest 10 draws (each visible about 60 minutes after the draw); Developer plans a rolling two years; Business tier and above the full archive.
Parameters
gamerequiredGame slug.
startoptionalEarliest draw date to include (YYYY-MM-DD).
endoptionalLatest draw date to include (YYYY-MM-DD).
sessionoptionalOnly draws from this session, for games with several draws a day.
limitoptionalNumber of draws to return (1-1000). Default
100.offsetoptionalNumber of draws to skip, for paging. Default
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/lotteryhistorical endpoint returns a JSON array of draw objects (same fields as /v1/lottery), or an error.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/lotteryhistorical?game=powerball" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/lotterygames
Lists the covered games with their number format, draw schedule, jackpot odds, prize tiers, rule-change history and archive range.
Parameters
gameoptionalReturn one game.
stateoptionalReturn the games of one US state or territory, e.g.
IL.countryoptionalReturn the games of one country.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/lotterygames endpoint returns a JSON array of game objects, or an error.
matrixCurrent number format: count and range of main and bonus numbers.
sessionsNamed draws per day, in order (e.g.
["midday", "evening"]).rapidtruefor games that draw every few minutes; their draws are identified bydraw_number.draw_scheduleDraw days, local time and IANA time zone; for rapid games, the interval in minutes and the first and last draw times.
jackpot_oddsOdds of the top prize as N in 1 in N.
prize_tiersPrize table, where the game has fixed prizes.
rules_historyEvery number-format change with its effective date.
extrasDescription of each game-specific key that draws of this game may carry in
extras.history_start, latest_draw_dateRange of the archive.
endpoints, docsWhere to query the game and its documentation page.
Live Demo
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/lotterygames?game=powerball" \
-H "X-Api-Key: YOUR_API_KEY"Premium only
https://api.api-ninjas.com/v1/lotterycheck
Scores a ticket against a draw and returns the matched prize tier and prize. Supports Powerball (with Power Play and Double Play), Mega Millions (with the ticket's built-in multiplier) and Millionaire for Life. Ticket numbers are never stored. The result is not a prize claim.
Parameters
gamerequiredpowerball,megamillionsormillionaireforlife.daterequiredDraw date (YYYY-MM-DD). Developer plans: the last two years. Business tier and above: any supported draw.
numbersrequiredMain numbers on the ticket, comma separated.
bonusrequiredBonus ball on the ticket (Powerball, Mega Ball or Millionaire Ball).
power_playoptionalPowerball only:
trueif the ticket has Power Play.double_playoptionalPowerball only:
trueto also score the Double Play draw.multiplieroptionalMega Millions only: the 2x-10x multiplier printed on the ticket (
2,3,4,5or10). Without it, the prize range is returned.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/lotterycheck endpoint returns a JSON object with the following fields, or an error.
matched_main, matched_bonusHow many main and bonus numbers matched.
tierPrize tier, e.g.
3+1.prizePrize amount,
"jackpot". Mega Millions withoutmultiplierreturnsprize_minandprize_maxinstead.double_playResult of the Double Play draw, when requested.
disclaimerReminder that only the official lottery pays prizes.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/lotterycheck?game=powerball&date=2026-10-05&numbers=16,23,32,1,2&bonus=9&power_play=true&double_play=true" \
-H "X-Api-Key: YOUR_API_KEY"Premium only
https://api.api-ninjas.com/v1/lotteryjackpots
Lists the next advertised jackpot for every active game that publishes one, largest first within each currency.
Parameters
countryoptionalISO 3166-1 alpha-2 code, e.g.
US.stateoptionalUS state or territory code, e.g.
TX.currencyoptionalISO 4217 code, e.g.
USD.minoptionalOnly jackpots of at least this amount.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/lotteryjackpots endpoint returns a JSON array of jackpot objects, or an error.
game, game_name, countryThe game.
draw_date, draw_timeWhen the jackpot will be drawn.
amount, cash_value, currencyAdvertised jackpot and its cash value, where published.
last_draw_dateDate of the draw that set this estimate.
Live Demo
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/lotteryjackpots" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Lottery API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Lottery API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Lottery API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Lottery API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.Which lotteries does the Lottery API cover?
Powerball, Mega Millions and Millionaire for Life; New York's NY Lotto, Take 5, Pick 10, Numbers and Win 4; Pennsylvania's Match 6, Cash 5, Treasure Hunt and Pick 2 to Pick 5; and the retired Cash4Life archive. Call/v1/lotterygamesfor the live list with each game's number format, draw schedule and odds. Game pages: Powerball API, Mega Millions API.How quickly are new results available?
On paid plans, results are collected every two minutes from official lottery publications, so a Powerball draw at 10:59 pm ET is typically available within about ten minutes. On the free plan, each result appears about 60 minutes after it is published. Each draw is cross-checked against a second official source;source.cross_checkedtells you whether that has happened yet.How much history can I access?
The free plan gets the latest 10 draws per game. Developer plans get a rolling two years. The Business tier and above gets the full archive: Powerball from 2010, Mega Millions from 2002, and New York's Numbers and Win 4 from 1980.Which features are premium?
Paid plans add results within minutes instead of about an hour, the jackpot cash value and next-draw jackpot estimate, the/v1/lotteryjackpotsendpoint,datelookups and the/v1/lotterycheckticket checker. Fetching every game in a country with onecountrycall is included with the Business tier and above, or any annual plan.Can I check whether a ticket won?
Yes, on paid plans./v1/lotterycheckscores a ticket against a draw and returns the matched tier and prize, including Power Play, Double Play and the Mega Millions multiplier, for Powerball, Mega Millions and Millionaire for Life. It is not a prize claim: only the official lottery pays prizes, under its own rules and deadlines.Is API Ninjas affiliated with any lottery?
No. API Ninjas is not affiliated with or endorsed by any lottery operator. Results come from official public lottery publications, but in any discrepancy the official lottery's records prevail, so always verify winning tickets with the official lottery.
Explore API integration use cases for recommended APIs and workflow examples.
API Ninjas is not affiliated with or endorsed by any lottery operator. Powerball and Mega Millions are trademarks of their respective owners. Results are compiled from publicly available lottery results; in any discrepancy the official lottery's records prevail, so always verify winning tickets with the official lottery.