canonical: https://jentic.com/apis/fungenerators.com/fungenerators-lottery

# Fungenerators Random Lottery Number generator API

The Random Lottery Number generator API produces draw-style number sets for lottery games across many countries. It returns valid number ranges and supplementary balls per game, so applications can simulate picks, build quick-pick widgets, or seed mock data for testing. The API is a small, focused service with three endpoints covering supported countries, supported games, and the actual draw generation. It pairs well with content sites, novelty apps, and agent demos that need realistic random selections without operating a real lottery.

## For AI agents

Generate random lottery number draws for popular global lottery games and list which countries and games are supported.

## Scope

Does not run real draws, sell tickets, or pay winnings - use for generating random lottery-shaped number sets only.

## Capabilities

- Generate a random draw for a named lottery game with the correct number range and bonus balls
- List every country whose lotteries are covered by the catalogue
- List the supported lottery games available for draw generation
- Produce quick-pick number sets for novelty apps, widgets, and prototypes
- Seed test fixtures with realistic lottery-shaped numeric data

## Use cases

### Quick-Pick Widget for a Content Site

Embed a daily lottery quick-pick widget that produces a fresh set of numbers for popular games like Powerball or EuroMillions. The widget calls the draw endpoint with a chosen game key and renders the returned numbers and bonus ball. Because the API exposes a list of supported games and countries, the widget can localise to the visitor's region.

Example prompt: Call GET `/lottery/draw` with game=powerball and return the main numbers and bonus ball formatted for display.

### Novelty and Entertainment Apps

Build a fun mobile or web app that lets users spin up random lottery picks for any supported game. The app first calls the supported games and countries endpoints to populate selectors, then triggers a draw on demand. This avoids hardcoding game rules and ranges in client code.

Example prompt: Fetch GET `/lottery/countries` and GET `/lottery/supported`, then trigger GET `/lottery/draw` for the user-selected game.

### Test Data Seeding for Lottery-Style Software

Populate development and QA environments with realistic lottery-shaped numeric data. Engineers can script repeated calls to the draw endpoint to seed databases, generate fixtures, or stress-test rendering of large numbers of historical draws without scraping a real lottery operator.

Example prompt: Call GET `/lottery/draw` 500 times for game=euromillions and write each result as a row in a fixtures CSV.

### AI Agent Random Draw Tool

Expose lottery draws as a Jentic tool that an AI agent can call when a user asks for a random pick. Through Jentic, the agent searches by intent, loads the operation schema, and executes the draw without handling the bearer token directly. This is a self-contained agent capability for chat assistants and Discord bots.

Example prompt: Use Jentic to search 'generate a random lottery draw', load the draw operation, and execute it with game=megamillions.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/lottery/draw` | Generate a random draw for a specified lottery game |
| GET | `/lottery/supported` | List supported lottery games |
| GET | `/lottery/countries` | List countries with supported lotteries |

## Key resources

- **Lottery Draw** — Produce a random number set for a specified lottery game
- **Supported Games** — List the lottery games available for draw generation
- **Countries** — List the countries whose lotteries are covered

## Why Jentic

- **Setup:** Wiring the Fungenerators Random Lottery Number generator by hand means passing your API key as a bearer token in the Authorization header on api.fungenerators.com and reading the supported games and countries routes yourself. Through Jentic you install once, import the Random Lottery Number generator API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The lottery API takes its input in query parameters rather than a resource path, so you limit the agent to the operations it needs, such as drawing a random set or listing supported games. You choose which operations it may call, and nothing outside that set runs.
- **Credential handling:** Your Fungenerators token is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a random lottery draw' or 'list supported lotteries', and Jentic returns the matching GET `/lottery/draw` or GET `/lottery/supported` operation with its parameter schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **UUID Generation API** — Same vendor; generates UUIDs instead of lottery numbers
- **Trivia API** — Same vendor; pairs lottery widgets with trivia content for entertainment apps
- **Facts API** — Same vendor; surfaces random facts to enrich lottery widgets with extra content

## FAQ

### What authentication does the Random Lottery Number generator API use?

The API uses HTTP bearer token authentication. Through Jentic the bearer token is held in the encrypted vault and injected at execution time, so agents never see the raw secret.

### Can I generate a Powerball or EuroMillions draw with the Lottery API?

Yes. Call GET `/lottery/draw` with the game key for the game you want. Use GET `/lottery/supported` first if you need to confirm the exact game identifier the API expects.

### What are the rate limits for the Random Lottery Number generator API?

The OpenAPI spec does not declare explicit rate limits. Fungenerators publishes plan-based quotas on its subscription page at fungenerators.com, so check the plan you subscribed to for the per-minute and per-day caps.

### How do I generate a random lottery draw through Jentic?

Search for 'generate a random lottery draw' via the Jentic SDK or MCP server, load the GET `/lottery/draw` operation schema, then execute it with the game parameter. Install with pip install jentic and authenticate using your ak_* key.

### Does this API run a real lottery or pay out winnings?

No. It only generates random number sets shaped like real lottery games for use in apps, widgets, and tests. Use it for entertainment, prototyping, and demos rather than gambling operations.

### How do I see which countries and games are available?

Call GET `/lottery/countries` for the country list and GET `/lottery/supported` for the game list. Render these to populate dropdowns in your client before triggering a draw.

### Can I limit what my agent is allowed to do with the Random Lottery Number generator API?

Yes. Because you run Jentic One yourself, your own rules decide which of this API's operations the agent can call, so you can allow only GET `/lottery/draw` while blocking GET `/lottery/supported` and GET `/lottery/countries`, or expose all three. Since every operation takes its input as query parameters rather than a resource path, you scope access at the operation level and nothing outside the set you approve will run. The Fungenerators bearer token stays with your instance and is added to the request at execution time, so the agent never handles the raw credential.
