# Usamega — 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 Mega Millions and Powerball results, jackpot amounts, and winning odds all in one place. Analyze drawing details and tax implications to make smarter lottery decisions.

**Category:** Finance & Markets | **Website:** [usamega.com/](https://usamega.com/) | **Docs:** [parse.bot/marketplace/89e88cf0-d32d-4e8a-9938-2dc21365337d/usamega-com-api](https://parse.bot/marketplace/89e88cf0-d32d-4e8a-9938-2dc21365337d/usamega-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-usamega-com-api-89e88cf0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_drawing_details

Retrieves the detailed prize breakdown for a specific drawing date, including winning numbers, jackpot summary (annuity and cash values), and per-tier winner counts and prize amounts. Multiple prize tables may be returned (e.g. all states, California-only, Double Play).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day` | string | Yes | Drawing day of month (e.g. '9'). |
| `game` | string | Yes | Game identifier. Accepted values: 'mega-millions', 'powerball'. |
| `month` | string | Yes | Drawing month as a number (e.g. '6' for June). |
| `year` | string | Yes | Drawing year (e.g. '2026'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-usamega-com-api-89e88cf0/get_drawing_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day":"<string>","game":"<string>","month":"<string>","year":"<string>"}'
```

### get_game_results

Retrieves historical drawing results for a specific lottery game. Returns the most recent drawings with winning numbers, bonus ball, multiplier, jackpot amount, and a relative URL to the drawing detail page. Results are ordered newest-first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game` | string | Yes | Game identifier. Accepted values: 'mega-millions', 'powerball'. |
| `max_results` | integer | No | Maximum number of historical drawings to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-usamega-com-api-89e88cf0/get_game_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game":"<string>","max_results":"<integer>"}'
```

### get_jackpot_analysis

Retrieves state-by-state jackpot analysis showing estimated net payouts after federal and state taxes for both the annuity and cash lump-sum options. Covers all participating US states and territories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game` | string | Yes | Game identifier. Accepted values: 'mega-millions', 'powerball'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-usamega-com-api-89e88cf0/get_jackpot_analysis \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game":"<string>"}'
```

### get_latest_results

Fetches current winning numbers and next jackpot amounts for all games (Mega Millions and Powerball) from the homepage. Returns the most recent drawing numbers, bonus ball, multiplier, Double Play (Powerball only), and the next scheduled jackpot with annuity and cash values.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-usamega-com-api-89e88cf0/get_latest_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_odds

Retrieves prize tiers with odds of winning and the drawing schedule for a specific lottery game. Each tier shows the match criteria, prize amount, and probability.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game` | string | Yes | Game identifier. Accepted values: 'mega-millions', 'powerball'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-usamega-com-api-89e88cf0/get_odds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"game":"<string>"}'
```
