# Football xG Stats: xG Table, Player xG/xA & Match xG (`scrapemint/football-xg-stats`) Actor

Expected goals data for 40+ football leagues: xG table with expected points, player xG, xA, xGOT and per-90 stats, and per-match xG with shot maps. Premier League, LaLiga, Serie A, Bundesliga, MLS and more. No API key.

- **URL**: https://apify.com/scrapemint/football-xg-stats.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 xG Stats: xG Table, Player xG/xA & Match xG

Expected goals (xG) data for **40+ football leagues**, in three modes:

- **Teams**: the xG league table. Points, goals and the expected version of each: xG, xGA, xG difference, **expected points (xPts)** and **expected position**, plus how far each team is over or under them. Adds possession, big chances, clean sheets, set-piece goals, cards and the FotMob team rating.
- **Players**: xG, xGOT, xA, xG and xA per 90, goals and assists minus expected, minutes, shots, big chances created and missed, dribbles, tackles, interceptions, saves, goals prevented and rating. One row per player.
- **Matches**: every finished match of the season with home and away xG, **non-penalty xG**, xGOT, possession, shots, big chances, corners and every other match stat. Add the **shot map** for minute, player, result, xG, xGOT, situation, shot type and pitch position of each shot.

Leagues include the Premier League, Championship, League One, LaLiga, Serie A, Bundesliga, Ligue 1, Eredivisie, Liga Portugal, Scottish Premiership, Belgian Pro League, Super Lig, MLS, Brasileirao, Liga MX, Saudi Pro League, J League, A-League, Champions League, Europa League and Conference League. Past seasons too. Data from FotMob, no API key, no login.

### Who uses it

- **Football bettors**: find teams whose points run ahead of their xPts (likely to regress) and back the ones running behind
- **Betting and fantasy model builders**: match xG and shot-level data for every game, season after season
- **Scouts, analysts and writers**: player xG, xA and per-90 tables filtered by minutes
- **FPL and fantasy players**: who is getting the chances, not only the goals

### Example input

xG table for the top 5 leagues:

```json
{ "mode": "teams", "leagues": ["Premier League", "LaLiga", "Serie A", "Bundesliga", "Ligue 1"] }
```

Last season's LaLiga players with 900+ minutes:

```json
{ "mode": "players", "leagues": ["LaLiga"], "season": "2025/2026", "minMinutes": 900 }
```

The last 10 Premier League matches with shot maps:

```json
{ "mode": "matches", "leagues": ["Premier League"], "lastMatches": 10, "includeShots": true }
```

### Example output

Team (xG table):

```json
{
  "league": "Premier League",
  "season": "2026/2027",
  "position": 1,
  "team": "Arsenal",
  "played": 11,
  "points": 28,
  "goalsFor": 17,
  "goalsAgainst": 7,
  "xg": 17.64,
  "xga": 9.31,
  "xgDiff": 8.3,
  "xPoints": 21.42,
  "xPosition": 1,
  "pointsMinusXPoints": 6.58,
  "possessionPct": 60.3,
  "bigChances": 28,
  "cleanSheets": 7
}
```

Player:

```json
{
  "league": "LaLiga",
  "season": "2025/2026",
  "player": "Kylian Mbappé",
  "team": "Real Madrid",
  "minutes": 2604,
  "goals": 25,
  "xg": 23.9,
  "xgot": 22,
  "assists": 5,
  "xa": 6.2,
  "xgPer90": 0.83,
  "xgPlusXaPer90": 1.04,
  "goalsMinusXg": 1.1,
  "bigChancesMissed": 21,
  "rating": 8.02
}
```

Match:

```json
{
  "league": "Premier League",
  "date": "2026-11-21T15:00:00Z",
  "homeTeam": "Chelsea",
  "awayTeam": "Leeds United",
  "homeGoals": 1,
  "awayGoals": 4,
  "homeXg": 0.64,
  "awayXg": 2.77,
  "homeNonPenaltyXg": 0.64,
  "awayNonPenaltyXg": 1.98,
  "homePossessionPct": 57,
  "homeShots": 14,
  "awayShots": 21
}
```

A stat is `null` when FotMob does not rank that player or team for it (for example, a player with no assists is missing from the assists list).

### Pricing

**$0.002 per row**, no monthly fee. The first row of every run is free. A full Premier League xG table costs $0.04; every match of a 380-game season costs $0.76.

### Related actors

- [Flashscore Scraper](https://apify.com/scrapemint/flashscore-scraper): live scores, odds and match stats for 30+ sports
- [Historical Football Odds](https://apify.com/scrapemint/historical-football-odds): 25 years of closing odds and results
- [Sports Odds Scraper](https://apify.com/scrapemint/sports-odds-scraper): live sportsbook odds

# Actor input Schema

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

Teams = xG league table with expected points and team stats. Players = xG, xA, xGOT, per-90 and defensive stats per player. Matches = xG and stats for every finished match.

## `leagues` (type: `array`):

Premier League, Championship, League One, LaLiga, LaLiga2, Serie A, Bundesliga, Ligue 1, Eredivisie, Liga Portugal, Scottish Premiership, Belgian Pro League, Super Lig, MLS, Brasileirao, Liga MX, Saudi Pro League, J League, A-League, Champions League, Europa League, Conference League, World Cup... or any FotMob league ID or URL.

## `season` (type: `string`):

e.g. 2025/2026 (or 2025 for MLS and Brazil). Empty = current season. xG goes back to about 2017 for top leagues.

## `lastMatches` (type: `integer`):

Matches mode: only the most recent N finished matches per league. 0 = the whole season so far.

## `includeShots` (type: `boolean`):

Matches mode: add every shot with minute, player, result, xG, xGOT, situation, shot type and pitch position.

## `minMinutes` (type: `integer`):

Players mode: skip players with fewer minutes.

## `maxRows` (type: `integer`):

Cap on rows returned. Controls cost.

## Actor input object example

```json
{
  "mode": "teams",
  "leagues": [
    "Premier League",
    "LaLiga",
    "Serie A",
    "Bundesliga",
    "Ligue 1"
  ],
  "lastMatches": 0,
  "includeShots": false,
  "minMinutes": 0,
  "maxRows": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

Teams (xG table), players (xG, xA) or matches (match xG).

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

Mode, leagues and rows returned.

# 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 = {
    "leagues": [
        "Premier League",
        "LaLiga",
        "Serie A",
        "Bundesliga",
        "Ligue 1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/football-xg-stats").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 = { "leagues": [
        "Premier League",
        "LaLiga",
        "Serie A",
        "Bundesliga",
        "Ligue 1",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/football-xg-stats").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 '{
  "leagues": [
    "Premier League",
    "LaLiga",
    "Serie A",
    "Bundesliga",
    "Ligue 1"
  ]
}' |
apify call scrapemint/football-xg-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapemint/football-xg-stats"
        }
    }
}
```

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/cc37WYs17dSqmMJ05/builds/fa8uBksnsY3q87fcu/openapi.json
