# Lottery Results Scraper (Powerball, Mega Millions) (`scrapers_lat/lottery-results-scraper`) Actor

Scrape official US lottery results: Powerball, Mega Millions, Cash4Life, New York Lotto and Take 5. Latest and historical draws with parsed number arrays, bonus ball, multiplier and next draw date. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/lottery-results-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.56 / 1,000 lottery draw records

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

[![Lottery Results Scraper (Powerball, Mega Millions)](https://scrapers.lat/banners/lottery-results-scraper.png)](https://console.apify.com/actors/0UVh0vsfhwDAmtVW2/input)

## Lottery Results Scraper (Powerball, Mega Millions)

Here is one real result, with every field the actor returns:

```json
{
  "game": "Powerball",
  "drawTime": null,
  "drawDate": "2026-08-22",
  "numbers": [13, 31, 54, 57, 65],
  "bonusBall": 23,
  "bonusName": "Powerball",
  "multiplier": 3,
  "multiplierName": "Power Play",
  "doublePlayNumbers": [4, 18, 29, 47, 53],
  "doublePlayBonus": 16,
  "nextDrawDate": "2026-08-24",
  "hotNumbers": [5, 8, 54, 4, 6],
  "coldNumbers": [3, 7, 12, 13, 15],
  "overdueNumbers": [1, 11, 16, 19, 23, 28, 32, 33],
  "aiNumberStatsNote": "In the latest analysis of 20 Powerball draws, the hot numbers include 5, 8, 54, 4, and 6, which have been drawn most frequently. Conversely, the cold numbers are 3, 7, 12, 13, and 15, showing the least frequency. Additionally, numbers like 1, 11, 16, 19, 23, 28, 32, and 33 have not been drawn recently, making them overdue.",
  "aiDisclaimer": "Lottery draws are random, and this content is for entertainment purposes only, not gambling advice.",
  "source": "data.ny.gov",
  "observedAt": "2026-08-23T12:29:32.912Z",
  "error": null
}
```

The most complete US lottery results scraper available. It returns every field the official state draw feeds expose for Powerball, Mega Millions, Cash4Life, New York Lotto and Take 5, plus derived fields like parsed number arrays, a normalized bonus ball, the multiplier, and the next scheduled draw date, in one actor covering both the latest draw and full draw history.

**📥 [Input](https://apify.com/scrapers_lat/lottery-results-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/lottery-results-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/lottery-results-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/lottery-results-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-United%20States-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Use cases](#use-cases)
- [How we compare](#how-we-compare)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing](#billing)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor reads official US state open-data draw feeds and returns clean, normalized results for five games in a single run: Powerball, Mega Millions, Cash4Life, New York Lotto and Take 5. For each game you can pull just the most recent draw or a run of historical draws, most recent first.

Every draw is normalized the same way: the winning numbers are parsed into an integer array (`numbers`), the bonus ball is separated out with its correct label (`bonusBall`, `bonusName`, for example Powerball, Mega Ball or Cash Ball), the multiplier is captured when the game offers one (`multiplier`, `multiplierName`, for example Power Play or Megaplier), and the next draw date is derived from each game's fixed weekly schedule (`nextDrawDate`). Powerball Double Play numbers are included when published.

An optional AI number stats add-on computes hot, cold and overdue numbers with a plain-language narrative across the draws you pulled. It is entertainment content only and always ships with a clear randomness disclaimer.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the latest Powerball and Mega Millions draws.

```json
{
  "games": ["powerball", "megamillions"],
  "latestOnly": true,
  "maxResults": 10
}
```

To pull history instead, turn `latestOnly` off and set `historyLimit`:

```json
{
  "games": ["powerball"],
  "latestOnly": false,
  "historyLimit": 50,
  "maxResults": 50
}
```

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `games` | array | no | `["powerball","megamillions"]` | Which games to pull. Any subset of `powerball`, `megamillions`, `cash4life`, `nylotto`, `take5`. Powerball, Mega Millions and Cash4Life are multi-state games; New York Lotto and Take 5 are New York state games. |
| `latestOnly` | boolean | no | `true` | When on, returns only the most recent draw per game. Turn off to pull historical draws using `historyLimit`. |
| `historyLimit` | integer | no | `1` | Number of recent draws to return per game when `latestOnly` is off, most recent first. Ignored when `latestOnly` is on. |
| `aiNumberStats` | boolean | no | `false` | Paid add-on, entertainment only. Adds hot, cold and overdue numbers, a frequency narrative and a randomness disclaimer to each record. Charged only when usable stats are produced. Disabled on free plans. |
| `maxResults` | integer | no | `10` | Maximum draw records to return across the whole run, counted over all selected games. Free Apify plans are capped at 10 per run. |

### Output reference

One dataset item per draw. For Take 5, each draw date yields two rows, one Evening and one Midday. Types: `string`, `integer`, `integer[]`, or `null` when a value does not apply.

| Field | Type | Description |
|---|---|---|
| `game` | string | Game name, for example `Powerball`, `Mega Millions`, `Take 5 (Evening)`. |
| `drawTime` | string | Draw slot for games with more than one daily draw (Take 5): `Evening` or `Midday`. `null` otherwise. |
| `drawDate` | string | Draw date, `YYYY-MM-DD`. |
| `numbers` | integer\[] | Main winning numbers, in drawn order. |
| `bonusBall` | integer | Bonus ball value (Powerball, Mega Ball, Cash Ball, NY Lotto Bonus). `null` for games without one. |
| `bonusName` | string | Label of the bonus ball for this game, for example `Powerball`, `Mega Ball`, `Cash Ball`. |
| `multiplier` | integer | Multiplier drawn (Power Play or Megaplier). `null` when the game does not offer one or it is not published. |
| `multiplierName` | string | Name of the multiplier, for example `Power Play`, `Megaplier`. |
| `doublePlayNumbers` | integer\[] | Powerball Double Play main numbers when published, else `null`. |
| `doublePlayBonus` | integer | Powerball Double Play bonus ball when published, else `null`. |
| `nextDrawDate` | string | Next scheduled draw date, `YYYY-MM-DD`, derived from the game's fixed weekly schedule. |
| `hotNumbers` | integer\[] | Most frequently drawn main numbers across the returned draws. AI stats add-on. |
| `coldNumbers` | integer\[] | Least frequently drawn main numbers across the returned draws. AI stats add-on. |
| `overdueNumbers` | integer\[] | Numbers not drawn recently in the returned window. AI stats add-on. |
| `aiNumberStatsNote` | string | Plain-language narrative of hot, cold and overdue numbers. AI stats add-on. |
| `aiDisclaimer` | string | Randomness and entertainment-only disclaimer. AI stats add-on. |
| `source` | string | Official open-data source of the results. |
| `observedAt` | string | ISO 8601 timestamp when the record was collected. |
| `error` | string | `null` on success. On a failed run, a single item with a populated `error` field is written instead. |

### Example output record

Real record from a live run (input `{"games":["megamillions"],"latestOnly":true}`):

```json
{
  "game": "Mega Millions",
  "drawTime": null,
  "drawDate": "2026-08-21",
  "numbers": [1, 25, 34, 48, 57],
  "bonusBall": 24,
  "bonusName": "Mega Ball",
  "multiplier": null,
  "multiplierName": "Megaplier",
  "doublePlayNumbers": null,
  "doublePlayBonus": null,
  "nextDrawDate": "2026-08-25",
  "hotNumbers": null,
  "coldNumbers": null,
  "overdueNumbers": null,
  "aiNumberStatsNote": null,
  "aiDisclaimer": null,
  "source": "data.ny.gov",
  "observedAt": "2026-08-23T12:20:11.004Z",
  "error": null
}
```

### Use cases

- Power a lottery results app or widget that refreshes after every draw, with numbers already parsed and ready to render.
- Show the latest winning numbers plus the next draw date for Powerball, Mega Millions, Cash4Life, NY Lotto and Take 5 in one call.
- Build historical draw archives for research, spreadsheets or backtesting by pulling hundreds of past draws per game.
- Feed a checker feature that compares a user's ticket against the newest results.
- Add an entertainment "hot and cold numbers" panel using the AI number stats add-on, with a built-in randomness disclaimer.

### How we compare

| | This actor | Single-game Powerball scrapers | Typical RapidAPI lottery APIs |
|---|---|---|---|
| Games in one tool | Powerball, Mega Millions, Cash4Life, NY Lotto, Take 5 | One game per actor | Varies, often locked behind higher tiers |
| Latest and full history | Yes, one input toggle | Often latest only or history only | Usually yes |
| Parsed number array | Yes, integer array | Often a raw string you must split | Mixed |
| Bonus ball normalized | Yes, with correct label per game | Sometimes merged into the main string | Mixed |
| Multiplier (Power Play, Megaplier) | Yes, value and name | Often missing | Sometimes |
| Powerball Double Play | Yes, when published | Rare | Rare |
| Next draw date | Yes, derived from the schedule | Rare | Sometimes |
| Source | Official US state open data | Varies | Varies |
| AI hot, cold, overdue stats | Optional add-on, entertainment only | No | Rare |
| Billing | Pay per result, no charge on empty runs | Monthly subscription or credits | Monthly subscription with request quotas |

Named points of comparison include the per-game Apify actors (for example the Powerball and Mega Millions past winning numbers actors), the Apify "Lottery Analyzer" actor, and RapidAPI options such as the USA Lottery Result (All State) API and the Downtack Lottery Results API.

Why choose this one:

- Five games in a single actor and a single output shape, not one scraper per game.
- Latest draw and deep history from the same input, so one integration covers both.
- Numbers arrive as integer arrays with the bonus ball and multiplier already separated and labeled.
- Sourced from official US state open data.
- Optional AI number stats for an entertainment panel, always with a randomness disclaimer.
- Pay per result with no charge on empty or failed runs.

### Run via API and CLI

Start a run and read the dataset in one call. Replace `<TOKEN>` with your Apify API token.

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~lottery-results-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"games":["powerball","megamillions"],"latestOnly":true,"maxResults":10}'
```

Pull history for one game:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~lottery-results-scraper/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"games":["powerball"],"latestOnly":false,"historyLimit":100,"maxResults":100}'
```

Apify CLI:

```bash
apify call scrapers_lat/lottery-results-scraper \
  --input '{"games":["cash4life","take5"],"latestOnly":true}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large history pulls.

### Billing

- **Pay per result.** You are charged per draw record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/lottery-results-scraper/pricing) for the current per-result price.
- **AI number stats add-on.** Optional and off by default. Charged once per game, only when usable stats are produced. Disabled on free plans.
- **No charge on failure.** If a run errors or returns nothing, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 records per run, with paid add-ons disabled. Upgrade for higher `maxResults` and the AI add-on.

### FAQ and troubleshooting

**Which games are covered?**
Powerball, Mega Millions and Cash4Life (multi-state), plus New York Lotto and Take 5 (New York state games). EuroMillions and UK National Lottery are not included yet and are a planned future addition.

**How do I get historical draws?**
Turn `latestOnly` off and set `historyLimit` to how many recent draws per game you want, for example 50 or 200. Results come back most recent first.

**Why is `multiplier` null for Mega Millions?**
The multiplier is only present when the source feed publishes it for that draw. Missing source values are returned as `null`, never invented.

**Why are there two Take 5 rows per date?**
Take 5 draws twice a day. Each date returns one `Take 5 (Evening)` row and one `Take 5 (Midday)` row, distinguished by the `drawTime` field.

**Are the hot and cold numbers a prediction?**
No. They are a frequency summary of the draws you pulled, provided as entertainment only. Lottery draws are random and independent; past results do not predict future draws. Every AI stats record carries a disclaimer saying so.

**Is this an official lottery tool?**
No. This actor is independent and not affiliated with any lottery operator. It reads only publicly available official state open data.

### Related scrapers

- [DraftKings DFS Salaries Scraper](https://apify.com/scrapers_lat/draftkings-dfs-salaries-scraper): daily fantasy contests and player salaries.
- [NBA Scores & Standings Scraper](https://apify.com/scrapers_lat/nba-scores-standings-scraper): live scores, schedules and standings.
- [NHL Scores & Standings Scraper](https://apify.com/scrapers_lat/nhl-scores-standings-scraper): live scores, schedules and standings.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with any lottery operator or state agency. Accesses only publicly available official state open data.

# Actor input Schema

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

Which lottery games to pull results for. Choose any subset. Powerball, Mega Millions and Cash4Life are multi-state games; New York Lotto and Take 5 are New York state games. Leave empty for Powerball and Mega Millions.

## `latestOnly` (type: `boolean`):

When on (default), returns only the most recent draw per game. Turn off to pull historical draws, controlled by Draw history limit.

## `historyLimit` (type: `integer`):

How many recent draws to return per game when Latest draw only is off. For example 20 returns the last 20 draws per game, most recent first. Ignored when Latest draw only is on.

## `aiNumberStats` (type: `boolean`):

For entertainment only. From the draws returned, add hot, cold and overdue numbers, a frequency narrative and a randomness disclaimer to each record of the game. Charged only when usable stats are produced. Disabled on free plans.

## `maxResults` (type: `integer`):

Maximum number of draw records to return across the whole run, counted over all selected games. Free Apify plans are capped at 10 per run.

## Actor input object example

```json
{
  "games": [
    "powerball",
    "megamillions"
  ],
  "latestOnly": true,
  "historyLimit": 1,
  "aiNumberStats": false,
  "maxResults": 10
}
```

# Actor output Schema

## `results` (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 = {
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/lottery-results-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 = { "maxResults": 10 }

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/lottery-results-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 '{
  "maxResults": 10
}' |
apify call scrapers_lat/lottery-results-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/lottery-results-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/0UVh0vsfhwDAmtVW2/builds/gPfcpaGEsVhmNs1dP/openapi.json
