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://uslotteryapi.com/api/v1
HTTPS Only

HTTP Status Codes Breakdown

US Lottery API relies on conventional HTTP response codes to indicate request outcome:

CodeStatusMeaning & Recommended Action
200OKRequest succeeded. Payload contains requested data.
400Bad RequestInvalid query parameters or unsupported game slug. Check syntax.
401UnauthorizedMissing or invalid x-api-key header. Verify API token.
429Too Many RequestsRate limit exceeded for your tier. Exponential backoff recommended.
500Internal Server ErrorUnexpected 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"
}