Skip to content
USA LotteryResults API
Docs

Getting started

From subscribing on RapidAPI to running in production.

Subscribe on RapidAPI

Sign in to RapidAPI, open USA Lottery Result (All State) API and pick a plan on the pricing page. The Basic plan is free and includes 500 requests a month. RapidAPI then shows your key in the playground and in your app's security settings.

Base URL

https://usa-lottery-result-all-state-api.p.rapidapi.com/

All endpoints are GET, return application/json and require HTTPS.

Authentication

Send two headers with every request. Keep the key on your server; never put it in a browser or mobile app.

HeaderValue
x-rapidapi-keyYour RapidAPI application key
x-rapidapi-hostusa-lottery-result-all-state-api.p.rapidapi.com
curl --request GET \
	--url 'https://usa-lottery-result-all-state-api.p.rapidapi.com/lottery-results/states' \
	--header 'x-rapidapi-host: usa-lottery-result-all-state-api.p.rapidapi.com' \
	--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'

Quota & limits

Every call counts as one request against your plan's monthly quota. All plans have a hard limit: when the quota is used up, requests are refused until the next billing month or until you upgrade. The free Basic plan also allows at most 1,000 requests an hour. RapidAPI's usage dashboard shows how many requests you have left.

Response format

Every response uses the same envelope. Your data is always in data, either an object or an array.

{
  "status": "success",
  "message": "ok",
  "systemTime": 1762732800,
  "rowCount": 7,
  "data": [ … ]
}
FieldMeaning
statussuccess or failure
messageHuman-readable message
systemTimeServer Unix time of the response
rowCountNumber of rows in data

Errors

Check the HTTP status first. On an API-level failure, status is failure and message explains why.

HTTPMeaningWhat to do
400Missing or invalid parameterCheck that state is a two-letter code and gameID is a number
401 / 403Key missing or wrong, or no active subscriptionSend both RapidAPI headers and subscribe to a plan, even the free one
429Monthly quota used up or hourly limit reachedWait, cache more, or move to a larger plan
5xxTemporary service problemRetry with backoff

IDs & workflow

stateCode comes from State List and drives State Game List. gameID is the id in State Game List and drives every game endpoint. drawID comes from Past Draws and opens a specific draw in Drawing Result.

Multi-state games have one gameID per selling state; statesWithMultiDraws lists the states that share the same draw. The historical endpoints use their own gameIDs from the historical Game List.

History coverage

Past Draws covers the last 365 days of every game. The historical endpoints (Game List and Historical Data Result) hold older results, up to 13 November 2023.

Dates & timezones

drawDate and drawTime are in the game's local time; drawTimezone holds the IANA zone, such as America/New_York. Use drawTimestamp (Unix seconds) to compare draws across states. claimDeadline is the number of days a winner has to claim.

Protect your key

Call the API from your own server and pass only the data on to your users. Store the key in an environment variable, not in your code repository. If a key leaks, generate a new one in your RapidAPI app settings; the old key stops working.

Caching

Lottery results change only after a draw. Cache State List and game lists for a day, and fetch Drawing Result a few minutes after each game's drawTime. A single-state results site fits comfortably in the Pro plan this way.