nylottery.ny.gov APInylottery.ny.gov ↗
Access NY Lottery draw results, historical winning numbers, scratch-off games, retailer locations, and winner data via 7 structured endpoints.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/9211b077-5bb6-4e8f-88f3-6e88cadf6d85/get_latest_draws' \ -H 'X-API-Key: $PARSE_API_KEY'
Get latest draw results and jackpot information for all New York Lottery draw games. Returns data for cash4life, powerball, lotto, megamillions, million4life, pick10, numbers, take5, win4, quickdraw, and raffle.
No input parameters required.
{
"type": "object",
"fields": {
"data": "object containing game keys (cash4life, powerball, lotto, megamillions, etc.) each with draws array, next_draw timestamp, and last_draw timestamp"
},
"sample": {
"data": {
"data": {
"status": "SUCCESS",
"statusCode": 200,
"megamillions": {
"draws": [
{
"status": 4,
"drawTime": 1778817600000,
"gameName": "megamillions",
"drawNumber": 2505,
"estimatedJackpot": 251000000
}
],
"gameId": "12",
"last_draw": 1778637615000,
"next_draw": 1778896815000
}
}
},
"status": "success"
}
}About the nylottery.ny.gov API
This API exposes 7 endpoints covering the full breadth of New York Lottery data, from live draw results across 11 games to retailer geosearch and scratch-off prize inventories. The get_latest_draws endpoint returns current jackpot figures and the most recent winning numbers for every active draw game in a single call, while get_number_frequency delivers computed frequency statistics without any client-side aggregation.
Draw Results and Game Coverage
The get_latest_draws endpoint returns a single object whose keys map to each game — cash4life, powerball, lotto, megamillions, take5, win4, numbers, pick10, quickdraw, million4life, and raffle. Each game block contains a draws array, a next_draw timestamp, and a last_draw timestamp. For per-game detail, get_game_draws accepts a game string parameter and returns the 10 most recent draws with winning numbers, jackpot estimates, and draw metadata.
Historical Records and Frequency Analysis
get_historical_results pulls from data.ny.gov and supports start_date and end_date filters in YYYY-MM-DD format alongside limit and offset for pagination. Each record in the returned array includes draw_date, winning_numbers, and game-specific bonus fields. The get_number_frequency endpoint builds on this history: pass a game name and an optional lookback integer to receive main_numbers and bonus_numbers arrays, each sorted by frequency descending, plus a total_records_analyzed count. Games without a bonus ball return null for bonus_numbers.
Scratch-Offs, Retailers, and Winners
get_scratch_off_games lists all active instant games with ticket_price, top_prize_amount, top_prize_remaining, and overall_odds per entry. search_retailers accepts lat, lon, and miles parameters and returns paginated retailer records including field_street_address, field_city, field_state, field_zipcode, and a field_geofield coordinate object. The pager object on that response exposes total_items, total_pages, and items_per_page. get_recent_winners is also paginated (0-indexed page parameter) and returns winner name, prize, prize_type, date, location, and a body narrative field.
- Build a jackpot tracker dashboard that polls
get_latest_drawsto show current Powerball and Mega Millions estimates. - Analyze hot and cold numbers for Take 5 or Win 4 by calling
get_number_frequencywith a customlookbackwindow. - Display active scratch-off games filtered by
ticket_priceor sorted bytop_prize_remainingto surface games with prizes still available. - Integrate a retailer locator into a mobile app using
search_retailerswith user device coordinates and a configurablemilesradius. - Archive full draw history for any game by paginating
get_historical_resultswithstart_dateandend_dateover multi-year ranges. - Populate a winner stories feed using
get_recent_winnerswith thebody,location, andprizefields. - Automate alerts when the next Lotto or Cash4Life draw approaches using
next_drawtimestamps fromget_game_draws.
| 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 NY Lottery website have an official public developer API?+
get_historical_results draws from, but there is no official programmatic interface for live draws, scratch-offs, or retailer data.How does `get_historical_results` differ from `get_game_draws`?+
get_game_draws returns the 10 most recent draws with jackpot estimates and draw metadata from the NY Lottery directly. get_historical_results sources from data.ny.gov and supports arbitrary date ranges via start_date and end_date, plus limit and offset pagination, making it suitable for bulk historical retrieval. The historical records include draw_date and winning_numbers but may not include jackpot estimate fields present in get_game_draws.Does `get_number_frequency` cover all games, including Quick Draw?+
game parameter, including quickdraw. Results depend on how many historical records exist for that game in data.ny.gov. The total_records_analyzed field in the response tells you exactly how many draws the calculation covered for a given lookback value.Does the API return prize tier breakdowns for each draw — for example, how many tickets matched 4 of 5 numbers?+
Is retailer data limited to New York State?+
search_retailers returns only licensed New York Lottery retailers, so results are bounded by the NY Lottery's own retailer network. Coordinates outside New York may return zero results or retailers near the state border. The pager object confirms total results found for any given search center and radius.