Lotteries API

The core Lotteries API provides access to the master games catalog, global system statistics, and comprehensive queries for both the absolute latest draw results and paginated historical data.

Authentication

Required

All endpoints below require an active x-api-key header.

1. Master Games Catalog

Returns the catalog of all lottery games across the entire system with optional filtering.

GET/api/v1/lotteries/games

Query Parameters

ParameterTypeDescription
categorystringFilter by game category (e.g., national, state).
statestringFilter by state code (e.g., NY).
statusstringFilter by status (e.g., active, inactive).
Request Example
curl -X GET "https://uslotteryapi.com/api/v1/lotteries/games?status=active" \
  -H "x-api-key: YOUR_API_KEY_HERE"

2. System Statistics

Provides an overview of the entire lottery database, including total draw records, supported states, and a breakdown per game type.

GET/api/v1/lotteries/stats

3. Get All Latest Results

A high-performance endpoint returning the absolute most recent draw result for ALL supported lottery games in a single request payload.

GET/api/v1/lotteries/latest
Request Example
curl -X GET "https://uslotteryapi.com/api/v1/lotteries/latest" \
  -H "x-api-key: YOUR_API_KEY_HERE"

4. Search & Filter Draw History

Paginated endpoint to query the historical draw results database.

GET/api/v1/lotteries

Query Parameters

ParameterTypeDescription
typestringFilter by specific game slug (e.g., powerball).
fromstringStart draw date in format YYYY-MM-DD.
tostringEnd draw date in format YYYY-MM-DD.
pagenumberPage number for pagination. Default: 1.
page_sizenumberResults per page (max 100). Default: 20.
latestbooleanIf true, returns only the absolute latest result matching the criteria.
Request Example
curl -X GET "https://uslotteryapi.com/api/v1/lotteries?type=powerball&from=2026-01-01&page_size=5" \
  -H "x-api-key: YOUR_API_KEY_HERE"

5. Quick Results By Type

A shortcut endpoint for fetching the most recent N draws for a single game type without needing full query parameters.

GET/api/v1/lotteries/[type]

Example: /api/v1/lotteries/powerball?limit=10