US States API

Use the States API to retrieve all supported US jurisdictions (including "US" for National Games like Powerball) and their specific lottery games.

Authentication

Required

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

1. Get All Supported States

Returns a list of all supported states along with the count of active games per state.

GET/api/v1/states
Request Example
curl -X GET "https://uslotteryapi.com/api/v1/states" \
  -H "x-api-key: YOUR_API_KEY_HERE"
Response Payload Schema
{
  "status": "success",
  "data": [
    {
      "code": "US",
      "name": "National Games",
      "gameCount": 2,
      "isActive": true
    },
    {
      "code": "NY",
      "name": "New York",
      "gameCount": 9,
      "isActive": true
    }
  ],
  "meta": {
    "total": 2
  }
}

2. Get State Games Catalog

Returns a detailed catalog of all lottery games belonging to a specific state code.

GET/api/v1/states/[code]/games

Path Parameters

ParameterTypeDescription
code *stringState abbreviation (e.g., NY, CA, US).
Request Example
curl -X GET "https://uslotteryapi.com/api/v1/states/NY/games" \
  -H "x-api-key: YOUR_API_KEY_HERE"
Response Payload Schema
{
  "status": "success",
  "data": {
    "state": {
      "code": "NY",
      "name": "New York"
    },
    "games": [
      {
        "id": "new-york-lotto",
        "name": "New York Lotto",
        "category": "state",
        "schedule": "Wed, Sat",
        "hasHistoricalData": true,
        "recordCount": 1500
      }
    ]
  },
  "meta": {
    "total": 1
  }
}