Scrape match results, statistics, and league data from Flashscore
Flashscore is one of the most popular platforms for real-time sports results, statistics, and standings, but it has no official API.
FlashscoreScraping bridges this gap by extracting structured match data directly from the site, enabling use in:
- 🔎 Tracking favorite teams and leagues
- 📊 Building analytics dashboards
- 🧠 Research & academic datasets
- 🤖 Bots, automations, ML training, data pipelines
git clone https://github.com/gustavofariaa/FlashscoreScraping.git
cd FlashscoreScraping
npm install
npx playwright install-deps chromium
npm run start| Parameter | Default | Required | Description |
|---|---|---|---|
country |
- | ✅ if using league |
Country to scrape (e.g. brazil) |
league |
- | ❌ | Specific league to scrape (e.g. serie-a) |
fileType |
json |
❌ | Output format: json, json-array or csv |
concurrency |
10 |
❌ | Number of matches scraped in parallel. Higher = faster, but heavier on CPU/network |
saveInterval |
10 |
❌ | Number of matches processed before data is saved to disk |
headless |
true |
❌ | Show browser UI (false) or run hidden (true) |
Scrape Brazilian Serie A 2023 into JSON:
npm run start country=brazil league=serie-a-2023 fileType=jsonScrape Premier League 22/23 with visible browser and export CSV:
npm run start country=england league=premier-league-2022-2023 headless=false fileType=csvEach match result includes:
{
"IHCq3ARL": {
"stage": "FINAL",
"date": "20.02.2022 16:00",
"status": "AFTER PENALTIES",
"home": {
"name": "Atletico-MG",
"image": "https://static.flashscore.com/res/image/data/WbSJHDh5-pCk2vaSD.png"
},
"away": {
"name": "Flamengo RJ",
"image": "https://static.flashscore.com/res/image/data/ADvIaiZA-2R2JjDQC.png"
},
"result": {
"home": "3",
"away": "2",
"regulationTime": "2-2",
"penalties": "8-7"
},
"information": [
{
"category": "Referee",
"value": "Daronco A. (Bra)"
},
{
"category": "Venue",
"value": "Arena Pantanal (Cuiabá)"
},
{
"category": "Capacity",
"value": "44 000"
}
],
"statistics": [
{
"category": "Ball Possession",
"homeValue": "57%",
"awayValue": "43%"
}
// statistics are dynamic and may vary per match
]
}
}| Field | Type | Description |
|---|---|---|
matchId |
string |
Unique identifier for the match |
stage |
string |
Competition phase or round (e.g., QUARTER-FINALS) |
status |
string |
Current or final state of the match (e.g., FINISHED) |
date |
string |
Full match date & time (dd.mm.yyyy hh:mm) |
home / away |
object |
Team data (name + logo URL) |
result |
object |
Match score data (may be empty if not available) |
information |
array |
Extra match info (referee, stadium, etc.) |
statistics |
array |
Variable-length list of stats (depends on match) |
Found a bug? Want to suggest a feature? Open an issue
If this project helped you, consider leaving a star. It motivates development and helps more people find the repo.
