LotteryUSA APIlotteryusa.com ↗
Get US lottery results, winning numbers, jackpot amounts, and prize tables for all states via the LotteryUSA API. 3 endpoints covering national and state games.
What is the LotteryUSA API?
The LotteryUSA API provides access to US lottery data across 3 endpoints, covering winning numbers, jackpot amounts, drawing dates, and full prize tables for both national and state-specific games. The get_state_results endpoint returns the most recent drawing results for every lottery game in a given state, while get_game_prizes delivers structured prize tiers, odds, and multiplier details for games like Powerball and Mega Millions.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/abfb541d-b210-4bfa-b3a3-52e208dfc3cd/list_states' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace lotteryusa-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: LotteryUSA SDK — check winning numbers, browse states, inspect prize tables."""
from parse_apis.lottery_usa_api import LotteryUSA, GamePath, NotFound
client = LotteryUSA()
# List all covered states — each entry has name + slug.
for state in client.statesummaries.list(limit=5):
print(state.name, state.slug)
# Drill into one state's latest results via constructible State.
ca = client.state(slug="california")
for game in ca.results(limit=3):
print(game.game_name, game.jackpot, game.draw_date)
for num in game.winning_numbers:
print(f" {num.value} ({num.type})")
# Fetch prize tables for a national game using the enum.
game = client.games.get(game_path=GamePath.POWERBALL)
for table in game.prize_tables:
print(table.title, len(table.data), "tiers")
print(table.headers)
# Typed error handling — catch NotFound for an invalid game path.
try:
client.games.get(game_path="nonexistent-game-xyz")
except NotFound as exc:
print(f"Game not found: {exc}")
print("exercised: statesummaries.list / state.results / games.get / NotFound error")
Returns all US states and territories that have lottery coverage on the site. Each entry provides a display name and a URL slug. The slug is the required input for get_state_results. The list is stable (rarely changes) and contains ~47 entries.
No input parameters required.
{
"type": "object",
"fields": {
"states": "array of objects with keys: name (string, display name), slug (string, URL slug for use with get_state_results)"
},
"sample": {
"data": {
"states": [
{
"name": "California",
"slug": "california"
},
{
"name": "Texas",
"slug": "texas"
},
{
"name": "New York",
"slug": "new-york"
}
]
},
"status": "success"
}
}About the LotteryUSA API
Endpoints and Coverage
The API exposes three endpoints. list_states returns an array of all US states and territories covered by LotteryUSA.com, each with a name and slug field. That slug is the required input for get_state_results, which returns a games array containing each game's game_name, winning_numbers (broken down by value, type, and name), multiplier, draw_date, jackpot, and a game_url. The state field and an ISO 8601 last_updated timestamp are also included at the top level.
Prize Tables via get_game_prizes
get_game_prizes accepts a game_path string such as 'powerball', 'mega-millions', or a state-scoped path like 'california/super-lotto-plus'. It returns one or more prize_tables, each with a title, a headers array of column names, and a data array of row objects keyed by those headers. This structure captures prize tiers, per-tier odds, and multiplier breakdowns in a consistent tabular format regardless of the game.
Data Shape Notes
Winning numbers in get_state_results are typed objects rather than a flat list, so callers can distinguish main draw balls from bonus balls or special number types by the type and name fields. The multiplier field is separate from the numbers array, which makes it straightforward to handle games that optionally include a multiplier (e.g. Power Play, Megaplier). The game_url field points back to the source page and can be used to construct the correct game_path input for get_game_prizes.
The LotteryUSA API is a managed, monitored endpoint for lotteryusa.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when lotteryusa.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official lotteryusa.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display tonight's Powerball and Mega Millions winning numbers in a mobile app using
get_game_prizesandget_state_results - Build a multi-state lottery dashboard that iterates
list_statesslugs and fetches current jackpot amounts for each state - Alert users when a jackpot crosses a threshold by polling the
jackpotfield inget_state_resultson a schedule - Populate a prize breakdown table for a specific game using the
prize_tablesarray fromget_game_prizes - Track drawing dates and results history by logging
draw_dateandwinning_numbersfrom repeated calls toget_state_results - Compare odds across prize tiers for state-specific games using the structured
headersanddatafields fromget_game_prizes
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does LotteryUSA have an official developer API?+
What does get_state_results return for a state that runs multiple games?+
games array with one object per active lottery game in that state. Each object includes the game_name, typed winning_numbers, a multiplier value, the draw_date, the current jackpot amount, and a game_url. All results reflect the most recent drawing available for each game.Does the API return historical drawing results, not just the most recent ones?+
get_state_results returns results from the most recent drawings only, and get_game_prizes returns the current prize table structure. Historical drawing data across multiple dates is not covered. You can fork this API on Parse and revise it to add an endpoint that retrieves past drawing results by date range.Can I get ticket sales figures or the number of winners per prize tier?+
get_game_prizes endpoint covers prize amounts, odds, and multiplier details per tier, but winner counts or sales volume data are not included in the response. You can fork this API on Parse and revise it to add an endpoint targeting that detail.How do I construct the game_path input for get_game_prizes?+
'powerball' or 'mega-millions'. For state-specific games, prefix with the state slug from list_states, e.g. 'california/super-lotto-plus'. The game_url field returned by get_state_results can also be used to derive the correct path.