New York Win 4 Results Scraper avatar

New York Win 4 Results Scraper

Pricing

from $4.80 / 1,000 item extracteds

Go to Apify Store
New York Win 4 Results Scraper

New York Win 4 Results Scraper

Export official New York Win 4 midday and evening winning numbers, draw IDs, prize totals, winner counts, and booster fields by date range.

Pricing

from $4.80 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Categories

Share

Export official New York Win 4 results into a clean dataset, grouped by draw date. Each row can include the Midday and Evening four-digit numbers, official draw IDs, draw numbers, prize totals, Straight, Box, Front Pair, Back Pair, and Combination winner counts, and source-provided booster fields.

Use the Actor for one-time analysis, scheduled archive refreshes, spreadsheets, dashboards, or downstream lottery-data pipelines. It reads the public New York Lottery data surface directly and does not require a lottery account or browser.

What does this Actor do?

The Actor accepts an inclusive date range and requests official Win 4 draw records. It normalizes the two daily draw periods into one stable row per calendar date.

You can:

  • collect both Midday and Evening results;
  • request Midday-only or Evening-only records;
  • limit the number of newest date rows saved;
  • preserve individual digits as well as the joined four-digit number;
  • retain official identifiers and result provenance;
  • leave dates empty for a rolling latest-week window on every scheduled run.

Who is it for?

  • Lottery-data publishers maintaining result archives
  • Analysts studying historical number sequences
  • Spreadsheet users who need typed, repeatable exports
  • Developers feeding dashboards, databases, or APIs
  • Automation teams comparing successive scheduled datasets

This Actor reports historical results. It does not predict future winning numbers, check tickets, calculate odds, or place wagers.

Why use it?

The official website is designed for interactive lookup. This Actor provides a repeatable machine-readable contract instead:

  1. inclusive date filtering;
  2. bounded pagination that never cuts a date row in half;
  3. one predictable record per draw date;
  4. separate Midday and Evening objects;
  5. direct dataset, API, webhook, and integration access.

No proxy is enabled by default because the official JSON route currently works directly. Transient network, rate-limit, and server failures receive bounded retries. Invalid inputs and unexpected upstream response shapes fail clearly rather than silently producing misleading empty results.

Getting started

  1. Open the Actor input page.
  2. Leave startDate and endDate empty for the latest seven dates, or enter a fixed range in YYYY-MM-DD format.
  3. Choose both draws, Midday only, or Evening only.
  4. Set maxItems to the maximum number of date rows you need.
  5. Click Start.
  6. Open the default dataset or download JSON, CSV, Excel, XML, RSS, or JSONL.

A small recent range is best for your first run.

Input parameters

FieldTypeDefaultDescription
startDatestring6 days before each runFirst included official draw date, YYYY-MM-DD
endDatestringcurrent UTC date of each runLast included official draw date, YYYY-MM-DD
drawTimestringallall, midday, or evening
maxItemsinteger100Maximum date rows, from 1 to 1,000

The inclusive range may span at most 367 calendar dates because the official source currently exposes approximately one year of Win 4 history. A range outside available history can correctly return no rows. Dates must be real calendar dates: values such as 2026-02-30 are rejected before the run is charged. Empty date fields are treated as omitted and use the rolling defaults.

Example input

Latest five draw dates, recalculated on every run:

{
"drawTime": "all",
"maxItems": 5
}

A fixed historical range returns the same dates every time it runs:

{
"startDate": "2026-09-01",
"endDate": "2026-09-05",
"drawTime": "all",
"maxItems": 5
}

To collect only the evening period, set drawTime to evening. The resulting rows keep midday as null, making period filtering explicit to downstream code.

Extracted data

FieldMeaning
drawDateOfficial draw date
gameStable game label, Win 4
middayMidday draw details or null
eveningEvening draw details or null
winningNumberJoined four-digit result; leading zero is preserved
winningNumbersFour individual digit strings
drawIdOfficial source record ID
drawNumberOfficial sequence number
boosterNumberSource bonus/booster field, or null when not supplied
multiplierSource multiplier field, or null when not supplied
totalPrizesUsdReported total prize amount, or null
straightPlayWinnersReported Straight Play winner count
boxPlayWinnersReported Box Play winner count
frontPairPlayWinnersReported Pair Play winners for the first two digits (Front Pair)
backPairPlayWinnersReported Pair Play winners for the last two digits (Back Pair)
combinationPlayWinnersReported Combination play winner count
sourceUrlOfficial New York Lottery page
retrievedAtCollection timestamp in UTC

Winner counts are null when the official source does not report that category and 0 when it reports no winners. Booster and multiplier fields are retained for schema stability but are usually null for Win 4 because the official source currently returns them empty.

Example output

{
"drawDate": "2026-10-30",
"game": "Win 4",
"midday": {
"drawId": "5138206",
"drawNumber": "23434",
"winningNumber": "3114",
"winningNumbers": ["3", "1", "1", "4"],
"boosterNumber": null,
"multiplier": null,
"totalPrizesUsd": 778525,
"straightPlayWinners": 111,
"boxPlayWinners": 2427,
"frontPairPlayWinners": 16,
"backPairPlayWinners": 9,
"combinationPlayWinners": 6
},
"evening": {
"drawId": "5139381",
"drawNumber": "23435",
"winningNumber": "4632",
"winningNumbers": ["4", "6", "3", "2"],
"boosterNumber": null,
"multiplier": null,
"totalPrizesUsd": 380775,
"straightPlayWinners": 84,
"boxPlayWinners": 1648,
"frontPairPlayWinners": 31,
"backPairPlayWinners": 8,
"combinationPlayWinners": 2
},
"middayWinningNumber": "3114",
"eveningWinningNumber": "4632",
"middayTotalPrizesUsd": 778525,
"eveningTotalPrizesUsd": 380775,
"sourceUrl": "https://nylottery.ny.gov/draw-game?game=win4",
"retrievedAt": "2026-10-31T09:00:00.000Z"
}

Official values can be corrected after publication. For auditable pipelines, retain both drawId and retrievedAt and compare repeated exports by drawDate.

How much does it cost to export New York Win 4 results?

The Actor uses pay-per-event pricing:

  • $0.005 once per run;
  • on the Bronze tier, $0.008 per saved draw-date row;
  • lower item rates apply on Silver and Gold tiers.

A row can contain both Midday and Evening results; they are not charged separately. At Bronze pricing, 5 rows cost about $0.045, 25 rows about $0.205, and 100 rows about $0.805, including the run start. Check the live Actor pricing panel for the tier applicable to your account.

Scheduling archive refreshes

Create an Apify Schedule (or a saved task) and leave startDate and endDate empty. Omitted dates are resolved again on every run, so each scheduled run reads the latest seven dates. If you copy explicit dates into a schedule, every run re-exports that same frozen range. Send the completed dataset to a webhook, Google Sheets, Make, Zapier, or your own database. Upsert using drawDate; compare nested draw IDs or winning numbers to detect source corrections.

A rolling range is more efficient than downloading the whole available archive on every schedule. The Actor itself does not retain state between runs.

Data exports and integrations

The default dataset works with:

  • JSON, CSV, Excel, XML, RSS, and JSONL downloads;
  • Apify webhooks for completed or failed runs;
  • Google Sheets and cloud-storage integrations;
  • Make and Zapier workflows;
  • Apify API clients for JavaScript and Python.

Nested midday and evening objects are preserved in JSON. CSV exporters may flatten or serialize nested values depending on selected dataset fields.

Run with the Apify API

Replace YOUR_TOKEN with an Apify API token.

cURL API setup

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~new-york-win-4-draw-history/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"drawTime":"all","maxItems":5}'

JavaScript API setup

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/new-york-win-4-draw-history').call({
// Omit startDate/endDate for the latest seven dates, or pass fixed YYYY-MM-DD values.
drawTime: 'all',
maxItems: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python API setup

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation-lab/new-york-win-4-draw-history").call(run_input={
# Omit startDate/endDate for the latest seven dates, or pass fixed YYYY-MM-DD values.
"drawTime": "all",
"maxItems": 5,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

Use with MCP and AI assistants

Add this Actor to Claude Code through Apify MCP:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/new-york-win-4-draw-history"

Claude Desktop, Cursor, and VS Code setup

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

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/new-york-win-4-draw-history"
}
}
}

Example prompts:

  • “Export both New York Win 4 draws from September 1 through September 5, 2026.”
  • “Get only midday Win 4 results for the last seven available dates.”
  • “Return a JSON dataset I can compare with last week's archive.”

Reliability and retries

Requests use a 30-second timeout and up to three attempts for temporary network, HTTP 429, and server failures. Retries use bounded backoff. Stable client errors, invalid JSON, changed API shapes, malformed or contradictory pagination, and malformed official draw numbers fail the run instead of returning a partial archive. A genuinely empty date range still succeeds with no rows.

The official API pages individual draws, not dates, so one date's Midday and Evening draws can fall on different pages. The Actor fetches pages sequentially and stops only after the last included date is complete, so a maxItems limit never saves a date with a published draw missing. It does not use residential proxies or launch a browser in its normal route.

Error diagnostics and privacy

When a run fails, the Actor sends sanitized diagnostic input, the exception, and the Actor, build, and run IDs to our private GlitchTip error-tracking service so we can repair problems. Secret fields and URL query strings are removed, and reports are retained for 30 days.

Limitations

  • The official API currently exposes approximately one year of Win 4 results.
  • Prize and winner fields depend on what the official source provides.
  • Booster and multiplier values are commonly absent for this game.
  • Very recent Evening data may not exist yet when a run occurs before publication.
  • Scheduled runs can observe later official corrections to prior records.
  • This Actor covers New York Win 4 only, not Numbers, Take 5, Lotto, Powerball, or Mega Millions.

Troubleshooting

Why did the dataset contain no rows?

Confirm the range is within the source's available history and includes completed draws. Future dates and older unavailable dates naturally return no results.

Why is one period null?

You may have selected one draw period, or the official source may not yet have published the other draw. Inspect drawTime and the run time.

Why did the run fail after retries?

Check the log for an official API HTTP status or response-shape message. Retry later for a temporary upstream outage; do not widen the date range until a small request works.

Are leading zeroes preserved?

Yes. winningNumber and every element of winningNumbers are strings.

Responsible use and legality

The Actor collects public factual lottery results from the official New York Lottery website. Follow applicable source terms, platform rules, and laws. Do not present historical data as a prediction, guarantee, or gambling recommendation. Verify any number used to claim a prize against the official New York Lottery source. This Actor is an independent automation tool and is not endorsed by New York Lottery.

Use those Actors for their respective games. This Actor remains intentionally scoped to the twice-daily New York Win 4 result archive.

FAQ

Does it need a New York Lottery account?
No. It reads publicly available official results.

Can I export one draw period only?
Yes. Set drawTime to midday or evening.

Does maxItems count draws or dates?
It counts date rows. With drawTime: all, one charged row can contain two draws.

Why does my scheduled run return the same dates every time?
The schedule or task has fixed startDate/endDate values. Clear both fields to get the latest seven dates on every run.

Can it monitor changes?
Use an Apify Schedule and compare datasets in your storage or integration. The Actor produces stable identifiers but does not send change alerts by itself.

Does it predict likely numbers?
No. It exports historical official records only.