# Calottery — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Check the latest California Lottery results for Powerball and Mega Millions, including up to 120 recent draws from 2025 and historical data for all available games. Search past winning numbers and game information across California's lottery draw games.

**Category:** Government & Public Data | **Website:** [calottery.com/](https://calottery.com/) | **Docs:** [parse.bot/marketplace/0e2d9caa-b91a-4ecc-a346-45ff1300439b/calottery-com-api](https://parse.bot/marketplace/0e2d9caa-b91a-4ecc-a346-45ff1300439b/calottery-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-calottery-com-api-0e2d9caa/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_draw_games_list

Returns all available California Lottery draw games with their numeric IDs. These IDs are required input for get_draw_game_past_results. The list is static and covers Powerball, Mega Millions, SuperLotto Plus, Fantasy 5, Daily 3, Daily 4, and Daily Derby.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-calottery-com-api-0e2d9caa/get_all_draw_games_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_draw_game_past_results

Fetch past draw results for any California Lottery draw game by its numeric game ID. Returns the most recent draw with full winning numbers and prize breakdowns, upcoming next draw information, and a paginated array of previous draws. Use page and page_size to control pagination over historical draws. The total number of available historical draws is returned in TotalPreviousDraws.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game_id` | integer | Yes | Numeric game ID identifying the draw game. Valid IDs: 12 (Powerball), 15 (Mega Millions), 8 (SuperLotto Plus), 10 (Fantasy 5), 9 (Daily 3), 14 (Daily 4), 11 (Daily Derby). |
| `page` | integer | No | Page number for pagination of previous draws. |
| `page_size` | integer | No | Number of previous draw results per page. Maximum 50. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-calottery-com-api-0e2d9caa/get_draw_game_past_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game_id":"<integer>","page":"<integer>","page_size":"<integer>"}'
```
