# Lottery Number Generator API

> Lottery Number Generator creates random lottery numbers for various popular games including Powerball, Mega Millions, EuroMillions, and custom lottery configurations.

**Endpoint:** `GET https://api.apiverve.com/v1/lotterypicker`  
**Category:** Games  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/lotterypicker

## Overview

Generate multiple tickets at once with properly formatted number sets, perfect for lottery apps, gaming platforms, or random number generation needs.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/lotterypicker?game=powerball&numbers=6&max=49&bonus=1&tickets=3&bonusmax=26" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `game` | string | No | Lottery game preset; pick3 and pick4 are US daily digit games (each digit 0-9, repeats allowed, order kept) and uklotto is the UK Lotto 6 from 59. default custom. One of: custom, powerball, megamillions, euromillions, eurojackpot, lotto649, uklotto, pick3, pick4 |
| `numbers` | integer | No | Number of main numbers to pick (for custom game). default 6. range 1-20 |
| `max` | integer | No | Maximum number for main numbers (for custom game). default 49. range 10-100 |
| `bonus` | integer | No | Number of bonus numbers (for custom game). default 0. range 0-5 |
| `tickets` | integer | No | Number of tickets to generate. default 1. range 1-25 |
| `bonusmax` | integer | No | Highest value a bonus ball can take. Only applies when game is custom; named games use their own rules. default 10. range 1-inf |

## Response fields

- `game` — string · Lottery game type used for generation
- `game_type` — string · The lottery game the numbers were picked for
- `config` — object · The game's rules, showing how many numbers are drawn from what range
  - `config.main_numbers_count` — number · How many main numbers the game draws
  - `config.main_numbers_range` — string · Range the main numbers are drawn from
  - `config.bonus_numbers_count` — number · How many bonus numbers the game draws
  - `config.bonus_numbers_range` — string · Range the bonus numbers are drawn from
- `tickets_generated` — number · Number of tickets returned
  - `tickets.0.ticket_number` — number · Position of this ticket in the set
  - `tickets.0.main_numbers` — array · Main lottery numbers for the ticket
  - `tickets.0.bonus_numbers` — array · Bonus numbers for the ticket if applicable

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "game": "Powerball (US)",
    "game_type": "powerball",
    "config": {
      "main_numbers_count": 5,
      "main_numbers_range": "1-69",
      "bonus_numbers_count": 1,
      "bonus_numbers_range": "1-26"
    },
    "tickets_generated": 3,
    "tickets": [
      {
        "ticket_number": 1,
        "main_numbers": [
          11,
          12,
          51,
          53,
          58
        ],
        "bonus_numbers": [
          3
        ]
      },
      {
        "ticket_number": 2,
        "main_numbers": [
          4,
          24,
          28,
          46,
          61
        ],
        "bonus_numbers": [
          3
        ]
      },
      {
        "ticket_number": 3,
        "main_numbers": [
          12,
          13,
          29,
          49,
          60
        ],
        "bonus_numbers": [
          6
        ]
      }
    ]
  }
}
```

## Use cases

- **Lottery Apps** — Build lottery number picker apps with support for popular games like Powerball, Mega Millions, and international lotteries
- **Quick Pick Numbers** — Generate quick pick numbers for lottery games with customizable number ranges and bonus ball configurations
- **Gaming Systems** — Create random number sets for gaming applications, contests, and raffle systems with verifiable randomization
- **International Support** — Support multiple international lottery formats including EuroMillions, UK Lotto, and regional lottery games worldwide

## SDKs

- **npm** — `npm install @apiverve/lotterypicker` (https://www.npmjs.com/package/@apiverve/lotterypicker)
- **NuGet** — `dotnet add package APIVerve.API.LotteryNumberGenerator` (https://www.nuget.org/packages/APIVerve.API.LotteryNumberGenerator)
- **Source** — https://github.com/apiverve/lotterypicker-api

## More

- Full reference: https://docs.apiverve.com/ref/lotterypicker
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
