# Lottery Games (`lottery.games`)

The lottery games with results available: Powerball, Mega Millions and New York draw games, with their ball names, draw times and history start.

Docs: https://primaryapi.com/docs/api-reference/lottery/games

- Endpoint: `POST https://api.primaryapi.com/v1/run/lottery.games`
- Category: Knowledge & Data · Platform: `lottery` · Kind: list · Status: live
- Price: 1 credit per call. Every call costs the same, including calls that were retried automatically.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=lottery.games`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

This API takes no input fields: send `{}`.

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `games` | object[] |  |
| `games[].key` | string | Game key to pass as `game`. |
| `games[].name` | string |  |
| `games[].region` | enum | multi-state = a national draw (same numbers in every state); new-york = a New York Lottery game. |
| `games[].drawTime` | enum \| null |  |
| `games[].mainCount` | integer | Main numbers (or digits) in each draw. |
| `games[].specialBallName` | string \| null |  |
| `games[].multiplierName` | string \| null |  |
| `games[].hasDoublePlay` | boolean |  |
| `games[].checkable` | boolean | lottery.check supports this game. |
| `games[].schedule` | string \| null | Published draw days and time, when known. |
| `games[].firstDraw` | string | Earliest draw date available (YYYY-MM-DD). |
| `games[].retired` | boolean |  |
| `games[].notes` | string \| null |  |
| `nextCursor` | null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

## Example request

_Input values are placeholders built from the schema._

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/lottery.games" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "games": [
        {
          "key": "powerball",
          "name": "Powerball",
          "region": "multi-state",
          "drawTime": "evening",
          "mainCount": 5,
          "specialBallName": "Powerball",
          "multiplierName": "Power Play",
          "hasDoublePlay": true,
          "checkable": true,
          "schedule": "Monday, Wednesday and Saturday at 10:59 pm ET",
          "firstDraw": "2010-02-03",
          "retired": false,
          "notes": null
        },
        {
          "key": "mega-millions",
          "name": "Mega Millions",
          "region": "multi-state",
          "drawTime": "evening",
          "mainCount": 5,
          "specialBallName": "Mega Ball",
          "multiplierName": "Megaplier",
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": "Tuesday and Friday at 11:00 pm ET",
          "firstDraw": "2002-05-17",
          "retired": false,
          "notes": "The Megaplier was retired when the new game launched in April 2025; draws since then carry no multiplier (it is printed on each ticket instead)."
        },
        {
          "key": "millionaire-for-life",
          "name": "Millionaire for Life",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 5,
          "specialBallName": "Millionaire Ball",
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": null,
          "firstDraw": "2026-02-22",
          "retired": false,
          "notes": null
        },
        {
          "key": "ny-lotto",
          "name": "NY Lotto",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 6,
          "specialBallName": "Bonus",
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": null,
          "firstDraw": "2001-09-12",
          "retired": false,
          "notes": null
        },
        {
          "key": "take5-evening",
          "name": "Take 5 (evening)",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 5,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": null,
          "firstDraw": "1992-01-17",
          "retired": false,
          "notes": null
        },
        {
          "key": "take5-midday",
          "name": "Take 5 (midday)",
          "region": "new-york",
          "drawTime": "midday",
          "mainCount": 5,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": null,
          "firstDraw": "1992-01-17",
          "retired": false,
          "notes": "Midday draws start later than the evening history; earlier dates have no midday result."
        },
        {
          "key": "numbers-evening",
          "name": "Numbers (evening)",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 3,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": false,
          "schedule": null,
          "firstDraw": "1980-09-02",
          "retired": false,
          "notes": null
        },
        {
          "key": "numbers-midday",
          "name": "Numbers (midday)",
          "region": "new-york",
          "drawTime": "midday",
          "mainCount": 3,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": false,
          "schedule": null,
          "firstDraw": "1980-09-02",
          "retired": false,
          "notes": null
        },
        {
          "key": "win4-evening",
          "name": "Win 4 (evening)",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 4,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": false,
          "schedule": null,
          "firstDraw": "1980-09-02",
          "retired": false,
          "notes": null
        },
        {
          "key": "win4-midday",
          "name": "Win 4 (midday)",
          "region": "new-york",
          "drawTime": "midday",
          "mainCount": 4,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": false,
          "schedule": null,
          "firstDraw": "1980-09-02",
          "retired": false,
          "notes": null
        },
        {
          "key": "pick10",
          "name": "Pick 10",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 20,
          "specialBallName": null,
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": false,
          "schedule": null,
          "firstDraw": "1987-01-12",
          "retired": false,
          "notes": null
        },
        {
          "key": "cash4life",
          "name": "Cash4Life",
          "region": "new-york",
          "drawTime": "evening",
          "mainCount": 5,
          "specialBallName": "Cash Ball",
          "multiplierName": null,
          "hasDoublePlay": false,
          "checkable": true,
          "schedule": null,
          "firstDraw": "2014-06-16",
          "retired": true,
          "notes": "Retired game: the last draw was on 2026-02-21."
        }
      ],
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 12,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: the usual price, even when a call is retried. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=lottery.games`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

A fixed list that changes only when a game is added or retired.

## Legal

Results come from official state lottery open data; in a discrepancy, the lottery’s certified drawing results prevail. Always confirm numbers with the official lottery before acting on them. Informational only: no prize amounts, odds advice or ticket sales. Powerball and Mega Millions are trademarks of their owners.

