API Endpoints Reference
Complete RESTful API reference for the US Lottery API engine. All requests are served over HTTPS with JSON response payloads.
Base Endpoint URL
HTTPS Onlyhttps://uslotteryapi.com/api/v1
Available REST Endpoints
GET/api/v1/draws/latest
View Specification →Fetch the most recent certified winning numbers, multipliers, power balls, and draw date for any supported lottery game.
GET/api/v1/draws/history
View Specification →Query historical draw archives filtered by date ranges, year, or page index. Search up to 20+ years of draw history.
GET/api/v1/jackpots/current
View Specification →Retrieve real-time estimated annuity jackpot amounts, cash option values, and rollover counts for major lotteries.
GET/api/v1/draws/next
View Specification →Get the countdown timer, exact drawing time, ticket purchase cutoff time, and next draw date.
HTTP Status Codes Breakdown
US Lottery API relies on conventional HTTP response codes to indicate request outcome:
| Code | Status | Meaning & Recommended Action |
|---|---|---|
| 200 | OK | Request succeeded. Payload contains requested data. |
| 400 | Bad Request | Invalid query parameters or unsupported game slug. Check syntax. |
| 401 | Unauthorized | Missing or invalid x-api-key header. Verify API token. |
| 429 | Too Many Requests | Rate limit exceeded for your tier. Exponential backoff recommended. |
| 500 | Internal Server Error | Unexpected API engine error. Contact support if issue persists. |
Standard Error Payload Schema
Non-200 responses return a JSON object with details on why the request failed:
Error Response JSON
// Standard JSON Error Response Payload
{
"status": "error",
"code": 401,
"error_type": "UNAUTHORIZED",
"message": "Invalid or missing API key in 'x-api-key' header.",
"timestamp": "2026-08-03T01:50:00Z",
"request_id": "req_9f8e7d6c5b4a"
}