# Flashscore Elite Statistics Extractor (Deep Metrics & xG) (`harry.automazione/flashscore-elite-stats`) Actor

💎 𝗘𝗹𝗶𝘁𝗲-𝗴𝗿𝗮𝗱𝗲 𝗳𝗼𝗼𝘁𝗯𝗮𝗹𝗹 𝗱𝗮𝘁𝗮 𝗳𝗮𝗰𝘁𝗼𝗿𝘆. 𝗘𝘅𝘁𝗿𝗮𝗰𝘁𝘀 𝗽𝗿𝗲𝗺𝗶𝘂𝗺 𝗘𝘅𝗽𝗲𝗰𝘁𝗲𝗱 𝗚𝗼𝗮𝗹𝘀 (𝘅𝗚), 𝗱𝗲𝗲𝗽 𝟭𝗛/𝟮𝗛 𝘀𝗽𝗹𝗶𝘁𝘀, 𝗮𝗻𝗱 𝗵𝗶𝗴𝐡-𝗽𝗿𝗲𝗰𝗶𝘀𝗶𝗼𝗻 𝗺𝗲𝘁𝗿𝗶𝗰𝘀. 🚀 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗲𝗱 𝗳𝗼𝗿 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀.

- **URL**: https://apify.com/harry.automazione/flashscore-elite-stats.md
- **Developed by:** [Harry.automazione](https://apify.com/harry.automazione) (community)
- **Categories:** Automation, Integrations, Other
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

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/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

## Flashscore Elite Statistics Extractor (Deep Metrics)

The professional-grade solution for advanced football data extraction. Optimized for data scientists, professional analysts, and scouting departments requiring high-granularity historical data without technical complexity.

---

### Why Choose Elite Statistics Extractor?
Most scrapers only provide basic match events. **Elite Statistics Extractor** is specifically engineered to access Flashscore's deep statistical layers, offering insights previously unavailable in automated tools.

#### Competitive Advantage Matrix
| Feature | Standard Scrapers | **Elite Statistics Extractor** |
| :--- | :---: | :---: |
| **Expected Goals (xG)** | ❌ No | ✅ **Full Support** |
| HT/FT Statistics Split | ❌ No | ✅ **Included** |
| Historical Depth | ⚠️ Limited | ✅ **2017 to 2026** |
| Ease of Use | 🐌 Manual URLs only | ⚡ **Smart League Picker** |
| Stealth Mode | 💸 Req. Proxies ($15+/mo) | 🛡️ **Zero Proxy Costs (Inbuilt)** |

---

### How to Run: Two Modes for Maximum Flexibility

#### Mode A: Smart Selection (Recommended)
No technical knowledge required. Simply use the graphical interface in the Apify Console:
1. **Select League**: Choose from major leagues (Serie A, Premier League, LaLiga, Bundesliga, etc.) via the dropdown menu.
2. **Select Season**: Pick any season from **2017/18 to 2025/26**.
3. **Set Match Limit**: Define how many matches to extract (e.g., 380 for a full season).

#### Mode B: Manual Mode (Advanced)
For custom competitions or specific sub-leagues not in the presets:
1. Select **Manual Mode** in the League dropdown.
2. Paste the Flashscore Results URL in the **Manual Discovery URL** field. 

---

### Technical Excellence

#### Precision Deep Metrics
Our algorithm reconstructs the match flow with 100% fidelity:
- **Expected Goals (xG)**: Total, Home, and Away values for advanced predictive modeling.
- **Temporal Split**: Every metric (Possession, Shots, Corners, Passes, Fouls) is provided for **Full-Time, 1st Half, and 2nd Half**.

#### Stealth Mode & Scalability
Built with an advanced queue management system that mimics human behavior.
- **Inbuilt Optimization**: Specifically designed to run on local IPs to eliminate proxy costs for standard seasonal extractions.
- **Professional Scaling**: While proxy-free for individual runs, the Actor fully supports **Residential Proxies** if you need to scale your data pipeline by running multiple instances of the Actor concurrently across different markets.

#### Smart Update System (Cost Saver)
Enable **Smart Memory** to avoid paying twice for the same data. The Actor remembers processed Match IDs and only extracts new entries, reducing Compute Unit (CU) consumption for recurring monitoring tasks.

---

### Technical Validation Dataset
Transparency is our core value. Validate the quality of our "Diamond Grade" data by downloading our latest extraction sample:

<a href="https://api.apify.com/v2/key-value-stores/f1pLKNreZAd2R6acn/records/serie-a-2024-25-full.json?disableRedirect=true&attachment=1"><strong>Download Serie A 24/25 Dataset - Full Season (JSON)</strong></a><br>
<a href="https://api.apify.com/v2/key-value-stores/f1pLKNreZAd2R6acn/records/serie-a-2024-25-full.xlsx?disableRedirect=true"><strong>Download Serie A 24/25 Dataset - Full Season (Excel XLSX)</strong></a>

*(These samples showcase full xG coverage and HT/FT statistical distribution for all matches).*

### Pricing
**$2.50 per 1,000 results.** 
Processed with extreme efficiency: A full 380-match season is processed in **approx. 11 minutes** with minimal resource consumption.

---

### Disclaimer
This Actor is provided for academic and research purposes only. Users are responsible for complying with the data provider's Terms of Service. No liability is assumed for the misuse of this tool or the accuracy of external data.

---

#### Versione Italiana (Sintesi)
Il primo estrattore su Apify a offrire **Expected Goals (xG)** completi e suddivisione **1H/2H** delle statistiche. 
- **Facilità d'uso**: Seleziona Lega e Stagione (2017-2026) direttamente dal menu.
- **Data Science Ready**: Dati strutturati in JSON, pronti per essere importati in **Excel, Pandas o SQL**.
- **Risparmio**: Tecnologia **Stealth Mode** (nessun proxy richiesto per uso standard) e **Smart Update** per evitare duplicati.

**Disclaimer**: Questo strumento è fornito esclusivamente per scopi di ricerca e analisi. L'utente è responsabile dell'osservanza dei termini di servizio del provider dei dati.

---

**Optimized for & Supported Categories:**
*Flashscore Scraper, Football Statistics, Soccer Data API, Expected Goals xG data, Soccer Match Stats, Betting Data Extraction, Sports Analytics, Historical Football Results, Python Football Data, Excel Soccer Stats, HT/FT Statistics, Top European Leagues Scraper.*

*For support or custom feature requests, contact us via the Apify Console.*

# Actor input Schema

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

Choose a preset league or use Manual Mode for custom competitions.
## `season` (type: `string`):

Select the competition year (Note: This is ignored if Manual Mode is selected).
## `targetCount` (type: `integer`):

How many matches to extract? (e.g. 10 for the latest round, 380 for a full season).
## `skipProcessed` (type: `boolean`):

If enabled, the actor will skip matches it has already extracted in previous runs, saving you money and time.
## `forceRefresh` (type: `boolean`):

Enable this only if you want to wipe the memory and re-extract EVERYTHING from scratch.
## `proxyConfig` (type: `object`):

IMPORTANT: Residential Proxies are highly recommended to avoid bans.
## `manualDiscoveryUrl` (type: `string`):

LEAVE EMPTY unless you selected 'Manual Mode' above. Paste a Flashscore results URL here.

## Actor input object example

```json
{
  "league": "Serie A",
  "season": "2025/26",
  "targetCount": 10,
  "skipProcessed": true,
  "forceRefresh": false
}
````

# 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 = {
    "manualDiscoveryUrl": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("harry.automazione/flashscore-elite-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 = { "manualDiscoveryUrl": "" }

# Run the Actor and wait for it to finish
run = client.actor("harry.automazione/flashscore-elite-stats").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 '{
  "manualDiscoveryUrl": ""
}' |
apify call harry.automazione/flashscore-elite-stats --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Flashscore Elite Statistics Extractor (Deep Metrics & xG)",
        "description": "💎 𝗘𝗹𝗶𝘁𝗲-𝗴𝗿𝗮𝗱𝗲 𝗳𝗼𝗼𝘁𝗯𝗮𝗹𝗹 𝗱𝗮𝘁𝗮 𝗳𝗮𝗰𝘁𝗼𝗿𝘆. 𝗘𝘅𝘁𝗿𝗮𝗰𝘁𝘀 𝗽𝗿𝗲𝗺𝗶𝘂𝗺 𝗘𝘅𝗽𝗲𝗰𝘁𝗲𝗱 𝗚𝗼𝗮𝗹𝘀 (𝘅𝗚), 𝗱𝗲𝗲𝗽 𝟭𝗛/𝟮𝗛 𝘀𝗽𝗹𝗶𝘁𝘀, 𝗮𝗻𝗱 𝗵𝗶𝗴𝐡-𝗽𝗿𝗲𝗰𝗶𝘀𝗶𝗼𝗻 𝗺𝗲𝘁𝗿𝗶𝗰𝘀. 🚀 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗲𝗱 𝗳𝗼𝗿 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀.",
        "version": "0.0",
        "x-build-id": "5fByHZ7IzUMVXkHGx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/harry.automazione~flashscore-elite-stats/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-harry.automazione-flashscore-elite-stats",
                "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/harry.automazione~flashscore-elite-stats/runs": {
            "post": {
                "operationId": "runs-sync-harry.automazione-flashscore-elite-stats",
                "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/harry.automazione~flashscore-elite-stats/run-sync": {
            "post": {
                "operationId": "run-sync-harry.automazione-flashscore-elite-stats",
                "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": [
                    "league",
                    "targetCount"
                ],
                "properties": {
                    "league": {
                        "title": "⚽ Select League",
                        "enum": [
                            "Serie A",
                            "Premier League",
                            "LaLiga",
                            "Bundesliga",
                            "Ligue 1",
                            "Liga Portugal",
                            "Manual Mode"
                        ],
                        "type": "string",
                        "description": "Choose a preset league or use Manual Mode for custom competitions.",
                        "default": "Serie A"
                    },
                    "season": {
                        "title": "🗓️ Season",
                        "enum": [
                            "2025/26",
                            "2024/25",
                            "2023/24",
                            "2022/23",
                            "2021/22",
                            "2020/21",
                            "2019/20",
                            "2018/19",
                            "2017/18"
                        ],
                        "type": "string",
                        "description": "Select the competition year (Note: This is ignored if Manual Mode is selected).",
                        "default": "2025/26"
                    },
                    "targetCount": {
                        "title": "🔢 Match Limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many matches to extract? (e.g. 10 for the latest round, 380 for a full season).",
                        "default": 10
                    },
                    "skipProcessed": {
                        "title": "🧠 Smart Memory (Skip Duplicates)",
                        "type": "boolean",
                        "description": "If enabled, the actor will skip matches it has already extracted in previous runs, saving you money and time.",
                        "default": true
                    },
                    "forceRefresh": {
                        "title": "🧹 Clear Memory Cache",
                        "type": "boolean",
                        "description": "Enable this only if you want to wipe the memory and re-extract EVERYTHING from scratch.",
                        "default": false
                    },
                    "proxyConfig": {
                        "title": "🛡️ Proxy Configuration",
                        "type": "object",
                        "description": "IMPORTANT: Residential Proxies are highly recommended to avoid bans."
                    },
                    "manualDiscoveryUrl": {
                        "title": "🔗 Manual Discovery URL (Advanced)",
                        "type": "string",
                        "description": "LEAVE EMPTY unless you selected 'Manual Mode' above. Paste a Flashscore results URL here."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
