# Sofascore Live Scores & Match Stats Scraper (`scrapers_lat/sofascore-scraper`) Actor

Scrape live football scores, fixtures, results, lineups, player ratings and match statistics from Sofascore. Track the World Cup and any league by tournament or match. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/sofascore-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.
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

![Sofascore Live Scores & Match Stats Scraper](https://scrapers.lat/banners/sofascore-scraper.png)

## Sofascore Live Scores & Match Stats Scraper

Pull live football scores, fixtures, results, lineups, player ratings and match statistics as clean, structured data. Follow the 2026 World Cup as it happens, track any league or cup, and export everything to JSON, CSV or Excel in a couple of clicks.

### What you get

Every run returns matches as structured records. For each match you get:

- **Match id, kickoff time and status** (in play, half time, finished, not started) plus the live minute for games in play
- **Home and away teams**, team country and team ids
- **Live and final score**, half time score, and penalty shootout score
- **Tournament, region, season and round**
- **Result winner** (home, away or draw) for finished matches
- **A direct link** to the match page

Turn on match details and each record is enriched with:

- **Starting lineups and team formations** for both sides
- **Player ratings** and per player goals, assists and minutes played
- **Full match statistics**: possession, shots, shots on target, passes, tackles, corners, cards and more, home versus away
- **Venue, city, stadium capacity, referee and attendance**

Three ways to pull data:

- **Live matches** every game in play right now, for football or another sport
- **Tournament fixtures and results** every finished and upcoming match for a competition, with an optional standings table. Defaults to the World Cup
- **Single matches** exact matches by id when you already know what you want

### Use cases

- **World Cup 2026 live coverage** power a live scoreboard, a match ticker or a results widget
- **Sports analytics** build datasets of results, player ratings and team statistics across seasons
- **Fantasy football** feed player ratings, minutes and returns into your fantasy models
- **Betting and prediction models** collect historical fixtures, results and match stats to train and backtest
- **Media and content** auto generate match reports, standings tables and previews
- **Fan apps and bots** keep a Discord, Telegram or Slack community updated with live scores

### Input

- **Mode** live matches, tournament fixtures, or single matches by id
- **Sport** football by default, plus basketball, tennis, ice hockey and more for live matches
- **Tournament id** and optional **season id** for tournament mode (season is resolved automatically when left blank)
- **Match ids** for single match mode
- **Fetch lineups and match statistics** toggle for full per match detail
- **Include standings** to also pull the league or group table
- **Max items** to cap how many matches you collect

A run with no changes returns the matches in play right now, so you get data immediately.

### Output

Each match is one record. Example (trimmed):

```json
{
  "eventId": 12436870,
  "status": "finished",
  "statusDescription": "Ended",
  "startTime": "2025-05-11T15:30:00.000Z",
  "tournament": "Premier League",
  "category": "England",
  "round": "Round 36",
  "homeTeam": "Manchester United",
  "awayTeam": "West Ham United",
  "homeScore": 2,
  "awayScore": 0,
  "winner": "home",
  "venue": "Old Trafford",
  "venueCity": "Manchester",
  "attendance": 73297,
  "referee": "Robert Jones",
  "lineups": { "homeFormation": "4-2-3-1", "homePlayers": [ { "name": "André Onana", "rating": 7.3 } ] },
  "statistics": [ { "group": "Match overview", "name": "Ball possession", "home": "55%", "away": "45%" } ],
  "url": "https://www.sofascore.com/...",
  "observedAt": "2026-07-06T03:22:28.887Z"
}
````

### FAQ

**Which competitions can I scrape?**
Any competition covered on the source, from the World Cup and Champions League to domestic leagues worldwide. Point the tournament id at the competition you want; the most recent season is picked automatically.

**Can I get data for other sports?**
Yes. Live matches mode supports football, basketball, tennis, ice hockey, baseball, American football, rugby, cricket, handball, volleyball and MMA.

**How fresh is the live data?**
Scores and match status reflect the moment of the run, including the current minute for games in play. Schedule the Actor to run every minute for a near live feed.

**Do I get player ratings?**
Yes. Turn on match details and each lineup includes player ratings once a match is under way or finished, plus goals, assists and minutes played.

**In what formats can I export?**
JSON, CSV, Excel, HTML or via the API.

### Export, API and AI agents (x402 + MCP)

Export the scraped data to **JSON, CSV or Excel**, pull it as a **dataset** through the Apify **API**, or wire it into your app with **no code**. This web scraper and data extractor also works for bulk data extraction and scheduled runs.

For AI agents: this Actor is available on **x402**, Apify's agentic payment standard built with Coinbase. An AI agent can discover, pay for and run it on its own with a funded wallet and a single HTTP request: no account, no subscription, no API key and no human in the loop. It also runs as an **MCP** tool inside Claude, Cursor and other AI clients out of the box. Learn more about [x402 agentic payments on Apify](https://docs.apify.com/platform/integrations/x402).

### Disclaimer

This Actor collects only publicly available sports data and does not access any account protected or private information. Team names, competition names and other trademarks belong to their respective owners and are used here for identification only. You are responsible for using the scraped data in line with the source website's terms and with applicable laws, including copyright and database rights. This Actor is not affiliated with, endorsed by or sponsored by Sofascore.

# Actor input Schema

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

Maximum number of matches to collect. Optional.

## `withDetails` (type: `boolean`):

When enabled, the scraper adds full detail to each match: starting lineups, player ratings, team formations, match statistics, venue, referee and attendance. Adds two requests per match.

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

Live matches = every game in play right now. Tournament fixtures = results and upcoming matches for one competition (World Cup by default). Single matches = specific matches by id.

## `sport` (type: `string`):

Sport to scrape in Live matches mode.

## `tournamentId` (type: `integer`):

Numeric tournament id for Tournament fixtures mode. Defaults to 16 (FIFA World Cup). Other examples: 17 (Premier League), 8 (LaLiga), 35 (Bundesliga), 34 (Ligue 1), 23 (Serie A), 7 (UEFA Champions League), 384 (Copa Libertadores).

## `seasonId` (type: `integer`):

Optional numeric season id. Leave empty to use the most recent season of the chosen tournament automatically.

## `includeStandings` (type: `boolean`):

Also collect the league or group standings table for the tournament and season.

## `eventIds` (type: `array`):

Numeric match ids for Single matches mode (one per line).

## `proxyConfiguration` (type: `object`):

Datacenter IPs are served an anti-bot challenge, so residential proxies are required. The default is Apify Residential and is strongly recommended.

## Actor input object example

```json
{
  "maxItems": 10,
  "withDetails": true,
  "mode": "live-matches",
  "sport": "football",
  "tournamentId": 16,
  "includeStandings": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "maxItems": 10,
    "tournamentId": 16,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/sofascore-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 = {
    "maxItems": 10,
    "tournamentId": 16,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/sofascore-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 '{
  "maxItems": 10,
  "tournamentId": 16,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapers_lat/sofascore-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sofascore Live Scores & Match Stats Scraper",
        "description": "Scrape live football scores, fixtures, results, lineups, player ratings and match statistics from Sofascore. Track the World Cup and any league by tournament or match. Export to JSON, CSV or Excel.",
        "version": "0.1",
        "x-build-id": "jATgUIbsZzo1hbErc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapers_lat~sofascore-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapers_lat-sofascore-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/scrapers_lat~sofascore-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapers_lat-sofascore-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/scrapers_lat~sofascore-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapers_lat-sofascore-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",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Maximum number of matches to collect. Optional."
                    },
                    "withDetails": {
                        "title": "Fetch lineups and match statistics",
                        "type": "boolean",
                        "description": "When enabled, the scraper adds full detail to each match: starting lineups, player ratings, team formations, match statistics, venue, referee and attendance. Adds two requests per match.",
                        "default": true
                    },
                    "mode": {
                        "title": "What to scrape",
                        "enum": [
                            "live-matches",
                            "tournament-events",
                            "event-detail"
                        ],
                        "type": "string",
                        "description": "Live matches = every game in play right now. Tournament fixtures = results and upcoming matches for one competition (World Cup by default). Single matches = specific matches by id.",
                        "default": "live-matches"
                    },
                    "sport": {
                        "title": "Sport",
                        "enum": [
                            "football",
                            "basketball",
                            "tennis",
                            "ice-hockey",
                            "baseball",
                            "american-football",
                            "rugby",
                            "cricket",
                            "handball",
                            "volleyball",
                            "mma"
                        ],
                        "type": "string",
                        "description": "Sport to scrape in Live matches mode.",
                        "default": "football"
                    },
                    "tournamentId": {
                        "title": "Tournament id",
                        "type": "integer",
                        "description": "Numeric tournament id for Tournament fixtures mode. Defaults to 16 (FIFA World Cup). Other examples: 17 (Premier League), 8 (LaLiga), 35 (Bundesliga), 34 (Ligue 1), 23 (Serie A), 7 (UEFA Champions League), 384 (Copa Libertadores)."
                    },
                    "seasonId": {
                        "title": "Season id",
                        "type": "integer",
                        "description": "Optional numeric season id. Leave empty to use the most recent season of the chosen tournament automatically."
                    },
                    "includeStandings": {
                        "title": "Include standings",
                        "type": "boolean",
                        "description": "Also collect the league or group standings table for the tournament and season.",
                        "default": false
                    },
                    "eventIds": {
                        "title": "Match ids",
                        "type": "array",
                        "description": "Numeric match ids for Single matches mode (one per line).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Datacenter IPs are served an anti-bot challenge, so residential proxies are required. The default is Apify Residential and is strongly recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
