State List
Every jurisdiction covered by the API, with its two-letter code, lottery tax rate and minimum legal playing age. Start here: stateCode is the key for State Game List.
no parameters
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'const res = await fetch("https://usa-lottery-result-all-state-api.p.rapidapi.com/lottery-results/states", {
method: "GET",
headers: {
"x-rapidapi-key": process.env.RAPIDAPI_KEY,
"x-rapidapi-host": "usa-lottery-result-all-state-api.p.rapidapi.com"
}
});
const json = await res.json();
console.log(json.data);$ch = curl_init("https://usa-lottery-result-all-state-api.p.rapidapi.com/lottery-results/states");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"x-rapidapi-host: usa-lottery-result-all-state-api.p.rapidapi.com",
"x-rapidapi-key: " . getenv("RAPIDAPI_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true)["data"];import os, requests
r = requests.get(
"https://usa-lottery-result-all-state-api.p.rapidapi.com/lottery-results/states",
params={},
headers={
"x-rapidapi-key": os.environ["RAPIDAPI_KEY"],
"x-rapidapi-host": "usa-lottery-result-all-state-api.p.rapidapi.com",
},
)
print(r.json()["data"])Response fields
| Field | Type | Meaning |
|---|---|---|
state | string | Full name, e.g. Florida |
stateCode | string | Two-letter code, e.g. FL |
slug | string | URL-friendly name |
taxRate | string | State tax rate on lottery winnings, % |
minimumLegalAge | int | Minimum age to buy a ticket |