# Stathead — 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.

> Search and analyze NFL player performance on a game-by-game basis. Access detailed football statistics — passing, rushing, receiving, and more — filterable by season, team, game type, or statistical thresholds.

**Category:** Sports | **Website:** [stathead.com/](https://stathead.com/) | **Docs:** [parse.bot/marketplace/3f3f2896-3877-41ff-92dc-35a490e2bde0/stathead-com-api](https://parse.bot/marketplace/3f3f2896-3877-41ff-92dc-35a490e2bde0/stathead-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/stathead/`
**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

### Football player game finder

Retrieve game-by-game statistics for an NFL player from Pro-Football-Reference. Accepts either a player name (resolved via search) or a direct PFR player ID. Returns detailed per-game stats including passing (completions, attempts, yards, TDs, INTs, passer rating), rushing (attempts, yards, TDs), receiving (targets, receptions, yards, TDs), fumbles, and snap counts. When year is omitted, returns the full career game log. The game_type filter restricts to regular season or playoff games only.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `game_type` | string | No | Filter by game type. Accepted values: 'R' for regular season only, 'P' for playoffs only. If omitted, returns both regular season and playoff games. |
| `player` | string | No | Player name to search for (e.g., 'Patrick Mahomes'). Either player or player_id is required. When multiple players share a name, the first search result is used. |
| `player_id` | string | No | Pro-Football-Reference player ID (e.g., 'MahoPa00'). Either player or player_id is required. The ID format is typically the first four letters of the last name + first two of the first name + a two-digit disambiguator. |
| `year` | string | No | Season year to get game logs for (e.g., '2024'). If omitted, returns the career game log. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stathead/football-player-game-finder \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"game_type":"<string>","player":"<string>","player_id":"<string>","year":"<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.