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

> Get MLB prediction data including the most likely outcomes for batters, pitchers, teams, and games across 22 statistical categories with probability scores and betting lines. Search available dates and browse prediction categories to power your baseball analysis and betting decisions with simulation-based forecasts.

**Category:** Sports | **Website:** [www.ballparkpal.com/Matchups.php](https://www.ballparkpal.com/Matchups.php) | **Docs:** [parse.bot/marketplace/17a1f9af-5406-45b8-9f30-b3ff8d59133f/ballparkpal-com-api](https://parse.bot/marketplace/17a1f9af-5406-45b8-9f30-b3ff8d59133f/ballparkpal-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/ballparkpal/`
**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 available dates

Get the current date displayed, previous/next navigation dates, and last updated timestamp. Useful for programmatic date navigation to determine what dates have predictions available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Date in YYYY-MM-DD format to check. Defaults to today. |

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

### Get categories

Get the full list of 22 outcome categories and their tab groupings (batters, pitchers, teams, games). Use category IDs to filter get_most_likely results. This is a static lookup and does not fetch from the site.

**Estimated cost:** Metered

_No parameters required._

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

### Get most likely

Get most likely MLB outcomes for a given date, optionally filtered by tab (batters/pitchers/teams/games) and/or specific category. Returns player/team names, probabilities, betting prices, matchup details, and more. Without filters, returns all 22 categories (~500 rows). Pagination is not supported; use limit to cap results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Filter by category ID (1-22) or partial name match (e.g. 'HR', 'Quality Start'). Use get_categories endpoint for the full list of IDs and names. |
| `date` | string | No | Date in YYYY-MM-DD format. Defaults to today's date if omitted. |
| `limit` | integer | No | Maximum number of results to return. |
| `tab` | string | No | Filter by tab: 'batters', 'pitchers', 'teams', or 'games'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/ballparkpal/get-most-likely \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","date":"<string>","limit":"<integer>","tab":"<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.