{
  "openapi": "3.0.1",
  "info": {
    "title": "Lottery Results API - Powerball, Mega Millions, History",
    "description": "No API key. Official lottery results as clean JSON from New York State Gaming Commission open data: Powerball (2010+), Mega Millions (2002+), Millionaire for Life (2026), Cash4Life, NY Lotto, Take 5, Numbers, Win 4, Pick 10, Quick Draw. Latest drawing, one date, full history, ticket check with match",
    "version": "0.1",
    "x-build-id": "g8kUr5XpzEm6UobGQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/martin10291~lottery-results-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-martin10291-lottery-results-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/martin10291~lottery-results-api/runs": {
      "post": {
        "operationId": "runs-sync-martin10291-lottery-results-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/martin10291~lottery-results-api/run-sync": {
      "post": {
        "operationId": "run-sync-martin10291-lottery-results-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "game": {
            "title": "Game",
            "enum": [
              "powerball",
              "megamillions",
              "millionaireforlife",
              "nylotto",
              "take5",
              "numbers",
              "win4",
              "pick10",
              "quickdraw",
              "cash4life"
            ],
            "type": "string",
            "description": "Which lottery game: powerball (since 2010), megamillions (since 2002) and millionaireforlife (since 2026) are multi-state games; nylotto, take5, numbers, win4, pick10, quickdraw are New York State games; cash4life is retired (history 2014-2026). Use the exact value, for example megamillions.",
            "default": "powerball"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "latest",
              "date",
              "history",
              "check",
              "frequency",
              "games"
            ],
            "type": "string",
            "description": "latest = newest drawing (Quick Draw: newest 10); date = drawings on one day (no drawing that day returns the nearest earlier one with a note); history = every drawing between Start and End date, newest first; check = compare your numbers with one drawing or every drawing in a range (matches, tier, prize where the official table is fixed); frequency = how often each number was drawn, with rank and hot/cold; games = every game with dates and number ranges. The example input (and an empty Apify run) shows the last 30 Powerball drawings.",
            "default": "latest"
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "For mode date, or the drawing to check in mode check: YYYY-MM-DD, for example 2026-11-14. Empty in check mode = the latest drawing."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "For history, frequency and range checks: first day, YYYY-MM-DD. Default: 90 days back (history) or 365 days back (frequency)."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "For history, frequency and range checks: last day, YYYY-MM-DD. Default: the game's latest drawing."
          },
          "numbers": {
            "title": "Your numbers",
            "type": "string",
            "description": "For mode check: your main numbers separated by spaces or commas, for example 10 22 33 49 57. Digit games (Numbers, Win 4): the digits in order, for example 0863."
          },
          "bonus": {
            "title": "Your bonus ball",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "For mode check: your Powerball, Mega Ball, Millionaire Ball or Cash Ball number. Leave empty for games without a bonus ball."
          },
          "multiplier": {
            "title": "Ticket multiplier (Mega Millions)",
            "minimum": 2,
            "maximum": 10,
            "type": "integer",
            "description": "For Mega Millions checks since 2025-04-08: the multiplier printed on your ticket (2, 3, 4, 5 or 10), so non-jackpot prizes are returned in USD. Without it you get the base prize and the min-max range."
          },
          "draws": {
            "title": "Last N drawings (frequency)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "For mode frequency: count the last N drawings instead of a date range, for example 100."
          },
          "drawTime": {
            "title": "Drawing time",
            "enum": [
              "midday",
              "evening"
            ],
            "type": "string",
            "description": "Take 5, Numbers and Win 4 draw twice a day. Empty = both drawings."
          },
          "limit": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows returned, newest first. Between 1 and 5000.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new drawings (monitor)",
            "type": "boolean",
            "description": "Return only drawings newer than the last run with this Monitor ID. Schedule it after each draw day to get every new result once.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of the watch for only-new mode, for example my-app. Each Monitor ID keeps its own last drawing per game.",
            "default": "default"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}