# Powerball Winning Numbers Scraper (`automation-lab/powerball-historical-winning-numbers`) Actor

Extract official Powerball draw dates, five white balls, the Powerball, Power Play, estimated jackpot, cash value, and source metadata across requested date windows.

- **URL**: https://apify.com/automation-lab/powerball-historical-winning-numbers.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Games
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.80 / 1,000 item extracteds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Powerball Winning Numbers Scraper

Extract **Powerball winning numbers** from the official Powerball website into a clean, analysis-ready dataset. Choose a date window or supply exact draw URLs and receive draw dates, five white balls, the red Powerball, Power Play, estimated jackpot, cash value, and source metadata.

This Actor is designed for recurring result archives, lottery dashboards, data verification, spreadsheets, and historical analysis. It reads public draw information from powerball.com and does not buy tickets, predict future numbers, or determine whether a ticket is a legal winner.

### What does this Powerball scraper do?

The Actor turns official result pages into one typed record per draw.

It can:

- discover every Powerball draw in a requested date window;
- follow the official archive across multiple result pages;
- process one or more exact official draw-result URLs;
- normalize jackpot and cash values to numeric USD fields;
- preserve the source's display values for audits;
- cap output with `maxItems`, newest first;
- export results through Apify datasets, APIs, integrations, or MCP.

Unlike a bare list of number strings, each record keeps the draw identity, multiplier, monetary context, official source URL, and retrieval timestamp together.

### Who is it for?

#### Lottery publishers

Refresh result pages or internal archives after new drawings without manually copying six numbers and jackpot context.

#### Data analysts and researchers

Create a consistent historical table for frequency analysis, visualization, education, and statistical demonstrations.

#### App and dashboard teams

Feed official historical results into a database, spreadsheet, dashboard, or scheduled ETL pipeline.

#### Verification workflows

Convert a specific powerball.com result page into a machine-readable record with a traceable source link.

### What data is extracted?

| Field | Type | Meaning |
| --- | --- | --- |
| `drawDate` | string | Official draw date in `YYYY-MM-DD` format |
| `drawDay` | string | Weekday abbreviation shown by Powerball |
| `whiteBalls` | number\[] | Five official white-ball numbers |
| `powerball` | number | Red Powerball number |
| `powerPlay` | number or null | Power Play multiplier when published |
| `jackpotAmount` | number or null | Estimated jackpot normalized to USD |
| `jackpotCurrency` | string or null | `USD` when a jackpot is available |
| `jackpotDisplay` | string or null | Jackpot text as displayed by the source |
| `cashValueAmount` | number or null | Estimated cash value normalized to USD |
| `cashValueCurrency` | string or null | `USD` when cash value is available |
| `cashValueDisplay` | string or null | Cash-value text as displayed by the source |
| `sourceName` | string | `Official Powerball` |
| `sourceUrl` | string | Exact official draw-result URL |
| `retrievedAt` | string | UTC retrieval timestamp |

Nullable monetary and multiplier fields accurately represent source pages where that context is not available.

### How to get started

1. Open the Actor in Apify Console.
2. Set `fromDate` and `toDate` in `YYYY-MM-DD` format.
3. Set `maxItems` to the maximum draws you want.
4. Optionally add exact official draw URLs instead of discovering a range.
5. Click **Start**.
6. Open the **Dataset** tab to preview or export the records.

The prefilled January 2025 input returns real official records and is suitable for a first run.

### Input parameters

| Parameter | Required | Default | Description |
| --- | --- | --- | --- |
| `fromDate` | No | Recent date window in code; schema prefill is `2025-01-01` | Earliest included draw date. Cannot precede `1992-04-22`. |
| `toDate` | No | Today in code; schema prefill is `2025-01-31` | Latest included draw date. |
| `startUrls` | No | `[]` | Exact `powerball.com/draw-result` URLs. Date filters still apply. |
| `maxItems` | No | `100` | Maximum saved records, from 1 to 5,000. |

Example date-window input:

```json
{
  "fromDate": "2025-01-01",
  "toDate": "2025-01-31",
  "maxItems": 20
}
```

Example exact-result input:

```json
{
  "startUrls": [
    { "url": "https://www.powerball.com/draw-result?gc=powerball&date=2025-01-01" }
  ],
  "fromDate": "2025-01-01",
  "toDate": "2025-01-01",
  "maxItems": 1
}
```

### Output example

A real January 1, 2025 result is normalized like this:

```json
{
  "drawDate": "2025-01-01",
  "drawDay": "Wed",
  "whiteBalls": [6, 12, 28, 35, 66],
  "powerball": 26,
  "powerPlay": 3,
  "jackpotAmount": 181000000,
  "jackpotCurrency": "USD",
  "jackpotDisplay": "$181 Million",
  "cashValueAmount": 82100000,
  "cashValueCurrency": "USD",
  "cashValueDisplay": "$82.1 Million",
  "sourceName": "Official Powerball",
  "sourceUrl": "https://www.powerball.com/draw-result?gc=powerball&date=2025-01-01",
  "retrievedAt": "2025-01-15T12:00:00.000Z"
}
```

`retrievedAt` changes on every run. All output is saved to the run's default dataset.

### How date windows and exact URLs work

With no `startUrls`, the Actor searches the official previous-results archive using `fromDate` and `toDate`. It follows archive pages newest first and stops when the date range or `maxItems` is exhausted.

With `startUrls`, each URL must point to `/draw-result` on powerball.com and contain `date=YYYY-MM-DD`. The same date filters apply, so an exact URL outside the selected window is skipped. This keeps explicit and discovered inputs consistent.

Use date-window mode for archive creation. Use exact URLs for verification, enrichment, or replaying a known draw.

### How much does it cost to extract Powerball winning numbers?

The Actor uses pay-per-event pricing:

- a **$0.005** one-time start event per run;
- tiered pricing per accepted draw record;
- no item fee for invalid, duplicate, skipped, or failed records.

The measured market-target curve charges **$0.008 per draw** on the BRONZE tier. Prices shown in Apify Console are authoritative and decrease with plan level. Illustrative BRONZE totals are:

| Draws | Start | Item calculation | Approximate total |
| ---: | ---: | ---: | ---: |
| 1 | $0.005 | 1 × BRONZE item rate | $0.013 |
| 10 | $0.005 | 10 × BRONZE item rate | $0.085 |
| 100 | $0.005 | 100 × BRONZE item rate | $0.805 |

These are Actor charges, not lottery ticket prices. Check the live pricing panel before running because plan tiers determine the active item rate.

### Scheduling recurring updates

Powerball results are naturally suited to scheduled refreshes:

1. Save a Task with a recent rolling date window.
2. Add a schedule after expected drawing times.
3. Export the resulting dataset to your destination.
4. Deduplicate downstream by `drawDate` or `sourceUrl`.

The Actor does not maintain a cross-run database or send change alerts itself. Apify schedules and integrations provide the automation layer; your destination can upsert by draw date.

### Export and integration options

Every run uses the default Apify dataset, so results can be downloaded as:

- JSON;
- CSV;
- Excel;
- XML;
- RSS;
- JSONL.

Common workflows include:

- Google Sheets archive refreshes;
- database upserts keyed by `drawDate`;
- dashboard ingestion;
- historical notebooks and visualizations;
- webhook-triggered processing after a scheduled run;
- Make, Zapier, or custom ETL pipelines.

### Run through the Apify API

Replace `YOUR_TOKEN` with an Apify API token.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~powerball-historical-winning-numbers/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fromDate":"2025-01-01","toDate":"2025-01-31","maxItems":20}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/powerball-historical-winning-numbers').call({
  fromDate: '2025-01-01',
  toDate: '2025-01-31',
  maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/powerball-historical-winning-numbers').call(run_input={
    'fromDate': '2025-01-01',
    'toDate': '2025-01-31',
    'maxItems': 20,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI assistants

Add the Actor to Claude Code through Apify MCP:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/powerball-historical-winning-numbers"
```

#### Claude Desktop, Cursor, and VS Code setup

Use this same HTTP MCP configuration in Claude Desktop, Cursor, or VS Code:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/powerball-historical-winning-numbers"
    }
  }
}
```

Example prompts:

- “Get official Powerball winning numbers for January 2025.”
- “Extract the Powerball draw at this official result URL and return its jackpot.”
- “Create a CSV-ready dataset of 2024 Powerball results.”

### Reliability and failure behavior

The Actor reads server-rendered official pages without a browser, account, or paid proxy. Requests have a 25-second timeout and two bounded retries after the initial attempt. Detail requests run at conservative concurrency.

A response that lacks recognizable result markup is treated as an upstream error, not as an empty success. A valid date window with no draws returns an empty dataset successfully. Invalid dates, reversed ranges, unsupported hosts, and malformed result URLs fail the run with a clear message.

### Limits and important notes

- Supported source: public pages on `powerball.com`.
- Earliest accepted date: `1992-04-22`.
- Maximum output: 5,000 records per run.
- Results are ordered newest first.
- Jackpot fields are estimates as labeled by the source.
- Historical pages can legitimately omit Power Play, jackpot, or cash context.
- The source can change markup or availability without notice.
- The Actor does not predict numbers or improve odds.
- It does not validate ticket ownership or redemption eligibility.

### Responsible use and legality

Powerball publishes result information publicly. Use the Actor responsibly, respect applicable laws and source terms, and avoid excessive scheduling. Store only the data you need.

Official winning numbers are those recorded under the observation procedures described by Powerball. If a dataset record conflicts with an official lottery record, the official record prevails. This Actor is an extraction tool, not a lottery operator, legal authority, or financial service.

### Troubleshooting

#### Why did the run return zero records?

Confirm that the chosen window contains a scheduled Powerball draw. A one-day window on a non-draw day can correctly produce no rows. Also confirm exact URLs fall inside `fromDate` and `toDate`.

#### Why did an exact URL fail validation?

Use a public URL shaped like:

`https://www.powerball.com/draw-result?gc=powerball&date=2025-01-01`

Other hosts and Powerball content pages are intentionally rejected.

#### Why is a jackpot field null?

The official page did not publish that value for the draw. Null preserves the distinction between missing source data and a zero-dollar value.

#### What should I use as a stable key?

Use `drawDate` for a Powerball-only table or `sourceUrl` when mixing sources. Both are stable for normal upsert workflows.

### FAQ

#### Does it scrape the official Powerball website?

Yes. Records link back to the corresponding official powerball.com draw page.

#### Can it retrieve a full year?

Yes. Set the year's first and last dates and choose a `maxItems` high enough for all draws.

#### Can I schedule it?

Yes. Save the input as an Apify Task and attach a schedule. Downstream systems should upsert by draw date.

#### Does it include Double Play or other lottery games?

No. This Actor deliberately returns the main Powerball game only.

#### Does it check my ticket?

No. It supplies historical result data. Ticket validation and redemption remain with authorized lottery channels.

#### Are jackpot values exact payouts?

No. They are the estimated jackpot and cash-value context shown on the result page.

### Related scrapers

For a comparable European lottery archive workflow, see [EuroMillions Results Scraper](https://apify.com/automation-lab/euromillions-results-scraper). It returns EuroMillions main numbers, Lucky Stars, draw dates, and jackpot context from its own source.

### Support

If a run fails on a valid public Powerball result page, include the run URL, sanitized input, expected draw date, and observed behavior in an Actor issue. Do not include API tokens or private credentials.

# Actor input Schema

## `fromDate` (type: `string`):

Earliest draw date to include, in YYYY-MM-DD format. Powerball history begins on 1992-04-22.

## `toDate` (type: `string`):

Latest draw date to include, in YYYY-MM-DD format.

## `startUrls` (type: `array`):

Optional powerball.com/draw-result URLs. Date filters still apply. Leave empty to discover every draw in the date window.

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

Maximum number of draw records to save, newest first.

## Actor input object example

```json
{
  "fromDate": "2025-01-01",
  "toDate": "2025-01-31",
  "startUrls": [],
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing every accepted draw record.

# 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 = {
    "fromDate": "2025-01-01",
    "toDate": "2025-01-31",
    "startUrls": [],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/powerball-historical-winning-numbers").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 = {
    "fromDate": "2025-01-01",
    "toDate": "2025-01-31",
    "startUrls": [],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/powerball-historical-winning-numbers").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 '{
  "fromDate": "2025-01-01",
  "toDate": "2025-01-31",
  "startUrls": [],
  "maxItems": 20
}' |
apify call automation-lab/powerball-historical-winning-numbers --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/powerball-historical-winning-numbers"
        }
    }
}

```

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/2JN4QSf1F5g2sxsBG/builds/Dypm9DHtWGtJvswYF/openapi.json
