# ESPN — 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 live scores, schedules, standings, teams, rosters, athlete profiles, game logs, and league news across major sports from ESPN.

**Category:** Sports | **Website:** [espn.com/](https://espn.com/) | **Docs:** [parse.bot/marketplace/ab644963-f560-41a5-941e-29db2fc4fc61/espn-com-api](https://parse.bot/marketplace/ab644963-f560-41a5-941e-29db2fc4fc61/espn-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-espn-com-api-ab644963/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_athlete_gamelog

Get game-by-game stats for an athlete with monthly breakdowns, totals, and averages. Stats labels are sport-specific. Each game includes opponent, result, score, and full stat line.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `athlete_id` | string | Yes | Athlete ID obtained from search endpoint results[*].id or get_team_roster endpoint athletes[*].id |
| `league` | string | Yes | League identifier. |
| `season` | string | No | Season year (e.g., 2026). When omitted, returns current season gamelog. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_athlete_gamelog \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"athlete_id":"<string>","league":"<string>","season":"<string>"}'
```

### get_athlete_overview

Get comprehensive athlete data including season/career stats, fantasy projections, recent news, awards, and expert analysis. Stats labels are sport-specific. Fantasy data may be absent for non-fantasy leagues.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `athlete_id` | string | Yes | Athlete ID obtained from search endpoint results[*].id or get_team_roster endpoint athletes[*].id |
| `league` | string | Yes | League identifier. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_athlete_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"athlete_id":"<string>","league":"<string>"}'
```

### get_athlete_profile

Get detailed athlete profile including biographical info, team, injuries, contracts, and status. Returns physical attributes, career timeline, and current team assignment.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `athlete_id` | string | Yes | Athlete ID obtained from search endpoint results[*].id or get_team_roster endpoint athletes[*].id |
| `league` | string | Yes | League identifier. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_athlete_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"athlete_id":"<string>","league":"<string>"}'
```

### get_news

Get latest news articles and headlines for a specific league. Returns articles with full metadata including categories, images, and links.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league` | string | Yes | League identifier. |
| `limit` | integer | No | Number of articles to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league":"<string>","limit":"<integer>"}'
```

### get_scoreboard

Get live scores, final results, and upcoming fixtures for any supported league. Returns match details including scores, venues, broadcasts, leaders, odds, and recaps. Each event includes competitor details with team records, leaders, and broadcasting info.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dates` | string | No | Date filter in YYYYMMDD format (e.g., 20260424). When omitted, returns current day's events. |
| `league` | string | Yes | League identifier. |
| `limit` | integer | No | Maximum number of events to return. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_scoreboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dates":"<string>","league":"<string>","limit":"<integer>"}'
```

### get_standings

Get current standings/rankings for a league, organized by conference/division with full statistics. Season type '2' returns regular season division breakdown, '3' returns postseason/playoff standings. When omitted, returns summary standings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league` | string | Yes | League identifier. |
| `season` | string | No | Season year (e.g., 2026). When omitted, returns current season standings. |
| `season_type` | string | No | Season type filter. Use '2' for regular season division breakdown, '3' for postseason/playoff standings. When omitted, returns summary standings. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league":"<string>","season":"<string>","season_type":"<string>"}'
```

### get_team_roster

Get full roster for a team including player profiles, injuries, and contract details. Each athlete includes biographical info, position, physical attributes, and current status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league` | string | Yes | League identifier. |
| `team_id` | string | Yes | Team ID obtained from get_teams endpoint teams[*].id or search endpoint results[*].id |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/get_team_roster \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league":"<string>","team_id":"<string>"}'
```

### get_teams

Get all teams for a given league with IDs, names, logos, and links. Returns a complete roster of teams participating in the specified league.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league` | string | Yes | League identifier. |

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

### search

Search for athletes and teams across all sports. Returns matching results with IDs for use in other endpoints. When type filter is specified, only results of that type are returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum results to return. |
| `query` | string | Yes | Search query (player name, team name, etc.) |
| `type` | string | No | Filter results by type. Accepted values: 'player', 'team'. When omitted, searches both players and teams. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espn-com-api-ab644963/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>","type":"<string>"}'
```
