# Footystats — 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 football scores, team performance metrics, league standings, and head-to-head match statistics all in one place. Search teams and leagues to access detailed player stats, comprehensive analytics, and in-depth performance data across football competitions worldwide.

**Category:** Sports | **Website:** [footystats.org/](https://footystats.org/) | **Docs:** [parse.bot/marketplace/f86e936e-49e8-4880-b7a4-696d199e6da0/footystats-org-api](https://parse.bot/marketplace/f86e936e-49e8-4880-b7a4-696d199e6da0/footystats-org-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-footystats-org-api-f86e936e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_league_detailed_stats

Get league recent form table showing team performance over the last 6 matches. Returns form table entries with wins, draws, losses, goals, goal difference, points, and points per game. Also includes links to related stat pages when available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | League path (e.g. '/england/premier-league'). Obtain from get_leagues results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-footystats-org-api-f86e936e/get_league_detailed_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### get_league_overview

Get league overview including the full standings table. Returns league name, standings array (team rankings with match stats, goal difference, points, and points per game), and info metadata (nation, division, teams count).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | League path (e.g. '/england/premier-league'). Obtain from get_leagues results or search_teams_leagues results where category is 'league'. |

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

### get_league_player_stats

Get league player statistics: top scorers, assists leaders, and players with the most clean sheets. Each player entry includes name and stat value (goals/assists/clean sheets count as a string).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | League path (e.g. '/england/premier-league'). Obtain from get_leagues results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-footystats-org-api-f86e936e/get_league_player_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### get_leagues

List all football leagues available on FootyStats. Returns league metadata including name, country, slug, path, and full URL. The path field can be passed directly to get_league_overview, get_league_player_stats, or get_league_detailed_stats.

**Estimated cost:** Metered

_No parameters required._

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

### get_livescores

Get today's football match scores across all leagues. Returns an array of matches with home/away team names, scores, and status. Status values include 'FT' (full time), 'HT' (half time), numeric minute values for in-progress matches, 'Stats' for upcoming scheduled matches, and 'Scheduled' when no indicator is present.

**Estimated cost:** Metered

_No parameters required._

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

### get_match_stats

Get match statistics for a specific head-to-head fixture. Returns match title, score, team names, and detailed stats (possession, shots, cards, corners, fouls, xG) for both teams. Stats keys vary by match but values always map team names to their stat values.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | Match path ending in -h2h-stats (e.g. '/england/arsenal-fc-vs-tottenham-hotspur-fc-h2h-stats'). Obtain from search_teams_leagues results where category is 'match'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-footystats-org-api-f86e936e/get_match_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### get_team_stats

Get detailed team statistics for a single club. Returns win/draw/loss percentages, goals, possession, shots, fouls, and season totals — each broken down by overall, home, and away. The stats keys are open (vary by team/season) but each value carries overall/home/away splits.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | Yes | Team path starting with /clubs/ (e.g. '/clubs/arsenal-fc-59'). Obtain from search_teams_leagues results where category is 'club'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-footystats-org-api-f86e936e/get_team_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### search_teams_leagues

Full-text search across teams, leagues, and matches by keyword. Returns mixed results categorized as 'club', 'league', or 'match', each carrying a path usable with the corresponding detail endpoint (get_team_stats, get_league_overview, get_match_stats). Results are not paginated — one request returns all matches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'arsenal', 'premier league', 'barcelona'). |

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