# Soccerstats — 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 comprehensive soccer statistics including live league tables, match details, team performance metrics, and form rankings across multiple football leagues. Search for specific teams and analyze their season statistics, head-to-head records, and competitive standings to stay informed on the latest soccer data.

**Category:** Sports | **Website:** [soccerstats.com/](https://soccerstats.com/) | **Docs:** [parse.bot/marketplace/e19f57cb-ba44-4dc4-847f-f3ed4f538e49/soccerstats-com-api](https://parse.bot/marketplace/e19f57cb-ba44-4dc4-847f-f3ed4f538e49/soccerstats-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-soccerstats-com-api-e19f57cb/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_available_leagues

Retrieve the full list of available leagues and competitions covered by SoccerSTATS.com. Returns league name, slug identifier, and URL for each competition. The slug is used as the league_slug parameter in all other endpoints.

**Estimated cost:** Metered

_No parameters required._

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

### get_league_form_table

Retrieve the form table for a league showing recent form sequences, points, and opponent strength over the last few matches. Each row contains position, team name, GP, W, D, L, GF, GA, GD, Pts, and opponents PPG.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug (e.g. 'england', 'spain') |

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

### get_league_matches

Retrieve all matches for a league season ordered by date. Returns date, home team, away team, score, half-time score, and match_id for use with get_match_stats.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug (e.g. 'england', 'spain', 'germany') |

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

### get_league_overview

Retrieve the main overview page for a league by league slug. Returns current season summary including league name, matches played, and average goals per match.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug from get_available_leagues (e.g. 'england', 'spain', 'germany') |

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

### get_league_stats_table

Retrieve specific statistical tables for a league such as Both Teams To Score, Clean Sheets, or Corners rankings. Returns rows with team name and relevant stat counts and percentages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug (e.g. 'england', 'spain') |
| `stat_type` | string | No | Stat type code: 'p' (Both Teams To Score), 'y' (Clean Sheets), 'cr' (Corners), 'g' (Streaks), 'z' (Failed To Score) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soccerstats-com-api-e19f57cb/get_league_stats_table \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league_slug":"<string>","stat_type":"<string>"}'
```

### get_league_table

Retrieve the full standings/league table for a given league. Supports historical seasons by appending the year to the slug (e.g. 'england_2024'). Returns an array of team rows with columns like GP, W, D, L, GF, GA, GD, Pts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug, optionally with year suffix for historical seasons (e.g. 'england', 'england_2024', 'spain') |

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

### get_match_stats

Retrieve statistics for a specific match. Returns match title, league, and available stat sections (domination, corners, timing) when present on the page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug (e.g. 'england', 'spain') |
| `match_id` | string | Yes | Match ID obtained from get_league_matches results (e.g. '1-1-2-2026') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-soccerstats-com-api-e19f57cb/get_match_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league_slug":"<string>","match_id":"<string>"}'
```

### get_team_season_stats

Retrieve comprehensive performance data for a team within a league. The team_id must be constructed as 'u{numeric_id}-{team-slug}' where numeric_id is obtained from the search_team endpoint. Returns streaks, seasonal stats, historical comparisons, and vs-league-average data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_slug` | string | Yes | League identifier slug (e.g. 'england', 'spain') |
| `team_id` | string | Yes | Team ID in format 'u{numeric_id}-{team-slug}' where numeric_id comes from search_team endpoint (e.g. 'u324-arsenal' where 324 is from search_team) |

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

### search_team

Search for a team by name across all leagues. Returns matching teams with their display name (including league in parentheses) and numeric team_id. The team_id should be used with get_team_season_stats in the format 'u{team_id}-{team-slug}'.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Team name to search for (e.g. 'arsenal', 'barcelona', 'bayern') |

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