# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/usamega/`
**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 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/credits/usamega/get-drawing-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/usamega/get-game-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/usamega/get-jackpot-analysis \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/usamega/get-latest-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/usamega/get-odds \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"game":"<string>"}'
```

## Next steps

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