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

> Search teams and competitions, pull daily fixtures and live scores, and retrieve match details including events, statistics, and league standings from FlashScore.

**Category:** Sports | **Website:** [flashscore.com/](https://flashscore.com/) | **Docs:** [parse.bot/marketplace/463b4a3c-2c2a-4edb-9c14-d8df8d43eabe/flashscore-com-api](https://parse.bot/marketplace/463b4a3c-2c2a-4edb-9c14-d8df8d43eabe/flashscore-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-flashscore-com-api-463b4a3c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_leagues_standings

Fetch all fixtures for a given day, extract every unique competition worldwide (leagues, cups, knockout tournaments, group stages, playoff brackets — no exclusions), and retrieve standings/table data for each using batched parallel requests (~10 concurrent) with rate limiting and automatic retry with exponential backoff. For league competitions returns full standings tables. For group-stage competitions returns grouped mini-tables. For knockout/cup competitions attempts to retrieve bracket data with round names and match pairings. Competitions without available table or bracket data are included with data_type 'no_table' rather than being omitted. Every team across all competition types includes a team_logo_url from FlashScore's CDN. When top_leagues_only is true, only the top 50 globally prominent leagues are included, dramatically reducing upstream requests and cost.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today: 0=today, -1=yesterday, 1=tomorrow, etc. |
| `sport` | string | No | Sport name to fetch competition standings for. |
| `top_leagues_only` | boolean | No | When true, filters to top 50 globally prominent leagues (Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Champions League, MLS, Liga MX, etc.) before fetching standings. Reduces upstream requests significantly. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_all_leagues_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","sport":"<string>","top_leagues_only":"<boolean>"}'
```

### get_daily_fixtures

Retrieve all fixtures/matches for a given day across a sport. Returns match details including teams (with IDs), scores, competition info, and match status. Day offset controls which day relative to today (0=today, -1=yesterday, 1=tomorrow). Each match includes a match_id for drilling into details, events, statistics, or standings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today: 0=today, -1=yesterday, 1=tomorrow, etc. |
| `sport` | string | No | Sport name to fetch fixtures for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_daily_fixtures \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","sport":"<string>"}'
```

### get_daily_h2h_previews

Fetch all fixtures for a given day and enrich each match with the last 10 head-to-head encounters between the two teams. Each H2H entry includes FT scores (home_score, away_score), date, competition, country, match_id, home_team, away_team, and result (home_win/away_win/draw). Uses batched parallel fetching with rate limiting and automatic retry/exponential backoff. When limit is provided, only that many matches from the day are enriched with H2H. Without limit, all fixtures are processed — callers should use limit for days with many matches to avoid timeouts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today: 0=today, -1=yesterday, 1=tomorrow, etc. |
| `limit` | integer | No | Maximum number of matches to enrich with H2H data. Recommended for days with many fixtures to stay within timeout. |
| `sport` | string | No | Sport name to fetch fixtures and H2H for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_daily_h2h_previews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","limit":"<integer>","sport":"<string>"}'
```

### get_fixtures_with_odds

Retrieve daily fixtures merged with 1X2 match odds (home win, draw, away win). Combines the fixture feed (teams, competition, start time, status) with the odds overlay in a single response. Matches without available odds have null odds. Odds include current and opening values from the primary bookmaker.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today: 0=today, -1=yesterday, 1=tomorrow, etc. |
| `sport` | string | No | Sport name to fetch fixtures and odds for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_fixtures_with_odds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","sport":"<string>"}'
```

### get_league_standings

Get league standings/table for a competition identified by any match_id from that competition. Returns ranked teams with matches played, wins, draws, losses, goals, points, goal difference, and recent form. Returns input_not_found for cup/knockout tournaments that lack a traditional table.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID from the target competition. Use any match_id from get_daily_fixtures for a league competition. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_league_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_live_scores

Get current live scores and recently updated match results as incremental/delta updates. Returns matches with active score changes. Scores and status may be null for matches with no recent updates. The response size varies by time of day and sport — fewer matches during off-peak hours is normal.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sport` | string | No | Sport name to fetch live scores for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_live_scores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sport":"<string>"}'
```

### get_match_detail

Get detailed match information including final score, half-time score, match status, winner, and available data types. The available_data array contains codes indicating which sub-endpoints have content: 'ST' for statistics, 'LI' for lineups, 'HH' for head-to-head. Returns input_not_found for invalid match IDs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Obtainable from get_daily_fixtures or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_events

Get match timeline events including goals, assists, yellow/red cards, and substitutions with player details. Returns empty events array for matches that have not started yet. Match info (attendance, venue, referee) may be available before kickoff. Each event has a minute, team, type, and player.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_full_report

Comprehensive single-match report combining match detail, timeline events, full statistics (with period breakdown for 1st half, 2nd half, extra time), lineups, head-to-head (up to 20), each team's last 20 overall results, home-only and away-only form splits, league standings, and 1X2 odds — all in one request. Sections without data (e.g. lineups for unplayed matches) return null or empty arrays. Returns input_not_found for invalid match IDs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Obtainable from get_daily_fixtures or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_full_report \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_lineups

Get starting lineups and substitutes for both home and away teams in a match. Each player includes ID, name, jersey number, position (when known), and starter/substitute status. Coach/manager names are included when available. Only returns data when 'LI' is present in get_match_detail's available_data array — otherwise returns input_not_found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Use get_match_detail to verify 'LI' is in available_data before calling. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_lineups \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_odds

Get all available pre-match betting markets and odds for a football match from FlashScore's odds comparison section. Returns every available bookmaker and market including 1X2 (home/draw/away), Over/Under Goals (all lines), Both Teams To Score, Double Chance, Draw No Bet, Asian Handicap, European Handicap, Correct Score, Odd/Even, Half/Full Time, and more. Each market is grouped by type and scope (full time, first half, second half). Each bookmaker row includes current and opening odds for every selection. Markets without odds data return an empty array. Results are geo-dependent (US bookmakers by default).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Obtainable from get_daily_fixtures or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_odds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_preview

Match preview combining each team's last 10 results, their last 10 head-to-head encounters, and 1X2 market odds. Uses the H2H feed which provides overall form for both teams plus direct meetings. Odds may be null for matches without bookmaker coverage or matches that have already finished. Each form/H2H entry includes date, teams, score, result (win/loss/draw from the perspective of the featured team), competition, and country.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Obtainable from get_daily_fixtures or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_preview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_match_statistics

Get comprehensive match statistics including xG, Ball Possession, Total Shots, Shots on/off Target, Corner Kicks, Passes, Tackles, Duels Won, Goalkeeper Saves, and more. Each stat item includes period (match, 1st_half, 2nd_half, extra_time), category (top_stats, shots, attack, passes, defense, goalkeeping), and home/away values. Returns input_not_found if statistics are not available — check get_match_detail's available_data for 'ST' first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | FlashScore match ID. Use get_match_detail to verify 'ST' is in available_data before calling. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_match_statistics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### get_player_results

Get a player's recent match history with per-match performance stats. Resolves the player's current team from their profile, fetches the team's paginated results (40 per page, most recent first), then enriches each match with the player's individual stats from match events — goals, assists, yellow/red cards, substitution times. Minutes played is estimated from sub events when available. Rating is reserved for future availability. The player_id and player_slug are obtainable from the search endpoint (type 'PlayerInTeam').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1 = most recent results, each page returns up to 40 matches). |
| `player_id` | string | Yes | FlashScore player ID (e.g. 'UmV9iQmE'). Obtainable from search results. |
| `player_slug` | string | Yes | URL slug for the player (e.g. 'haaland-erling'). Obtainable from search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_player_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","player_id":"<string>","player_slug":"<string>"}'
```

### get_prioritized_fixtures

Retrieve fixtures for a given day ordered by league prominence: globally top leagues (Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Champions League, Europa League, MLS, Brasileirao, Liga MX, etc.) appear first, then remaining minor/lower leagues fill the rest. Returns match fields including match_id, status, start_time, home_team, away_team, score, and competition. When limit is omitted, matches are progressively enriched with H2H history in chunks of 10 (top-league first) using retry with exponential backoff and per-chunk timeout guards. Only matches whose H2H was successfully fetched are included in the response — matches that timed out or failed are excluded. The response includes total_fixtures (all fixtures found for the day), enriched_matches (how many were successfully enriched), and remaining_matches (how many could not be enriched within the time budget). When limit is provided, that many matches are returned immediately with empty h2h arrays and no enrichment for fast performance. Response includes top_league_matches and backfill_matches counts indicating the league-tier split among returned matches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today: 0=today, -1=yesterday, 1=tomorrow, etc. |
| `limit` | integer | No | Maximum number of matches to return. Top-league matches fill first, then minor leagues backfill. When provided, matches are returned without H2H enrichment for fast performance. Omitting triggers progressive chunked H2H enrichment. |
| `sport` | string | No | Sport name to fetch fixtures for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_prioritized_fixtures \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","limit":"<integer>","sport":"<string>"}'
```

### get_team_results

Get past match results for any team by their FlashScore team ID and slug. Returns paginated results (40 per page) ordered from most recent to oldest. Each result includes match_id, date, competition name, home team, away team, and final score. Use page parameter to fetch older results. The team_id and team_slug are obtainable from the search endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1 = most recent results, each page returns up to 40 matches). |
| `team_id` | string | Yes | FlashScore team ID (e.g. 'YFCpigVG'). Obtainable from search results. |
| `team_slug` | string | Yes | URL slug for the team (e.g. 'rapid-bucuresti'). Obtainable from search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/get_team_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","team_id":"<string>","team_slug":"<string>"}'
```

### search

Full-text search across teams, players, and tournaments for any sport on FlashScore. Returns matching entities with IDs usable in other endpoints. Minimum 2-character query. Results include entity type, sport, gender, and country. An optional sport filter narrows by sport.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query (minimum 2 characters). Can be team name, player name, or tournament name. |
| `sport` | string | No | Filter results by sport. Omitting returns results across all sports. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-flashscore-com-api-463b4a3c/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","sport":"<string>"}'
```
