# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-ballparkpal-com-api-17a1f9af/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-ballparkpal-com-api-17a1f9af/get_available_dates \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-ballparkpal-com-api-17a1f9af/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-ballparkpal-com-api-17a1f9af/get_most_likely \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","date":"<string>","limit":"<integer>","tab":"<string>"}'
```
