# Lottery Winning Numbers and Statistics Scraper (`parselab/lottery-winning-numbers-scraper`) Actor

Get official lottery results for Powerball, Mega Millions, Cash4Life, NY Lotto, Take 5, Numbers, Win 4, Pick 10 and Quick Draw. Every draw comes with sum, odd and even count, gaps and repeats, plus number frequency, hot and cold and overdue statistics. Export to CSV or Excel.

- **URL**: https://apify.com/parselab/lottery-winning-numbers-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Games, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Lottery Winning Numbers and Statistics Scraper

This lottery scraper returns the official winning numbers for Powerball, Mega Millions, Cash4Life, New York Lotto, Take 5, Numbers, Win 4, Pick 10, Millionaire for Life and Quick Draw. Ask for draw results and get one row per draw, or ask for statistics and get one row per ball number with how often it came out, how long ago it last came out and whether it is hot or cold.

Every draw row includes more than the numbers. You get the numbers in draw order and sorted, the special ball (Powerball, Mega Ball, Cash Ball or bonus), the multiplier, the sum, the count of odd and even numbers, low and high numbers, consecutive pairs, the range, how many days passed since the previous draw and how many numbers repeated from it. Take 5, Numbers and Win 4 return the midday and the evening draw as separate rows.

Players, bloggers, newsletter writers, data students and app developers use it to build number trackers, charts and analysis tools.

### What can you do with this lottery scraper?

- Download the full history of Powerball winning numbers
- Get the latest Mega Millions numbers and the Mega Ball
- List Take 5 midday and evening draws for any month
- Find how many times each Powerball number came out in the last 500 draws
- See which numbers are overdue, meaning they have not come out for the longest time
- Compare hot and cold numbers over any date range
- Check the average sum and the odd and even split of winning combinations
- Get Numbers and Win 4 digits for every draw since 1980
- Track Quick Draw results with the money dot and the extra multiplier
- Export lottery results to CSV or Excel

### What data can you extract from the lottery?

| Mode | One row is | Highlights |
|---|---|---|
| Draw results | One draw | Game, date, day of week, time, numbers, special ball, multiplier, Double Play numbers, sum, average, odd and even count, low and high count, range, consecutive pairs, days since the previous draw, repeats from the previous draw |
| Number statistics | One ball number in one game | Times drawn, share of draws, expected times, difference from expected, last drawn date, draws since it last came out, average gap, longest gap, hot rank, hot and cold flags |

Games and history available:

| Game | Draws from |
|---|---|
| Powerball | 2010 |
| Mega Millions | 2002 |
| New York Lotto | 2001 |
| Take 5 | 1992 |
| Pick 10 | 1987 |
| Numbers and Win 4 | 1980 |
| Cash4Life (retired in 2026) | 2014 |
| Millionaire for Life | 2026 |
| Quick Draw | 2013 |

### How to scrape lottery results

1. Choose **Draw results** or **Number statistics**.
2. Select one or more games.
3. Optionally set a start date, an end date, or how many latest draws to analyze.
4. Set **Max Items** and click **Start**.
5. Export the dataset as CSV, Excel or from the Apify console.

### Input example

```json
{
  "mode": "draws",
  "games": ["powerball", "megamillions"],
  "dateFrom": "2025-01-01",
  "maxItems": 200
}
```

### Draw results output example

```json
{
  "game": "powerball",
  "gameName": "Powerball",
  "drawDate": "2026-09-19",
  "dayOfWeek": "Saturday",
  "numbers": [18, 30, 41, 45, 68],
  "powerball": 10,
  "powerPlayMultiplier": 2,
  "sum": 202,
  "average": 40.4,
  "oddCount": 2,
  "evenCount": 3,
  "range": 50,
  "consecutivePairs": 0,
  "daysSincePreviousDraw": 3,
  "repeatedFromPrevious": 0
}
```

### Number statistics output example

```json
{
  "game": "powerball",
  "ballType": "main",
  "number": 1,
  "timesDrawn": 1,
  "drawsAnalyzed": 100,
  "frequencyPct": 1,
  "expectedTimes": 7.25,
  "differenceFromExpected": -6.25,
  "lastDrawnDate": "2026-05-30",
  "drawsSinceLastDrawn": 48,
  "hotRank": 69,
  "isCold": true
}
```

### How much does it cost to scrape lottery results?

You pay per result: $16 per 1,000 rows plus a tiny start fee. The free plan returns up to 10 rows per run. The whole Powerball history is about 2,000 rows and the statistics of one game are about 100 rows.

### Tips for better results

- Statistics use a window of recent draws, 500 by default. Set your own number of draws or a start date to compare periods.
- Games change their rules from time to time, for example the number pool of Powerball and Mega Millions. Start the statistics after the last change to compare numbers fairly.
- Quick Draw has more than a million draws, so draw results default to the last two days. Set dates to get more.
- Take 5, Numbers and Win 4 have two draws a day. Each draw is its own row with the draw time.
- Powerball, Mega Millions and Cash4Life numbers are the same in every state that plays them.

### Who uses lottery data?

- **Players** keep track of results and their own number choices.
- **Bloggers and newsletter writers** publish results and trends.
- **Developers** feed apps, websites and Discord bots.
- **Students** practice probability and statistics with real draws.

### Automate and connect

Schedule the Actor after each draw night to update a sheet or a website. Send finished datasets to Google Sheets, Zapier, Make or n8n, or trigger a webhook when a run ends.

### FAQ

**Do I need an account?**
No. The Actor works without any login.

**Where does the data come from?**
It comes from the New York State open data portal, which publishes the official winning numbers of the games sold in New York.

**Can statistics predict the next draw?**
No. Lottery draws are random and every draw is independent. Hot, cold and overdue numbers describe the past and do not change the odds of the next draw.

**How fresh is the data?**
Results appear on the same day or the next day after each draw.

**Does it include prize amounts or jackpots?**
No. It returns winning numbers and number features. Quick Draw rows include the money dot prize.

### Legal note

This Actor collects information that is publicly visible on the website. Check the source site's terms and your local rules before using the data. It is not affiliated with any lottery. Play responsibly, and treat lottery statistics as entertainment, not advice.

### Support

Missing a field or found a bug? Open an issue from the Actor page.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `mode` (type: `string`):

Draws returns one row per draw, newest first, with number features. Statistics returns one row per ball number with how often it came out, how long ago, and whether it is hot or cold.

## `games` (type: `array`):

Games to collect. Powerball, Mega Millions and Cash4Life are played in many states, the results are the same everywhere.

## `dateFrom` (type: `string`):

First draw date, YYYY-MM-DD. Leave empty for the full history. For Quick Draw the default is the last two days.

## `dateTo` (type: `string`):

Last draw date, YYYY-MM-DD.

## `lastDraws` (type: `integer`):

For statistics: how many of the latest draws to analyze. The default is 500 when no start date is set. Quick Draw statistics need a start date.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "draws",
  "games": [
    "powerball",
    "megamillions"
  ]
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/lottery-winning-numbers-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/lottery-winning-numbers-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parselab/lottery-winning-numbers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/lottery-winning-numbers-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9cX4XI8UIEqabBm0x/builds/fAsCn2ayDuoU1n4ps/openapi.json
