Understat xG Football Scraper — Expected Goals & Shot Data API avatar

Understat xG Football Scraper — Expected Goals & Shot Data API

Pricing

Pay per usage

Go to Apify Store
Understat xG Football Scraper — Expected Goals & Shot Data API

Understat xG Football Scraper — Expected Goals & Shot Data API

Extract xG, xA, and advanced football stats from Understat.com. 562+ players per league, 18 metrics including expected goals, npxG, xG chain. Covers Premier League, La Liga, Bundesliga, Serie A, Ligue 1, RFPL. Seasons from 2014/15.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Sean Caldwell

Sean Caldwell

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

3 days ago

Last modified

Share

Understat xG Football Scraper

Extract expected goals (xG), expected assists (xA), and advanced shot-level data from Understat.com — one of the last free sources of xG data for European football. Get structured JSON/CSV data for players, teams, and individual shots across 6 top leagues.

What does this scraper do?

This Actor extracts football analytics data from Understat.com and returns clean, structured data ready for analysis. Understat embeds data as JSON inside script tags rather than HTML tables, and this scraper handles the extraction and decoding automatically.

Use it for:

  • Football analytics and scouting (xG, xA, shot maps)
  • Fantasy football research (FPL, Sorare)
  • Betting model data pipelines
  • Academic sports science research
  • Machine learning models on football data

Features

  • 6 top leagues — Premier League, La Liga, Bundesliga, Serie A, Ligue 1, Russian Premier League
  • Player-level xG data — xG, xA, npxG, shots, key passes, goals, assists per player per season
  • Team-level aggregates — xG, xGA, results, points, wins/draws/losses
  • Historical seasons — data available from 2014/15 onwards
  • Clean numeric output — all stats properly parsed as numbers, not strings
  • No Cloudflare issues — Understat serves data without aggressive bot protection

How to use

  1. Select one or more leagues from the dropdown
  2. Choose a data type: player stats or team stats
  3. Set the season start year (e.g. "2024" for 2024/25)
  4. Click Start and wait for results
  5. Download as JSON, CSV, or Excel

Output example

Each result contains one player per row with all Understat metrics:

{
"id": 1250,
"player_name": "Mohamed Salah",
"team_title": "Liverpool",
"games": 29,
"goals": 17,
"assists": 11,
"shots": 95,
"key_passes": 48,
"xG": 14.32,
"xA": 7.85,
"npg": 16,
"npxG": 13.07,
"xGChain": 19.45,
"xGBuildup": 5.12,
"league": "Premier League",
"dataType": "league_players",
"season": "2024"
}

Supported leagues

LeagueUnderstat CodeSeasons Available
Premier LeagueEPL2014/15 — current
La LigaLa_Liga2014/15 — current
BundesligaBundesliga2014/15 — current
Serie ASerie_A2014/15 — current
Ligue 1Ligue_12014/15 — current
Russian Premier LeagueRFPL2014/15 — current

Data fields

Player stats (league_players): id, player_name, team_title, games, time, goals, assists, shots, key_passes, xG, xA, npg, npxG, xGChain, xGBuildup, yellow_cards, red_cards, position.

Team stats (league_teams): id, title, matches, wins, draws, losses, scored, missed, xG, xGA, pts.

Pricing

This Actor uses pay-per-event pricing:

EventCostDescription
Actor start$0.10One-time per run
League scraped$0.49Per league of data returned

Examples:

  • Premier League players with xG: $0.59
  • All 6 European leagues: $3.04
  • Set a maximum cost limit before running to control spend

Integrations

Export data to Google Sheets, Excel, or connect via API. Works with n8n, Make.com, Zapier, and any tool that can call the Apify API.

FAQ

Why Understat instead of FBref? FBref is behind Cloudflare and requires expensive browser-based scraping. Understat serves data without aggressive bot protection, making it reliable and cost-effective.

Does this include xG data? Yes. Every player record includes xG, xA, npxG, xGChain, and xGBuildup — the full Understat expected goals model.

Can I scrape historical seasons? Yes. Understat has data from 2014/15 onwards. Enter the start year (e.g. "2014" for 2014/15).

What's the rate limit? The Actor makes a maximum of 8 requests per minute and waits 6 seconds between requests to be respectful to Understat's servers.

Is this legal? This Actor accesses only publicly available data on Understat.com. It respects rate limits and does not bypass authentication. Users are responsible for complying with applicable terms of service and laws.