# Football Scraper: Live Scores, Results, Lineups & Odds (`keelwright/football-scraper`) Actor

Football (soccer) live scores, results and fixtures for 1,000+ leagues from Flashscore, with optional goals and cards, lineups, match statistics with xG, head-to-head and bookmaker odds from about 30 countries.

- **URL**: https://apify.com/keelwright/football-scraper.md
- **Developed by:** [Keelwright](https://apify.com/keelwright) (community)
- **Categories:** Sports, Developer tools
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 matches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Football Scraper: live scores, results, lineups and odds

Get football (soccer) matches from Flashscore as clean JSON, CSV or Excel: live scores, results and fixtures for **1,000+ competitions in 100+ countries**, from the Premier League, LaLiga and the Champions League down to regional and youth leagues. Add **goals and cards minute by minute, lineups, match statistics with xG, head-to-head and odds from about 30 countries** when you need them.

- **Every match of the day in one request.** One run reads the whole daily list (often 1,000+ matches on a weekend), with Flashscore's top leagues listed first.
- **Scores the way football is played.** Half-time and second-half scores, the 90-minute score, extra time and penalty shootouts kept apart, red cards, and the team that went through in cup ties.
- **Live minute.** For live matches you get the running minute (`67'`, `45+`), plus the period.
- **Deep data on request.** Goalscorers with assists, cards with reasons, substitutions, formations, starting elevens with player ratings, xG, possession, shots, passes and 30 more statistics.
- **Odds comparison.** 1X2, over/under 2.5 and both teams to score from up to 20 bookmakers per country, with opening prices, best and average price and implied probabilities; optionally every market (handicaps, correct score, halves).
- **Only what changed.** Run it on a schedule and get only the matches whose score, status or red cards changed since the last run.

### What can I use football data for?

- **Live score apps, widgets and bots**: feed a website, Discord/Telegram bot or dashboard with scores and minute-by-minute events.
- **Betting models and odds research**: collect opening and current prices with xG, statistics, form and results to build and test models.
- **Fantasy, tipping and prediction games**: settle picks automatically from final scores, scorers, cards and penalty shootouts.
- **Sports analytics and journalism**: lineups, formations, player ratings and team statistics for match reports and scouting.
- **Alerts**: get notified (email, Slack, webhook) when your team kicks off, scores or gets a red card.

### How to scrape football matches

1. Click **Try for free**.
2. Choose the days: **Past days** for results, **Upcoming days** for fixtures, both at 0 for today only.
3. Optionally narrow down by **status** (live, finished, scheduled), **Top leagues only**, **competitions**, **countries** or **teams**.
4. Tick the **extra data** you need: goals and cards, statistics, lineups, head-to-head, odds.
5. Click **Start** and download the results as JSON, CSV, Excel or HTML, or read them through the API.

**Pick competitions** the way Flashscore names them: `England: Premier League`, `Spain: LaLiga`, `Germany: Bundesliga`, `Europe: Champions League`, or paste the competition URL from flashscore.com (for example `https://www.flashscore.com/football/england/premier-league/`). A name without a country matches that name in every country. If a name fits nothing, the run log suggests the closest names.

**Follow live matches:** set **Match status** to *Live*, turn on **Only new or changed matches** and [schedule](https://docs.apify.com/platform/schedules) the run every 1 to 5 minutes. Each run then returns only the matches whose score, status or red cards changed.

**Already know the matches?** Paste Flashscore match URLs (or their 8-character ids) into **Match URLs or ids**. Those rows always include goals, cards, substitutions, round, venue and referee.

### Input example

```json
{
    "daysAhead": 3,
    "competitions": ["England: Premier League", "Spain: LaLiga", "Europe: Champions League"],
    "includeLineups": true,
    "includeHeadToHead": true,
    "includeOdds": true,
    "oddsCountries": ["GB"],
    "maxItems": 200
}
```

### What data do you get?

Every row is one match.

| Field                                                             | What it holds                                                                                                                                                                                                                        |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `matchId`, `url`                                                  | Flashscore match id and link                                                                                                                                                                                                         |
| `status`, `statusDetail`, `resultType`                            | `scheduled`, `live`, `finished`, `interrupted`, `postponed`, `cancelled` or `abandoned`; the detail (e.g. *2nd Half*, *After Penalties*); `regular`, `extra-time`, `penalties`, `walkover` or `awarded`                              |
| `startTime`                                                       | Kick-off time (ISO 8601, UTC)                                                                                                                                                                                                        |
| `competition`                                                     | Name with stage (e.g. *Champions League - League phase*), country or region, ids and link                                                                                                                                            |
| `home`, `away`                                                    | Team name, three-letter code, Flashscore team id, link and logo                                                                                                                                                                      |
| `score`                                                           | Goals, text score (`2-1`, `1-1 (4-3 pen.)`, `3-2 (a.e.t.)`), first half, second half, 90 minutes, extra time and penalty shootout                                                                                                    |
| `winner`, `advanced`                                              | `home`, `away` or `draw`; in knockout ties, the team that went through                                                                                                                                                               |
| `redCards`                                                        | Red cards per team                                                                                                                                                                                                                   |
| `live`                                                            | While the match is live: the running minute                                                                                                                                                                                          |
| `note`                                                            | Flashscore's note, e.g. *Postponed due to bad weather* or *Neutral location*                                                                                                                                                         |
| `round`, `referee`, `venue`, `attendance`, `tvChannels`, `events` | With **Goals, cards and match info**: round (e.g. *Round 12*), referee, stadium with city and capacity, attendance, TV channels, and every goal (with assist and score), penalty, card (with reason), substitution and shootout kick |
| `statistics`                                                      | With **Match statistics**: about 35 statistics for the match and each half, including xG, xGOT, possession, shots, big chances, corners, passes, tackles, duels and saves                                                            |
| `lineups`                                                         | With **Lineups**: formation, team rating, coach, starting eleven and substitutes with shirt number, nationality, goalkeeper and captain marks and player rating                                                                      |
| `headToHead`                                                      | With **Head-to-head**: earlier meetings, each team's last 10 matches with result, and form strings such as `WWDLW`                                                                                                                   |
| `odds`                                                            | With **Bookmaker odds**: 1X2 per bookmaker (opening and current) with best, average and implied probability; over/under 2.5 and both teams to score; optionally all markets                                                          |

#### Output example

A row from the daily list:

```json
{
    "matchId": "2yMLTDQr",
    "url": "https://www.flashscore.com/match/football/2yMLTDQr/",
    "status": "finished",
    "statusDetail": "Finished",
    "resultType": "regular",
    "startTime": "2026-10-20T16:45:00.000Z",
    "competition": {
        "name": "Champions League - League phase",
        "country": "Europe",
        "id": "xGrwqq16",
        "seasonId": "tfRdlhP9",
        "stageId": "vT1iNRGq",
        "url": "https://www.flashscore.com/football/europe/champions-league/"
    },
    "home": {
        "id": "MsbmracL",
        "name": "Fenerbahce",
        "shortCode": "FEN",
        "participantId": "MR1IhODO",
        "url": "https://www.flashscore.com/team/fenerbahce/MsbmracL/",
        "logoUrl": "https://static.flashscore.com/res/image/data/drRgiLlC-llnQ8REs.png"
    },
    "away": {
        "id": "viXGgnyB",
        "name": "Slavia Prague",
        "shortCode": "SLA",
        "participantId": "CjsSCRbt",
        "url": "https://www.flashscore.com/team/slavia-prague/viXGgnyB/",
        "logoUrl": "https://static.flashscore.com/res/image/data/nsu4mohT-8nl9JmVC.png"
    },
    "score": {
        "home": 2,
        "away": 2,
        "text": "2-2",
        "firstHalf": {
            "home": 2,
            "away": 1
        },
        "secondHalf": {
            "home": 0,
            "away": 1
        },
        "regularTime": {
            "home": 2,
            "away": 2
        },
        "extraTime": null,
        "penalties": null
    },
    "winner": "draw",
    "advanced": null,
    "redCards": {
        "home": 0,
        "away": 0
    },
    "live": null,
    "note": null,
    "scrapedAt": "2026-10-21T13:20:44.582Z"
}
```

The same match with all extra data turned on (lists shortened with "…"):

```json
{
    "matchId": "2yMLTDQr",
    "url": "https://www.flashscore.com/match/football/2yMLTDQr/",
    "status": "finished",
    "statusDetail": "Finished",
    "resultType": "regular",
    "startTime": "2026-10-20T16:45:00.000Z",
    "competition": {
        "name": "Champions League - League phase",
        "country": "Europe",
        "id": "xGrwqq16",
        "seasonId": "tfRdlhP9",
        "stageId": "vT1iNRGq",
        "url": "https://www.flashscore.com/football/europe/champions-league/"
    },
    "round": "Round 3",
    "home": {
        "id": "MsbmracL",
        "name": "Fenerbahce",
        "shortCode": "FEN",
        "participantId": "MR1IhODO",
        "url": "https://www.flashscore.com/team/fenerbahce/MsbmracL/",
        "logoUrl": "https://static.flashscore.com/res/image/data/drRgiLlC-llnQ8REs.png"
    },
    "away": {
        "id": "viXGgnyB",
        "name": "Slavia Prague",
        "shortCode": "SLA",
        "participantId": "CjsSCRbt",
        "url": "https://www.flashscore.com/team/slavia-prague/viXGgnyB/",
        "logoUrl": "https://static.flashscore.com/res/image/data/nsu4mohT-8nl9JmVC.png"
    },
    "score": {
        "home": 2,
        "away": 2,
        "text": "2-2",
        "firstHalf": {
            "home": 2,
            "away": 1
        },
        "secondHalf": {
            "home": 0,
            "away": 1
        },
        "regularTime": {
            "home": 2,
            "away": 2
        },
        "extraTime": null,
        "penalties": null
    },
    "winner": "draw",
    "advanced": null,
    "redCards": {
        "home": 0,
        "away": 0
    },
    "live": null,
    "note": null,
    "referee": {
        "name": "De Burgos R.",
        "countryCode": "ESP"
    },
    "venue": {
        "name": "Chobani Stadium Fenerbahce Sukru Saracoglu",
        "city": "Istanbul",
        "capacity": 47430
    },
    "attendance": 40124,
    "tvChannels": null,
    "events": [
        {
            "period": "1st Half",
            "minute": 4,
            "addedTime": null,
            "minuteText": "4'",
            "team": "home",
            "type": "goal",
            "player": {
                "id": "YsDqjj95",
                "name": "Aydin O.",
                "url": "https://www.flashscore.com/player/aydin-oguz/YsDqjj95/"
            },
            "assist": {
                "id": "EqBuG0nE",
                "name": "Skriniar M.",
                "url": "https://www.flashscore.com/player/skriniar-milan/EqBuG0nE/"
            },
            "scoreAfter": "1-0"
        },
        {
            "period": "1st Half",
            "minute": 21,
            "addedTime": null,
            "minuteText": "21'",
            "team": "home",
            "type": "substitution",
            "player": {
                "id": "0p2cXdQ4",
                "name": "Peprah K.",
                "url": "https://www.flashscore.com/player/peprah-kojo/0p2cXdQ4/"
            },
            "playerOut": {
                "id": "6LBvaQoh",
                "name": "Ake N.",
                "url": "https://www.flashscore.com/player/ake-nathan/6LBvaQoh/"
            },
            "reason": "Injury"
        },
        {
            "period": "1st Half",
            "minute": 31,
            "addedTime": null,
            "minuteText": "31'",
            "team": "home",
            "type": "yellow-card",
            "player": {
                "id": "IkmsHsOR",
                "name": "Kante N.",
                "url": "https://www.flashscore.com/player/kante-n-golo/IkmsHsOR/"
            },
            "reason": "Tripping"
        },
        "…"
    ],
    "statistics": {
        "match": {
            "expectedGoals": {
                "home": 1.07,
                "away": 1.49
            },
            "ballPossession": {
                "home": 49,
                "away": 51
            },
            "totalShots": {
                "home": 15,
                "away": 15
            },
            "shotsOnTarget": {
                "home": 4,
                "away": 4
            },
            "bigChances": {
                "home": 2,
                "away": 3
            },
            "cornerKicks": {
                "home": 3,
                "away": 5
            },
            "passes": {
                "home": {
                    "percent": 82,
                    "successful": 341,
                    "total": 415
                },
                "away": {
                    "percent": 83,
                    "successful": 353,
                    "total": 425
                }
            },
            "…": "…"
        },
        "firstHalf": "…",
        "secondHalf": "…"
    },
    "lineups": {
        "home": {
            "formation": "4-2-3-1",
            "rating": 6.7,
            "coach": {
                "id": "zwnXom20",
                "name": "Kartal I.",
                "country": "Turkey",
                "url": "https://www.flashscore.com/player/kartal-ismail/zwnXom20/"
            },
            "startingLineup": [
                {
                    "id": "6LBvaQoh",
                    "name": "Ake N.",
                    "number": 15,
                    "country": "Netherlands",
                    "goalkeeper": false,
                    "captain": false,
                    "rating": 6.3,
                    "url": "https://www.flashscore.com/player/ake-nathan/6LBvaQoh/",
                    "formationPlace": 4
                },
                "…"
            ],
            "substitutes": [
                {
                    "id": "27Mq9DwT",
                    "name": "Cetin T.",
                    "number": 13,
                    "country": "Turkey",
                    "goalkeeper": true,
                    "captain": false,
                    "rating": null,
                    "url": "https://www.flashscore.com/player/cetin-tarik/27Mq9DwT/"
                },
                "…"
            ]
        },
        "away": "…"
    },
    "headToHead": {
        "meetings": [
            {
                "matchId": "GOf2vGtf",
                "date": "2024-11-28T20:00:00.000Z",
                "competition": "Europa League",
                "country": "Europe",
                "home": "Slavia Prague",
                "away": "Fenerbahce",
                "homeGoals": 1,
                "awayGoals": 2,
                "score": "1-2",
                "winner": "away"
            },
            "…"
        ],
        "homeRecent": [
            {
                "matchId": "0Ogw62Yh",
                "date": "2026-10-17T16:00:00.000Z",
                "competition": "Super Lig",
                "country": "Turkey",
                "home": "Fenerbahce",
                "away": "Alanyaspor",
                "homeGoals": 3,
                "awayGoals": 0,
                "score": "3-0",
                "winner": "home",
                "result": "win"
            },
            "…"
        ],
        "awayRecent": ["…"],
        "homeForm": "WLWWW",
        "awayForm": "DLWWW"
    },
    "odds": {
        "countries": ["GB", "IT"],
        "bookmakers": ["bet365", "BetMGM.uk", "Betfred", "…"],
        "matchResult": {
            "best": {
                "home": 1.67,
                "draw": 5.3,
                "away": 7.5
            },
            "average": {
                "home": 1.407,
                "draw": 5.036,
                "away": 6.735
            },
            "impliedProbability": {
                "home": 0.6719,
                "draw": 0.1877,
                "away": 0.1404
            },
            "bookmakers": 33,
            "byBookmaker": [
                {
                    "bookmaker": "bet365",
                    "home": 1.4,
                    "draw": 5.25,
                    "away": 7,
                    "homeOpening": 1.8,
                    "drawOpening": 3.7,
                    "awayOpening": 4.2
                },
                "…"
            ]
        },
        "overUnder25": {
            "best": {
                "over": 1.57,
                "under": 3
            },
            "average": {
                "over": 1.392,
                "under": 2.826
            },
            "impliedProbability": {
                "over": 0.67,
                "under": 0.33
            },
            "bookmakers": 32
        },
        "bothTeamsToScore": {
            "best": {
                "yes": 1.65,
                "no": 2.4
            },
            "average": {
                "yes": 1.572,
                "no": 2.28
            },
            "impliedProbability": {
                "yes": 0.5919,
                "no": 0.4081
            },
            "bookmakers": 30
        },
        "markets": [
            {
                "market": "asian-handicap",
                "period": "first-half",
                "bookmaker": "bet365",
                "selections": [
                    {
                        "selection": "home",
                        "odds": 1.23,
                        "opening": 1.45,
                        "active": true,
                        "line": 0
                    },
                    {
                        "selection": "away",
                        "odds": 4,
                        "opening": 2.68,
                        "active": true,
                        "line": 0
                    },
                    "…"
                ]
            },
            "…"
        ]
    },
    "scrapedAt": "2026-10-21T13:20:44.582Z"
}
```

### How much does it cost?

You pay only for the matches you get (pay per event); Apify platform usage is included.

| What                                                          | Price                   |
| ------------------------------------------------------------- | ----------------------- |
| Match from the daily list                                     | $3.00 per 1,000 matches |
| Match with extra data (any extra-data option, or a match URL) | $8.00 per 1,000 matches |
| Run start                                                     | $0.05 per 1,000 runs    |

Examples:

- All matches in Flashscore's top leagues on a weekend (about 60): about **$0.18**.
- Every match of a busy Saturday worldwide (about 2,000): about **$6.00**.
- 100 matches with goals, lineups, statistics, head-to-head and odds: about **$0.80**.

You can cap any run with **Max results** or with the maximum cost per run in the run options; the run stops cleanly at the limit. Apify's free plan includes $5 of monthly credit, enough for about 1,600 matches from the daily list.

### Tips

- **Days are in UTC.** Results stay available for 7 days back; fixtures for 7 days ahead.
- **Top leagues first.** Rows from Flashscore's top leagues come first, so a small **Max results** still gives you the big matches.
- **Live matches across midnight.** With *Live* as the only status, matches that started before midnight UTC and are still going are included.
- **Lineups** are published about an hour before kick-off; earlier, `lineups` is `null`. Statistics are loaded once a match has started.
- **Odds for matches that have started.** The current price is the last one the bookmakers listed, which can be an in-play price. For pre-match closing odds, run before kick-off (for example on a schedule with **Upcoming days**). Opening prices are always included.
- **More bookmakers.** The UK has the most bookmakers (about 20). Add Italy, Spain or France to compare more; a bookmaker that appears in several countries is listed once.
- **Coverage of extra data follows Flashscore.** Big leagues have everything; lower and youth leagues may lack statistics, lineups or odds. A part that doesn't exist for a match is `null`.
- **Integrations.** Send results to Google Sheets, Slack, Zapier, Make or your own webhook with Apify [integrations](https://apify.com/integrations), or call the Actor through the [API](https://docs.apify.com/api/v2).

### FAQ

**How fresh are live scores?**
Each run reads Flashscore's live data at that moment, which usually updates within seconds of a goal. Schedule runs as often as every minute.

**Can I get older matches?**
The daily list covers the last 7 days. For older matches, use their Flashscore match URLs.

**How are penalty shootouts counted?**
`score.home` and `score.away` are goals (after extra time when it was played) without the shootout. The shootout is in `score.penalties`, and `winner` says who won the match.

**Do I need a proxy?**
No. Flashscore answers Apify's servers directly. The proxy option is there in case that changes.

**Is it legal to scrape Flashscore?**
This Actor collects publicly available sports data: scores, statistics, lineups, published odds and the public names of professional athletes. It does not log in or collect private information. Check the source's terms and your local laws for your use case, especially for commercial use.

**Something is missing or broken?**
Open an issue in the **Issues** tab with the run link, and it will be looked at.

*Football Scraper is an independent tool. It is not affiliated with, endorsed by or connected to Flashscore or Livesport s.r.o. Odds are shown for information only.*

# Actor input Schema

## `daysBack` (type: `integer`):

How many days before today (UTC) to include. 0 means today only. Results are available for the last 7 days.

## `daysAhead` (type: `integer`):

How many days after today to include, for fixtures (up to 7).

## `statuses` (type: `array`):

Only matches with these statuses. Leave empty for all. Choose only "Live" for in-play matches (matches that started before midnight UTC and are still going are included).

## `topLeaguesOnly` (type: `boolean`):

Only Flashscore's top competitions: Premier League, LaLiga, Serie A, Bundesliga, Ligue 1, Eredivisie, Champions League, Europa League, Conference League, Nations League, Copa Libertadores and the World Cup and Euro.

## `competitions` (type: `array`):

Only these competitions. Write "Country: Name" as on Flashscore (England: Premier League, Spain: LaLiga, Europe: Champions League), just the name, or paste the competition URL from flashscore.com. Leave empty for all.

## `countries` (type: `array`):

Only competitions from these countries or regions, for example England, Spain, Brazil, Europe or World. Leave empty for all.

## `teams` (type: `array`):

Only matches of these teams, for example Arsenal or Real Madrid. Leave empty for all teams.

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

Flashscore football match URLs (any Flashscore domain) or 8-character match ids. When set, the days and filters above are not used.

## `includeEvents` (type: `boolean`):

Goals with assists, penalties, cards, substitutions and the penalty shootout, minute by minute, plus the round, referee, stadium, attendance and TV channels.

## `includeStatistics` (type: `boolean`):

Expected goals (xG), possession, shots, big chances, corners, passes, tackles, saves and more, for the match and for each half.

## `includeLineups` (type: `boolean`):

Formations, starting eleven, substitutes and coaches, with shirt numbers, captains, goalkeepers and player ratings. Published about an hour before kick-off.

## `includeHeadToHead` (type: `boolean`):

Earlier meetings of the two teams, each team's last 10 matches, and form strings such as WWDLW.

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

1X2, over/under 2.5 goals and both teams to score from the bookmakers in the countries below, with opening prices, the best and average price and the implied probability.

## `oddsMarkets` (type: `string`):

The main markets only, or every market Flashscore lists: halves, double chance, draw no bet, Asian and European handicap, correct score, half-time/full-time, odd/even.

## `oddsCountries` (type: `array`):

Bookmakers differ by country. The United Kingdom has the most (about 20). Pick several to compare more bookmakers; each extra country adds one request per match.

## `onlyChanged` (type: `boolean`):

Save only matches that are new or whose status, score or red cards changed since the previous run with the same settings. Use it with a schedule (for example every 5 minutes) to follow live scores without paying for unchanged rows.

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

Stop after this many matches. 0 means no limit. A busy day has 1,000 or more matches worldwide; top leagues are listed first.

## `maxConcurrency` (type: `integer`):

How many matches are loaded at the same time when extra data is on.

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

Not needed in most cases: Flashscore answers Apify's servers directly. Turn it on only if runs start failing with "blocked".

## Actor input object example

```json
{
  "daysBack": 1,
  "daysAhead": 0,
  "statuses": [],
  "topLeaguesOnly": false,
  "competitions": [],
  "countries": [],
  "teams": [],
  "matchUrls": [],
  "includeEvents": false,
  "includeStatistics": false,
  "includeLineups": false,
  "includeHeadToHead": false,
  "includeOdds": false,
  "oddsMarkets": "main",
  "oddsCountries": [
    "GB"
  ],
  "onlyChanged": false,
  "maxItems": 50,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `matches` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "daysBack": 1,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("keelwright/football-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 = {
    "daysBack": 1,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("keelwright/football-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 '{
  "daysBack": 1,
  "maxItems": 50
}' |
apify call keelwright/football-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,keelwright/football-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/iPhPtub6rcxypSlQX/builds/H4jl4KEDbuViWhdm0/openapi.json
