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

> Access MLB player news, statistics, projected lineups, and betting props from RotoWire. Search for players by name, retrieve season stats and performance projections, browse weekly lineup predictions, and explore player prop odds across multiple sportsbooks.

**Category:** Sports | **Website:** [rotowire.com/](https://rotowire.com/) | **Docs:** [parse.bot/marketplace/d6f2d48a-957a-4c95-99b2-64c1794d931c/rotowire-com-api](https://parse.bot/marketplace/d6f2d48a-957a-4c95-99b2-64c1794d931c/rotowire-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-rotowire-com-api-d6f2d48a/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_baseball_news

Extract the latest baseball player news from RotoWire including real-time updates, injury reports, and lineup changes. Returns up to ~25 news items per call with player names, teams, headlines, body text, and injury status. No input parameters; always returns the current news feed.

**Estimated cost:** Metered

_No parameters required._

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

### get_player_details

Get detailed information for a specific MLB player including date of birth, team, and position. The player_id slug can be obtained from search_players results by extracting the last path segment from the link field (e.g. 'aaron-judge-12959').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Player identifier slug from search_players results link field (e.g. 'aaron-judge-12959'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rotowire-com-api-d6f2d48a/get_player_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_player_props

Extract all available MLB player props (betting odds) from the RotoWire betting page. Returns moneyline props for hits, home runs, RBIs, stolen bases, and pitcher wins across multiple sportsbooks. Optionally filter by player name for targeted lookups. Props are available only on game days.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_name` | string | No | Optional player name to filter results (case-insensitive partial match). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rotowire-com-api-d6f2d48a/get_player_props \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_name":"<string>"}'
```

### get_player_stats

Retrieve detailed fantasy baseball statistics and performance projections from RotoWire. Returns batting or pitching stats for a given season including averages, home runs, RBIs, and more. The data comes from RotoWire's projections system and covers hundreds of players.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `position` | string | No | Position filter. 'B' for batters, 'P' for pitchers. |
| `season` | string | No | Season year for stats or projections. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rotowire-com-api-d6f2d48a/get_player_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"position":"<string>","season":"<string>"}'
```

### get_weekly_lineups

Fetches predicted MLB lineups for the next 7 days. Each day contains a list of games with away and home team lineups including player names, positions, and profile URLs. Results are projected lineups that may change as game time approaches.

**Estimated cost:** Metered

_No parameters required._

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

### search_players

Search for MLB players by name on RotoWire. Returns matching players with their ID, team, position, and profile URL. Useful for discovering player_id slugs needed by get_player_details. Requires a minimum 2-character query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Player name to search for (minimum 2 characters). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-rotowire-com-api-d6f2d48a/search_players \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
