# Football Stats Scraper (`crawlerbros/football-stats-scraper`) Actor

Scrape football statistics from ESPN's public API, standings, match results, team stats, and player profiles for all major leagues worldwide including Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, and more. No API key required.

- **URL**: https://apify.com/crawlerbros/football-stats-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Football Stats Scraper

Scrape football statistics from ESPN's public API — **no API key required**. Covers all major leagues worldwide including Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, UEFA Champions League, and 20+ more.

### What does Football Stats Scraper do?

This actor retrieves comprehensive football data including:
- **League Standings** — full table with points, wins, losses, draws, goals for/against, goal difference, and qualification zones
- **Match Results** — recent and historical match scores with venue, attendance, and team form
- **Team Stats** — team profiles with season records and league information
- **Player Search** — search for player profiles by name to get position, age, nationality, and team info

Data source: ESPN's public sports API, fully accessible with no authentication required.

### Supported Leagues

| League | ID |
|--------|-----|
| English Premier League | `eng.1` |
| Spanish La Liga | `esp.1` |
| German Bundesliga | `ger.1` |
| Italian Serie A | `ita.1` |
| French Ligue 1 | `fra.1` |
| US Major League Soccer | `usa.1` |
| UEFA Champions League | `uefa.champions` |
| UEFA Europa League | `uefa.europa` |
| UEFA Conference League | `uefa.europa.conf` |
| Dutch Eredivisie | `ned.1` |
| Portuguese Primeira Liga | `por.1` |
| Brazilian Série A | `bra.1` |
| Argentine Primera División | `arg.1` |
| Mexican Liga MX | `mex.1` |
| Scottish Premiership | `sco.1` |
| Turkish Süper Lig | `tur.1` |
| Japanese J1 League | `jpn.1` |
| + 12 more | |

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | What to fetch: `standings`, `matchResults`, `teamStats`, or `playerSearch` |
| `league` | select | League to scrape (see table above, default: `eng.1`) |
| `fromDate` | text | Match results start date in `YYYYMMDD` format (mode=matchResults) |
| `toDate` | text | Match results end date in `YYYYMMDD` format (mode=matchResults) |
| `playerQuery` | text | Player name to search for (mode=playerSearch) |
| `maxItems` | integer | Maximum records to return (1–500, default: 50) |

### Output

#### Standings record
```json
{
  "teamName": "Arsenal",
  "teamAbbreviation": "ARS",
  "teamId": "359",
  "leagueId": "eng.1",
  "leagueName": "English Premier League",
  "season": "2024-25 English Premier League",
  "rank": 1,
  "played": 38,
  "won": 26,
  "drawn": 7,
  "lost": 5,
  "points": 85,
  "goalsFor": 71,
  "goalsAgainst": 27,
  "goalDifference": 44,
  "standingNote": "Champions League",
  "teamLogoUrl": "https://a.espncdn.com/i/teamlogos/soccer/500/359.png",
  "teamUrl": "https://www.espn.com/soccer/club/_/id/359/arsenal",
  "scrapedAt": "2025-05-25T10:00:00+00:00"
}
````

#### Match result record

```json
{
  "matchId": "727459",
  "leagueId": "eng.1",
  "leagueName": "English Premier League",
  "matchDate": "2025-01-15T15:00Z",
  "matchDateLocal": "2025-01-15",
  "status": "FT",
  "isCompleted": true,
  "homeTeamName": "Arsenal",
  "homeScore": 2,
  "homeWinner": true,
  "awayTeamName": "Chelsea",
  "awayScore": 1,
  "awayWinner": false,
  "venue": "Emirates Stadium",
  "venueCity": "London",
  "attendance": 60000,
  "scrapedAt": "2025-05-25T10:00:00+00:00"
}
```

### Use Cases

- **Fantasy football** — track player performance and team form
- **Sports analytics** — build datasets for league comparison and trend analysis
- **News monitoring** — extract live and historical match scores
- **Research** — compile season statistics for any major league
- **Dashboards** — power live league tables for websites and apps

### FAQ

**Q: Does this require an API key or registration?**
A: No. This actor uses ESPN's public sports API which is freely accessible with no authentication required.

**Q: How current is the data?**
A: Standings and match results reflect ESPN's live data, typically updated within minutes of matches ending.

**Q: Can I get historical match results?**
A: Yes. Use `mode=matchResults` with `fromDate` and `toDate` parameters in `YYYYMMDD` format to query any date range.

**Q: Which leagues are supported?**
A: 29 leagues spanning Europe, Americas, Asia, and global tournaments. See the supported leagues table above.

**Q: What's the data limit?**
A: Up to 500 records per run. For standings, you typically get all 20 teams in one run.

**Q: Is this free to run?**
A: Yes. No proxy, no API key, no paid add-ons required. Runs on the Apify free plan.

# Actor input Schema

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

What data to fetch from the football API.

## `league` (type: `string`):

Football league to scrape. Covers all major European and global leagues.

## `fromDate` (type: `string`):

Start date for match results in YYYYMMDD format (e.g. 20250101). Defaults to 30 days ago.

## `toDate` (type: `string`):

End date for match results in YYYYMMDD format (e.g. 20250131). Defaults to today.

## `playerQuery` (type: `string`):

Player name to search for (e.g. 'Erling Haaland', 'Vinicius').

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

Maximum number of records to return.

## Actor input object example

```json
{
  "mode": "standings",
  "league": "eng.1",
  "playerQuery": "Erling Haaland",
  "maxItems": 50
}
```

# Actor output Schema

## `footballData` (type: `string`):

Dataset containing all scraped football statistics records.

# 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 = {
    "mode": "standings",
    "league": "eng.1",
    "playerQuery": "Erling Haaland",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/football-stats-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 = {
    "mode": "standings",
    "league": "eng.1",
    "playerQuery": "Erling Haaland",
    "maxItems": 50,
}

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "standings",
  "league": "eng.1",
  "playerQuery": "Erling Haaland",
  "maxItems": 50
}' |
apify call crawlerbros/football-stats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/football-stats-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Football Stats Scraper",
        "description": "Scrape football statistics from ESPN's public API, standings, match results, team stats, and player profiles for all major leagues worldwide including Premier League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, and more. No API key required.",
        "version": "1.0",
        "x-build-id": "bu0ZbsuffIVDJtqEl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~football-stats-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-football-stats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~football-stats-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-football-stats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~football-stats-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-football-stats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "standings",
                            "matchResults",
                            "teamStats",
                            "playerSearch"
                        ],
                        "type": "string",
                        "description": "What data to fetch from the football API.",
                        "default": "standings"
                    },
                    "league": {
                        "title": "League",
                        "enum": [
                            "eng.1",
                            "esp.1",
                            "ger.1",
                            "ita.1",
                            "fra.1",
                            "usa.1",
                            "uefa.champions",
                            "uefa.europa",
                            "uefa.europa.conf",
                            "eng.2",
                            "ger.2",
                            "ita.2",
                            "esp.2",
                            "fra.2",
                            "ned.1",
                            "por.1",
                            "bra.1",
                            "arg.1",
                            "mex.1",
                            "sco.1",
                            "tur.1",
                            "rus.1",
                            "bel.1",
                            "gre.1",
                            "ukr.1",
                            "jpn.1",
                            "kor.1",
                            "aus.1",
                            "chn.1",
                            "fifa.world"
                        ],
                        "type": "string",
                        "description": "Football league to scrape. Covers all major European and global leagues.",
                        "default": "eng.1"
                    },
                    "fromDate": {
                        "title": "From date (matchResults only)",
                        "type": "string",
                        "description": "Start date for match results in YYYYMMDD format (e.g. 20250101). Defaults to 30 days ago."
                    },
                    "toDate": {
                        "title": "To date (matchResults only)",
                        "type": "string",
                        "description": "End date for match results in YYYYMMDD format (e.g. 20250131). Defaults to today."
                    },
                    "playerQuery": {
                        "title": "Player search query (playerSearch only)",
                        "type": "string",
                        "description": "Player name to search for (e.g. 'Erling Haaland', 'Vinicius').",
                        "default": "Erling Haaland"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of records to return.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
