# Flashscore Scraper — Live Scores, Results, Odds & Standings (`innolabs/flashscore-scraper`) Actor

Flashscore scraper API: live scores, fixtures and results for football, basketball, hockey, tennis and 25 more sports, with stats, lineups, odds and standings. JSON/CSV/Excel.

- **URL**: https://apify.com/innolabs/flashscore-scraper.md
- **Developed by:** [Tristan Leroux](https://apify.com/innolabs) (community)
- **Categories:** Sports, Automation
- **Security:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Flashscore Scraper — Live Scores, Fixtures, Results, Odds & Standings

Get live scores, fixtures and results from Flashscore for football (soccer), basketball,
hockey, tennis and 25 more sports, with period-by-period scores, match statistics, lineups,
goals and cards, head-to-head, bookmaker odds and league standings. No login and no API key
needed — export the data as JSON, CSV or Excel, or pull it straight into your app through the
Apify API.

### What does Flashscore Scraper do?

Flashscore Scraper reads public Flashscore data and returns one clean record per match or
standings row. Pick a mode:

- **Matches by date** — every match of one day or a date range (up to 7 days back and 7
  days ahead) for the sports you pick: league and country, home and away team with ids and
  logos, start time (UTC, ISO 8601), status (scheduled, live, finished, postponed…), final
  score, score per half / quarter / period / set / inning, overtime and penalty-shootout
  scores, winner and round. Filter by status (fixtures, live, results) and by league or
  country name.
- **Live matches now** — matches in progress with the current score and the stage
  (e.g. `2nd Half`, `3rd Quarter`, `Overtime`).
- **Match details** — for Flashscore match URLs or ids: statistics (xG, possession, shots,
  corners, passes… per match and per half), lineups with formations, shirt numbers and
  player ratings, incidents (goals with assists, cards, substitutions, penalties), referee,
  venue and capacity, head-to-head and recent form of both teams, and odds from up to 20
  bookmakers.
- **Leagues** — for league URLs (Premier League, NBA, NHL, LaLiga, Euroleague…): the
  standings table (rank, played, wins, draws, losses, overtime/shootout wins and losses,
  goals, points, win %, form, promotion/relegation zone, next match; conference, division
  and group tables included) plus the season's results and fixtures.

Statistics, lineups, incidents, head-to-head and odds can be added to every match of every
mode with one checkbox each. Sports: football, basketball, hockey, tennis, American football,
baseball, volleyball, handball, rugby union, rugby league, cricket, darts, snooker, table
tennis, badminton, eSports, Aussie rules, futsal, floorball, bandy, water polo, field hockey,
beach volleyball, beach soccer, boxing, MMA, netball, pesäpallo and kabaddi.

Data is read live at run time, so a scheduled run always returns the current state.

### Use cases

- **Sports bettors and tipsters** — pull today's fixtures with 1X2 / moneyline, over/under
  and both-teams-to-score odds, opening prices, best price per outcome and head-to-head into
  a spreadsheet or model before kick-off.
- **Live score apps, widgets and bots** — poll live matches every minute and push score
  changes to your site, Discord, Slack or Telegram.
- **Sports data analysts and data scientists** — build historical datasets of results,
  period scores, xG and statistics across leagues and sports.
- **Fantasy, prediction and pick'em games** — fetch fixtures, results and standings to
  create and settle contests automatically.
- **Media, newsletters and club sites** — daily results digests, league tables and form
  guides for the leagues your audience follows.
- **AI agents and chatbots** — answer "what's the Premier League table?" or "who plays
  Arsenal next and what are the odds?" with a single actor call through MCP.

### How much does it cost?

You pay only for results (pay-per-event). Every match in the dataset is one `match`, every
standings row is one `standing`. Statistics, lineups, incidents, head-to-head and odds are
included in the match at no extra charge. Duplicates and items over your `maxItems` limit are
never charged. Prices in USD per 1,000 events:

| Event | What you pay for | Free plan | Paid plans (from) |
| --- | --- | --- | --- |
| `match` | one match (fixture, live or result) in the dataset | $1.50 per 1,000 | $1.00 per 1,000 (Gold+) |
| `standing` | one team row of a league standings table | $0.50 per 1,000 | $0.30 per 1,000 (Gold+) |

Bronze plan: `match` $1.30 and `standing` $0.40 per 1,000; Silver plan: $1.15 and $0.35
per 1,000.

Examples:

- Today's matches of a few football leagues with odds (about 40 matches) every day for a
  month ≈ 1,200 matches ≈ **$1.80** on the Free plan.
- A full Premier League season — all 380 results and fixtures plus the 20-team table —
  ≈ 380 × $1.00 / 1,000 + 20 × $0.30 / 1,000 ≈ **$0.39** on a Gold+ plan.

The Apify Free plan includes $5 monthly credit.

### How to use Flashscore Scraper

In Apify Console:

1. Open Flashscore Scraper and click **Try for free**.
2. Choose **What to scrape**. The form is prefilled with today's football matches.
3. Optional: pick more sports, change the date or date range, keep only fixtures, live
   matches or results, or type a league or country (e.g. `Premier League`, `NBA`).
4. For match details paste Flashscore match URLs or ids; for leagues paste league URLs such
   as `https://www.flashscore.com/football/england/premier-league/`.
5. Optional: tick **Add match details**, **Add head-to-head and form** or **Add bookmaker
   odds**.
6. Click **Start**. Most runs finish in a few seconds.
7. Open the **Output** tab and export the dataset as JSON, CSV, Excel or HTML.

Through the API:

1. Get your API token in Apify Console → Settings → Integrations.
2. Call the actor with your input JSON (see [Integrations and API](#integrations-and-api)).
3. Read the dataset items from the run.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `mode` | string | `matches` (by date, default), `live`, `details` or `tournaments` (leagues). |
| `sports` | array | Sports for `matches` and `live`: `football`, `basketball`, `hockey`, `tennis`, `american-football`, `baseball`, `volleyball`, `handball`, `rugby-union`, `rugby-league`, `cricket`, `darts`, `snooker`, `table-tennis`, `badminton`, `esports`, `aussie-rules`, `futsal`, `floorball`, `bandy`, `water-polo`, `field-hockey`, `beach-volleyball`, `beach-soccer`, `boxing`, `mma`, `netball`, `pesapallo`, `kabaddi`. Empty = football. |
| `dateFrom` | string | First day (UTC): `YYYY-MM-DD`, `today`, `yesterday`, `tomorrow` or `-3`/`+2`. Up to 7 days back/ahead. Default `today`. |
| `dateTo` | string | Last day, inclusive. Empty = single day. |
| `status` | string | `any` (default), `scheduled` (fixtures), `live` or `finished` (results). |
| `leagueQuery` | string | Keep leagues whose name or country contains this text, e.g. `Premier League`, `England`, `NBA`. |
| `matchUrls` | array | Match URLs or 8-character match ids for `details` mode. |
| `tournamentUrls` | array | League URLs for `tournaments` mode, e.g. `https://www.flashscore.com/basketball/usa/nba/`. Sub-pages (`/standings/`, `/results/`, `/fixtures/`) and past-season URLs work too. |
| `tournamentData` | array | `standings`, `results`, `fixtures` (default all three). |
| `maxMatchesPerTournament` | integer | Max results and max fixtures per league (default 100, 0 = standings only). |
| `includeDetails` | boolean | Add statistics, lineups, incidents, referee and venue to every match (always on in `details`). |
| `includeH2H` | boolean | Add head-to-head and the latest matches of both teams (always on in `details`). |
| `includeOdds` | boolean | Add bookmaker odds: match winner, over/under, both teams to score, best and average price (always on in `details`). |
| `oddsCountry` | string | Bookmaker country: `GB` (default, most bookmakers), `US` (NJ), `CA` (ON), `DE`, `FR`, `IT`, `ES`, `AU` and more. |
| `allOddsMarkets` | boolean | Also return every other market (half-time, handicaps, double chance, correct score…). |
| `maxItems` | integer | Hard cap on dataset items (default 1000; the form suggests 100). |

Example — today's and tomorrow's Premier League and NBA fixtures with odds:

```json
{
  "mode": "matches",
  "sports": ["football", "basketball"],
  "dateFrom": "today",
  "dateTo": "tomorrow",
  "status": "scheduled",
  "leagueQuery": "premier league",
  "includeOdds": true
}
```

Example — Premier League table, results and fixtures:

```json
{
  "mode": "tournaments",
  "tournamentUrls": ["https://www.flashscore.com/football/england/premier-league/"],
  "tournamentData": ["standings", "results", "fixtures"],
  "maxMatchesPerTournament": 400
}
```

Example — full details for one match:

```json
{
  "mode": "details",
  "matchUrls": ["https://www.flashscore.com/match/football/argentinos-jrs-QuxS0ahA/atl-tucuman-KpqpxWko/?mid=d2pRAfVg"]
}
```

### Output

Each item has a `type`: `match` or `standing`. A match from **Match details** (lists
shortened, real data from a run on 2026-11-03):

```json
{
  "type": "match",
  "id": "d2pRAfVg",
  "url": "https://www.flashscore.com/match/d2pRAfVg/",
  "sport": "football",
  "sportId": 1,
  "sportName": "Football",
  "startTime": "2026-11-03T00:15:00Z",
  "status": "finished",
  "statusDetail": "Finished",
  "country": "Argentina",
  "tournament": {
    "id": "j1MnZ14E",
    "stageId": "lEqmiyVI",
    "templateId": null,
    "name": "Liga Profesional - Clausura",
    "fullName": "ARGENTINA: Liga Profesional - Clausura",
    "category": "Argentina",
    "country": "Argentina",
    "countryId": 22,
    "url": "https://www.flashscore.com/football/argentina/liga-profesional/"
  },
  "round": "Round 15",
  "home": {
    "id": "KpqpxWko",
    "name": "Atl. Tucuman",
    "shortCode": "TUC",
    "country": null,
    "url": "https://www.flashscore.com/team/atl-tucuman/KpqpxWko/",
    "logo": "https://static.flashscore.com/res/image/data/0hFCl2f5-QitRwNMT.png",
    "eventParticipantId": "lbXorLlm"
  },
  "away": {
    "id": "QuxS0ahA",
    "name": "Argentinos Jrs",
    "shortCode": "ARG",
    "country": null,
    "url": "https://www.flashscore.com/team/argentinos-jrs/QuxS0ahA/",
    "logo": "https://static.flashscore.com/res/image/data/xplqslf5-CUuaFAMD.png",
    "eventParticipantId": "dOzftaJa"
  },
  "homeScore": 1,
  "awayScore": 2,
  "scoreRegularTime": {
    "home": 1,
    "away": 2
  },
  "scoreAfterOvertime": null,
  "scorePenalties": null,
  "periods": [
    {
      "period": 1,
      "label": "1st Half",
      "home": 0,
      "away": 2
    },
    {
      "period": 2,
      "label": "2nd Half",
      "home": 1,
      "away": 0
    }
  ],
  "winner": "away",
  "winnerName": "Argentinos Jrs",
  "redCards": null,
  "note": null,
  "lastUpdated": "2026-11-03T02:08:48Z",
  "info": {
    "referee": "Perez Y.",
    "venue": "Estadio Monumental Jose Fierro",
    "city": "Tucuman",
    "capacity": 35200
  },
  "incidents": [
    {
      "period": "1st Half",
      "minute": "30'",
      "side": "away",
      "type": "Goal",
      "score": "0-1",
      "reason": null,
      "participants": [
        {
          "type": "Goal",
          "name": "Gimenez M.",
          "id": "40Q5CqWD",
          "url": "https://www.flashscore.com/player/gimenez-matias/40Q5CqWD/"
        },
        {
          "type": "Assistance",
          "name": "Paredes F.",
          "id": "YwrH92fk",
          "url": "https://www.flashscore.com/player/paredes-franco/YwrH92fk/"
        }
      ]
    },
    {
      "period": "1st Half",
      "minute": "36'",
      "side": "home",
      "type": "Yellow Card",
      "score": null,
      "reason": "Foul",
      "participants": [
        {
          "type": "Yellow Card",
          "name": "Vallejo L.",
          "id": "8pzYZlSH",
          "url": "https://www.flashscore.com/player/vallejo-luciano/8pzYZlSH/"
        }
      ]
    }
  ],
  "statistics": [
    {
      "period": "Match",
      "group": "Top stats",
      "name": "Expected goals (xG)",
      "home": "1.15",
      "away": "0.33"
    },
    {
      "period": "Match",
      "group": "Top stats",
      "name": "Ball possession",
      "home": "48%",
      "away": "52%"
    },
    {
      "period": "Match",
      "group": "Top stats",
      "name": "Total shots",
      "home": "11",
      "away": "10"
    }
  ],
  "lineups": {
    "home": {
      "formation": "1-4-1-4-1",
      "players": [
        {
          "section": "Starting Lineups",
          "id": "bTfes3EB",
          "name": "Diaz L.",
          "number": 9,
          "country": "Argentina",
          "role": null,
          "rating": 5.8,
          "url": "https://www.flashscore.com/player/diaz-leandro/bTfes3EB/"
        }
      ]
    },
    "away": {
      "formation": "1-4-3-3",
      "players": [
        {
          "section": "Starting Lineups",
          "id": "IXwgU9lJ",
          "name": "Alvarez F.",
          "number": 16,
          "country": "Argentina",
          "role": null,
          "rating": 6.9,
          "url": "https://www.flashscore.com/player/alvarez-francisco/IXwgU9lJ/"
        }
      ]
    }
  },
  "h2h": {
    "homeLastMatches": [
      {
        "id": "ncabLF3j",
        "date": "2026-10-29T00:15:00Z",
        "tournament": "Copa Argentina",
        "country": "Argentina",
        "home": "Atl. Tucuman",
        "homeId": "KpqpxWko",
        "away": "Platense",
        "awayId": "80MMdBdN",
        "score": "1:2",
        "homeScore": 1,
        "awayScore": 2,
        "winner": "away",
        "result": "loss"
      }
    ],
    "awayLastMatches": [
      {
        "id": "AZ3wiuNN",
        "date": "2026-10-27T22:00:00Z",
        "tournament": "Liga Profesional",
        "country": "Argentina",
        "home": "Argentinos Jrs",
        "homeId": "QuxS0ahA",
        "away": "Ind. Rivadavia",
        "awayId": "Eg51aDC4",
        "score": "1:0",
        "homeScore": 1,
        "awayScore": 0,
        "winner": "home",
        "result": "win"
      }
    ],
    "headToHead": [
      {
        "id": "Mi2tRr24",
        "date": "2026-04-19T00:45:00Z",
        "tournament": "Liga Profesional",
        "country": "Argentina",
        "home": "Argentinos Jrs",
        "homeId": "QuxS0ahA",
        "away": "Atl. Tucuman",
        "awayId": "KpqpxWko",
        "score": "1:0",
        "homeScore": 1,
        "awayScore": 0,
        "winner": "home",
        "result": null
      }
    ]
  },
  "odds": {
    "country": "GB",
    "matchWinnerMarket": "home_draw_away/full_time",
    "matchWinner": [
      {
        "bookmaker": "10bet",
        "home": 2.82,
        "homeOpening": 3.1,
        "away": 2.64,
        "awayOpening": 2.35,
        "draw": 2.98,
        "drawOpening": 3.1
      },
      {
        "bookmaker": "Unibetuk",
        "home": 2.85,
        "homeOpening": 3.2,
        "away": 2.65,
        "awayOpening": 2.3,
        "draw": 3.0,
        "drawOpening": 3.0
      }
    ],
    "best": {
      "home": 2.87,
      "homeBookmaker": "Coral",
      "homeAverage": 2.751,
      "draw": 3.0,
      "drawBookmaker": "Unibetuk",
      "drawAverage": 2.949,
      "away": 2.7,
      "awayBookmaker": "bet365",
      "awayAverage": 2.628
    },
    "overUnder": [
      {
        "bookmaker": "10bet",
        "line": 2.5,
        "over": 2.45,
        "under": 1.53
      },
      {
        "bookmaker": "Unibetuk",
        "line": 2.5,
        "over": 2.55,
        "under": 1.5
      }
    ],
    "bothTeamsToScore": [
      {
        "bookmaker": "10bet",
        "yes": 2.0,
        "no": 1.73
      }
    ]
  },
  "scrapedAt": "2026-11-03T17:02:52.791106Z"
}
```

Matches from the date, live and league modes have the same fields without `info`,
`incidents`, `statistics`, `lineups`, `h2h` and `odds` unless you tick the matching
checkbox. `periods` holds the score per half, quarter, period, set or inning;
`winner` is `home`, `away` or `draw`.

A standings row:

```json
{
  "type": "standing",
  "id": "CfoA8Dmm::hA1Zm19f",
  "sport": "football",
  "sportId": 1,
  "sportName": "Football",
  "tournament": {
    "id": "SY30SsKF",
    "stageId": "CfoA8Dmm",
    "templateId": "dYlOSQOD",
    "name": "Premier League",
    "season": "2026/2027",
    "country": "England",
    "url": "https://www.flashscore.com/football/england/premier-league/"
  },
  "rank": 1,
  "group": null,
  "groupType": null,
  "team": {
    "id": "hA1Zm19f",
    "name": "Arsenal",
    "url": "https://www.flashscore.com/team/arsenal/hA1Zm19f/"
  },
  "matchesPlayed": 9,
  "wins": 8,
  "winsRegular": 8,
  "winsOvertime": 0,
  "winsPenalties": 0,
  "draws": 0,
  "losses": 1,
  "lossesRegular": 1,
  "lossesOvertime": 0,
  "lossesPenalties": 0,
  "goalsFor": 14,
  "goalsAgainst": 5,
  "goalDifference": 9,
  "points": 24,
  "winPercentage": null,
  "promotion": "Promotion - Champions League (League phase)",
  "form": "WWWWL",
  "nextMatch": {
    "id": "Eyc1EfPH",
    "date": "2026-11-07",
    "home": "Arsenal",
    "away": "Hull"
  },
  "url": "https://www.flashscore.com/football/england/premier-league/standings/",
  "scrapedAt": "2026-11-03T17:02:53.701600Z"
}
```

`form` lists the latest results newest first (`W`/`D`/`L`). Leagues with conferences,
divisions or groups return one row per team and table, with `group` and `groupType` set.

### Integrations and API

Run the actor from any language with the Apify API or client libraries, and connect it to
Make, Zapier, n8n, Google Sheets, Slack, Airbyte or webhooks. Schedule it (e.g. every
minute for live scores, every morning for fixtures) in Apify Console → Schedules.

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("innolabs/flashscore-scraper").call(run_input={
    "mode": "matches",
    "sports": ["football"],
    "dateFrom": "today",
    "leagueQuery": "england",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["startTime"], item["home"]["name"], item["homeScore"], "-", item["awayScore"], item["away"]["name"])
```

cURL (synchronous run, returns the items):

```bash
curl -X POST "https://api.apify.com/v2/acts/innolabs~flashscore-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode": "live", "sports": ["football", "basketball"]}'
```

The actor also works as a tool for AI agents through the Apify MCP server.

### FAQ

#### Which sports and leagues are covered?

29 sports with two sides per match — football, basketball, hockey, tennis, American
football, baseball, volleyball, handball, rugby, cricket, darts, snooker, table tennis,
badminton, eSports and more — and every league, cup and country Flashscore lists, from the
Premier League, NBA and NHL down to lower divisions and youth leagues. Golf, motorsport,
cycling, horse racing and winter sports (races and leaderboards) are not included.

#### How fresh is the data? Can I use it for live scores?

Every run reads Flashscore at that moment. Live mode returns the current score and stage;
schedule the actor every minute or two for a live feed. A typical run takes 1–5 seconds.

#### Do I need a proxy or a Flashscore account?

No. The data is public and the actor works without login or proxy. If requests ever start
failing in your region, switch on Apify Proxy in the input.

#### Which odds do I get?

Pre-match odds per bookmaker as shown on Flashscore for the country you pick (UK by
default): match winner (1X2 for football, moneyline incl. overtime for basketball, hockey
and US sports), over/under lines and both teams to score, each with the current and opening
price, plus the best and average price per outcome. Tick **All odds markets** for handicaps,
half-time, double chance, correct score and more.

#### Can I get older results or a whole season?

Matches by date go up to 7 days back and 7 days ahead. For older data use **Leagues** mode
with the league URL (or a past-season URL such as
`https://www.flashscore.com/football/england/premier-league-2024-2025/`) and raise
**Results / fixtures per league**.

#### Why are some statistics or lineups empty?

Flashscore publishes statistics and lineups only for matches and leagues it covers in
depth, and lineups usually appear about an hour before kick-off. Smaller leagues and
scheduled matches may have empty `statistics` or `lineups: null`.

### Limits

- Matches by date: 7 days back to 7 days ahead (UTC days, Flashscore's own day grouping).
- Live minute/clock is not included; the live stage (e.g. `2nd Half`, `3rd Quarter`) and
  the current score are.
- Statistics, lineups and odds depend on Flashscore's coverage of the league; cricket
  scores are runs only (no wickets/overs breakdown).
- Leagues mode returns the current stage's table (e.g. the regular season, or the current
  phase of a cup).
- One run handles thousands of matches; use `maxItems` to cap cost.

# Changelog

This Actor's version history is a separate document: https://apify.com/innolabs/flashscore-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Matches by date (fixtures, live scores and results for up to 15 days), live matches only, full details for specific matches, or leagues (standings table + results + fixtures).

## `sports` (type: `array`):

Sports for 'Matches by date' and 'Live matches now'. Empty = football.

## `dateFrom` (type: `string`):

First day to scrape (UTC): YYYY-MM-DD, 'today', 'yesterday', 'tomorrow' or a relative day such as -3 or +2. Up to 7 days back and up to 7 days ahead.

## `dateTo` (type: `string`):

Last day to scrape (inclusive), same formats as 'Date (from)'. Leave empty for a single day.

## `status` (type: `string`):

Keep only scheduled (fixtures), live or finished (results) matches. Finished includes walkovers, retirements and awarded matches.

## `leagueQuery` (type: `string`):

Optional case-insensitive filter on the league name or country, e.g. 'Premier League', 'England' or 'NBA'.

## `matchUrls` (type: `array`):

Flashscore match URLs (e.g. https://www.flashscore.com/match/football/argentinos-jrs-QuxS0ahA/atl-tucuman-KpqpxWko/?mid=d2pRAfVg) or 8-character match ids (e.g. d2pRAfVg). Every match item in this dataset has its id and url.

## `tournamentUrls` (type: `array`):

Flashscore league pages, e.g. https://www.flashscore.com/football/england/premier-league/ or https://www.flashscore.com/basketball/usa/nba/ (the /standings/, /results/ and /fixtures/ sub-pages work too). Past seasons work with their archive URL, e.g. .../premier-league-2024-2025/.

## `tournamentData` (type: `array`):

What to return for each league.

## `maxMatchesPerTournament` (type: `integer`):

Maximum results and maximum fixtures per league (newest results and nearest fixtures first). 0 = standings only.

## `includeDetails` (type: `boolean`):

Statistics (shots, possession, xG… per match and per period), lineups with formations, numbers and ratings, incidents (goals, assists, cards, substitutions), referee and venue.

## `includeH2H` (type: `boolean`):

Previous meetings of the two teams and each team's latest matches with scores and results.

## `includeOdds` (type: `boolean`):

Pre-match odds per bookmaker: match winner (1X2 or moneyline, current and opening), over/under lines and both teams to score, plus the best and average price.

## `oddsCountry` (type: `string`):

Bookmakers are country-specific. United Kingdom lists the most bookmakers; US odds are those offered in New Jersey, Canada's those in Ontario.

## `allOddsMarkets` (type: `boolean`):

Also return every other market per bookmaker: half-time 1X2, handicaps, double chance, draw no bet, correct score, odd/even and more (much larger items).

## `maxItems` (type: `integer`):

Hard cap on dataset items (matches and standings rows together). The run stops cleanly when reached.

## `proxyConfiguration` (type: `object`):

Not needed for normal use. Switch on Apify Proxy only if requests start failing.

## `debug` (type: `boolean`):

Verbose logs for development.

## Actor input object example

```json
{
  "mode": "matches",
  "sports": [
    "football"
  ],
  "dateFrom": "today",
  "status": "any",
  "tournamentData": [
    "standings",
    "results",
    "fixtures"
  ],
  "maxMatchesPerTournament": 100,
  "includeDetails": false,
  "includeH2H": false,
  "includeOdds": false,
  "oddsCountry": "GB",
  "allOddsMarkets": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All items produced by the run, one JSON object per record.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sports": [
        "football"
    ],
    "dateFrom": "today",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("innolabs/flashscore-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sports": ["football"],
    "dateFrom": "today",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("innolabs/flashscore-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sports": [
    "football"
  ],
  "dateFrom": "today",
  "maxItems": 100
}' |
apify call innolabs/flashscore-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,innolabs/flashscore-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0ONbGWApMnuzyBMeL/builds/nkv5iCrVbmThsCMEv/openapi.json
