# Lotterypost — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 daily lottery results and jackpot amounts across 20+ US states and multi-state games, plus browse historical drawing data to track past winners and prize trends. Quickly compare results from multiple states or look up specific games all in one place.

**Category:** Other | **Website:** [lotterypost.com/](https://lotterypost.com/) | **Docs:** [parse.bot/marketplace/581e4d4a-6152-4199-92fa-a3c00f7cabd3/lotterypost-com-api](https://parse.bot/marketplace/581e4d4a-6152-4199-92fa-a3c00f7cabd3/lotterypost-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get historical results

Retrieve historical lottery drawings for a specific game. Use get_state_games first to find valid game slugs for a state. Can be filtered by year and month. Guest access is limited to past 1 year of results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game` | string | No | Game slug from get_state_games (e.g. lotto, pick3, megamillions, powerball, take5, numbers, win4, fantasy5). |
| `month` | string | No | Filter by month (1-12), requires year to be set. |
| `state` | string | No | Two-letter US state code (e.g. NY, CA, TX, FL, PA, IL, OH, GA, MI, NJ). |
| `year` | string | No | Filter by year (e.g. 2026). Must be within the past 1 year for guest access. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/get-historical-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"game":"<string>","month":"<string>","state":"<string>","year":"<string>"}'
```

### Get jackpots

Retrieve up-to-date jackpot amounts, changes, and next draw dates for all major lotteries worldwide, ranked by jackpot size. Includes multi-state US games and international lotteries.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/get-jackpots \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get multiple states results

Retrieve the latest lottery results for multiple states in a single request. Returns the same game result data as get_state_results for each state in the provided list. If no states specified, returns results for 20 default US states.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `states` | string | No | Comma-separated list of two-letter US state codes (e.g. NY,CA,TX,FL,PA). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/get-multiple-states-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"states":"<string>"}'
```

### Get state games

List available lottery games for a specific state to get their game slugs for use with get_historical_results. Each game includes a name, slug identifier, and numeric ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state` | string | No | Two-letter US state code (e.g. NY, CA, TX, FL, PA, IL, OH, GA, MI, NJ). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/get-state-games \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"state":"<string>"}'
```

### Get state results

Retrieve latest lottery results and next drawing/jackpot info for a specific state. Returns all games with their most recent drawing numbers, bonus numbers, and upcoming draw information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `state` | string | No | Two-letter US state code (e.g. NY, CA, TX, FL, PA, IL, OH, GA, MI, NJ). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/lotterypost/get-state-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"state":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.