# SofaScore Scraper \[$1/1K 💰] Matches, Stats, Lineups & Odds (`memo23/sofascore-scraper`) Actor

SofaScore scraper for 24 sports: live scores, fixtures and results by day, match statistics, lineups with player ratings, incidents, odds, standings, teams, squads and player profiles. Paste any SofaScore URL or search by name. One flat price per row, every match detail included.

- **URL**: https://apify.com/memo23/sofascore-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Sports, News, Automation
- **Stats:** 4 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SofaScore Scraper

**Export [SofaScore](https://www.sofascore.com) matches, teams, players and leagues as clean rows.** Live scores, fixtures and results for 24 sports, match statistics, lineups with player ratings, incidents, odds, standings, squads, transfers and player statistics for every season.

Paste any SofaScore URL, type a name, or pick a sport and a day. **$1 per 1,000 rows, with every match detail included in that price.** No login, no cookies and no proxy to set up.

### Why Use This Scraper?

- **One price per row.** A match row costs the same with or without statistics, lineups, incidents and odds. There is no extra charge per detail.
- **Any SofaScore URL works.** Match, team, player, league and sport pages, current and older link formats, and translated pages that carry an `#id`.
- **Search by name.** Type `Real Madrid`, `Nikola Jokic` or `Serie A` and get the data. You do not need to look up ids first.
- **Top leagues first.** A day of football on SofaScore is about 8,000 matches, most of them youth and lower leagues. Day lists are sorted by how many people follow each league, so a 100-row run returns the Premier League, LaLiga and Serie A before a regional cup.
- **Made for schedules.** `daysBack` and `daysAhead` count from the day the run starts, so one saved task returns yesterday's results or next week's fixtures every time it runs.
- **Spreadsheet-friendly.** Scores, teams, league, round, venue, referee and the headline statistics (possession, xG, shots) sit in flat columns. The deep data stays nested in the same row.

### Overview

The SofaScore Scraper is for sports analysts, betting modellers, fantasy and media teams, scouts and developers who need SofaScore data in a table or behind an API call.

A run returns six kinds of rows, and the input decides which: `match`, `team`, `player`, `league`, `standing` and `playerSeasonStats`. Every row has a `type` field, so a run that mixes kinds is easy to filter.

Two things work differently from what the site suggests:

- **Match details are part of the match row.** Statistics, lineups, incidents and odds do not become rows of their own. A match with all of them is still one row at one price.
- **Athletes in one-against-one sports are `team` rows.** SofaScore stores a tennis player, a darts player or a fighter as a team, so that is what you get back, with an `athlete` block for birth date, height, prize money and ranking.

### Supported Inputs

#### URL types

| URL type | Pattern | Example |
|---|---|---|
| Match | `/{sport}/match/{teams}/{code}#id:{matchId}` | `https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879` |
| Team | `/{sport}/team/{name}/{teamId}` | `https://www.sofascore.com/football/team/arsenal/42` |
| Player | `/{sport}/player/{name}/{playerId}` | `https://www.sofascore.com/football/player/erling-haaland/839956` |
| League | `/{sport}/tournament/{country}/{league}/{leagueId}` | `https://www.sofascore.com/football/tournament/england/premier-league/17` |
| Sport page | `/{sport}` or `/{sport}/{YYYY-MM-DD}` | `https://www.sofascore.com/basketball` |

What each one returns:

| You give | You get |
|---|---|
| A match URL or match id | One `match` row with the details you chose |
| A sport page, or a sport and days (`sports`) | Every match of those days, most-followed leagues first |
| A sport with `liveOnly` | The matches in play right now |
| A league URL | A `league` row, one `standing` row per team, one `match` row per match of the season, and optionally one `playerSeasonStats` row per player |
| A team URL | A `team` row with squad, season statistics and transfers, and optionally the team's matches |
| A player URL | A `player` row with statistics for every season and transfer history, and optionally the player's matches |
| A name (`searchQueries`) | The best search hits, each returned as its own kind above |

Older link formats still work (`/team/football/arsenal/42`, `/player/erling-haaland/839956`), and so do translated pages as long as the link carries an `#id`.

A match link without an id, such as `sofascore.com/football/match/getafe-fc-barcelona/rgbsjhb`, names two teams and not one match. The actor returns their match in play, otherwise their next one, otherwise their last one. Add the `#id:` part for an exact match.

#### Copy-pasteable startUrls

```json
{
    "startUrls": [
        { "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879" },
        { "url": "https://www.sofascore.com/football/team/arsenal/42" },
        { "url": "https://www.sofascore.com/football/player/erling-haaland/839956" },
        { "url": "https://www.sofascore.com/football/tournament/england/premier-league/17" }
    ]
}
```

#### Search by name

```json
{
    "searchQueries": ["Real Madrid", "Nikola Jokic", "Serie A"],
    "searchType": "all",
    "maxResultsPerQuery": 1
}
```

#### A sport and a day

```json
{
    "sports": ["football"],
    "dateFrom": "2026-10-10",
    "maxItems": 200
}
```

#### Sports

Football, basketball, tennis, ice hockey, American football, baseball, volleyball, handball, table tennis, cricket, rugby, esports, MMA, futsal, badminton, darts, snooker, water polo, Aussie rules, floorball, minifootball, padel, bandy and beach volleyball.

#### Unsupported inputs

- Motorsport and cycling. SofaScore stores them as race stages, not matches.
- Other SofaScore pages, such as a manager or a country page. The run skips them and says so in the log.
- Translated links without an `#id`. Use the English sofascore.com link for those.
- Links from other sites.
- Anything that needs a SofaScore account. The actor reads public data only.

### Use Cases

| Audience | Use case |
|---|---|
| **Betting and trading models** | Results, statistics and odds with the opening and current price, per match and per market |
| **Sports analytics teams** | xG, shot maps with coordinates, lineups, player ratings and per-period statistics |
| **Fantasy and media products** | Live scores, confirmed lineups, ratings and incidents on a schedule |
| **Scouts and recruitment** | Player profiles, statistics for every season, market value, contract end and transfer history |
| **Researchers** | Full league seasons with standings and every match, current or historical |
| **Developers** | A scheduled feed into a database, with `matchId` as the key |

### How It Works

![How the SofaScore Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-sofascore.png)

1. **Input.** Give URLs, names, match ids, or a sport with days. They can be combined in one run.
2. **Resolve.** Each URL is recognised as a match, team, player, league or sport page. Names go through SofaScore's search and the best hits are followed.
3. **Collect.** The actor fetches the data for each item. A day list reads one page per country with matches that day and puts the most-followed leagues first.
4. **Add details.** For each match it requests the details you chose, one request per option.
5. **Output.** Rows land in the dataset, ready as JSON, CSV or Excel, or through the Apify API.

### Input Configuration

#### Input fields

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array | none | SofaScore match, team, player, league or sport page URLs |
| `searchQueries` | array | none | Team, player, league or match names |
| `searchType` | string | `all` | `all`, `teams`, `players`, `tournaments` or `matches` |
| `maxResultsPerQuery` | integer | `5` | Search hits followed per name, 1 to 20 |
| `sports` | array | none | Sports to list matches for, by day or live |
| `liveOnly` | boolean | `false` | Only matches in play now |
| `dateFrom`, `dateTo` | string | today | Days to list, `YYYY-MM-DD` in UTC, up to 31 days |
| `daysBack`, `daysAhead` | integer | `0` | Days before and after today, 0 to 30, used when no date is set |
| `matchPeriod` | string | `all` | `all`, `finished` or `upcoming` |
| `matchDetails` | array | four options | See the table below. `[]` returns scores only |
| `leagueData` | array | `info`, `standings`, `matches` | Also `playerStats` |
| `season` | string | current | `24/25`, `2024/2025`, `2024` or a season id |
| `teamData` | array | `squad` | Also `seasonStatistics`, `transfers`, `matches` |
| `playerData` | array | `seasonStatistics`, `transferHistory` | Also `nationalTeam`, `attributes`, `matches` |
| `matchIds` | array | none | SofaScore match ids |
| `maxItems` | integer | `100` | Cap on rows saved. Free plan: 100 per run |

At least one of `startUrls`, `searchQueries`, `matchIds` and `sports` is needed, otherwise the run fails with a message that says so. They can be combined in one run.

#### Details per match

Pick any of these in `matchDetails`. Each one is one more request per match, so a shorter list means faster runs and smaller rows.

| Option | What it adds |
|---|---|
| `venue` | Stadium, city, capacity, referee, attendance, both managers |
| `statistics` | Every statistic SofaScore shows, for the full match and per period, plus `stats` with the full-match figures keyed by name |
| `lineups` | Formation, starters and substitutes with rating, minutes and per-player statistics, missing players with the reason |
| `incidents` | Goals with assists, cards, substitutions, VAR decisions, period scores |
| `odds` | All markets with opening and current odds in decimal and fractional form |
| `h2h` | Wins, draws and losses between the two teams and between the two managers |
| `votes` | Fan votes: who wins, both teams to score, first to score |
| `shotmap` | Every shot with player, coordinates, body part, situation and xG |
| `bestPlayers` | The top-rated players of the match |
| `momentum` | The attack-momentum graph, minute by minute |
| `commentary` | Text commentary |
| `averagePositions` | Average pitch position of each player |
| `form` | League position, points and last five results of both teams before kick-off |
| `streaks` | Team streaks, overall and head-to-head |
| `winProbability` | SofaScore's win probability, when it publishes one |

Default: `venue`, `statistics`, `lineups`, `incidents`.

Statistics, incidents, shot map, top players, momentum, commentary and average positions exist only once a match has started, so they are not requested for fixtures. How much SofaScore records depends on the league: a Premier League match has all of the above, a regional youth match may have the score only.

A match row with the four default details is about 90 KB, and about 250 KB with all fifteen. Set `matchDetails` to `[]` or to `["statistics"]` when you only need scores and headline figures.

#### Common scenarios

Today's football with statistics:

```json
{
    "sports": ["football"],
    "matchDetails": ["statistics", "incidents"],
    "maxItems": 200
}
```

Yesterday's results, every morning. Save this as a task and put it on a daily schedule:

```json
{
    "sports": ["football", "basketball"],
    "daysBack": 1,
    "matchPeriod": "finished",
    "maxItems": 1000
}
```

Sports are read in the order you list them, and `maxItems` counts across all of them. To get a fair share of each sport, raise `maxItems` or run one sport per task.

Live scores with odds:

```json
{
    "sports": ["tennis"],
    "liveOnly": true,
    "matchDetails": ["statistics", "odds"]
}
```

A full league season:

```json
{
    "startUrls": [{ "url": "https://www.sofascore.com/football/tournament/england/premier-league/17" }],
    "season": "24/25",
    "leagueData": ["info", "standings", "matches", "playerStats"],
    "matchDetails": ["statistics"],
    "maxItems": 2000
}
```

Teams and players by name:

```json
{
    "searchQueries": ["Real Madrid", "Erling Haaland"],
    "maxResultsPerQuery": 1,
    "teamData": ["squad", "seasonStatistics", "transfers"],
    "playerData": ["seasonStatistics", "transferHistory", "nationalTeam"]
}
```

### Output Overview

Every row has a `type`: `match`, `team`, `player`, `league`, `standing` or `playerSeasonStats`. Filter on it when a run mixes kinds.

- **`match`**: one row per match. Teams, score, league, round, status and start time are flat columns. The details you chose (statistics, lineups, incidents, odds and the rest) are nested in the same row.
- **`team`** and **`player`**: one row per profile, with the squad, season statistics and transfers nested inside.
- **`league`**: one row per league season, with the list of every season SofaScore has for it.
- **`standing`**: one row per team of a league table.
- **`playerSeasonStats`**: one row per player of a league season.

Fields SofaScore does not have for a row are `null` or an empty list. A fixture has no statistics yet, and a lower league may have the score only.

The dataset has table views for the Output tab: Overview, Matches, Standings, Teams and Players. Each shows the flat columns of that row type. The full nested rows are in the JSON export.

### Output Samples

#### Match URL start: a `match` row

Shortened. The real row has 134 statistics lines, 40 lineup players and 24 incidents.

```json
{
    "type": "match",
    "matchId": "16363879",
    "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879",
    "sport": "football",
    "country": "England",
    "tournament": "Premier League",
    "tournamentId": "17",
    "season": "Premier League 26/27",
    "round": "6",
    "status": "finished",
    "statusDescription": "Ended",
    "startTime": "2026-10-10T16:30:00.000Z",
    "homeTeam": "Manchester United",
    "homeTeamId": "35",
    "awayTeam": "Tottenham Hotspur",
    "awayTeamId": "33",
    "homeScore": 1,
    "awayScore": 1,
    "winner": "draw",
    "homePeriodScores": [0, 1],
    "awayPeriodScores": [0, 1],
    "homeRedCards": 0,
    "awayRedCards": 1,
    "venue": "Old Trafford",
    "venueCity": "Manchester",
    "venueCapacity": 74879,
    "referee": "Stuart Attwell",
    "homeManager": "Michael Carrick",
    "awayManager": "Roberto De Zerbi",
    "stats": {
        "ballPossession": { "home": 50, "away": 50 },
        "expectedGoals": { "home": 0.77, "away": 1.56 },
        "totalShotsOnGoal": { "home": 12, "away": 12 }
    },
    "statistics": [
        { "period": "ALL", "group": "Match overview", "name": "Ball possession", "key": "ballPossession", "home": "50%", "away": "50%", "homeValue": 50, "awayValue": 50 }
    ],
    "lineups": {
        "confirmed": true,
        "home": {
            "formation": "4-2-3-1",
            "players": [
                { "id": "927083", "name": "Bryan Mbeumo", "position": "F", "shirtNumber": 19, "substitute": false, "captain": false, "rating": 8.5, "minutesPlayed": 90, "marketValue": 73000000, "marketValueCurrency": "EUR", "statistics": { "totalPass": 18, "accuratePass": 16 } }
            ],
            "missingPlayers": []
        }
    },
    "incidents": [
        { "type": "card", "class": "yellow", "time": 90, "addedTime": 8, "isHome": false, "reason": "Foul", "player": { "id": "1142335", "name": "Archie Gray" } }
    ],
    "scrapedAt": "2026-10-10T18:35:44.000Z"
}
```

#### League URL start: a `standing` row

One of the 20 standings rows of a Premier League run.

```json
{
    "type": "standing",
    "tournamentId": "17",
    "tournament": "Premier League",
    "sport": "football",
    "country": "England",
    "season": "Premier League 26/27",
    "seasonId": "96668",
    "group": "Premier League 26/27",
    "position": 1,
    "team": "Manchester City",
    "teamId": "17",
    "teamUrl": "https://www.sofascore.com/football/team/manchester-city/17",
    "matches": 6,
    "wins": 6,
    "draws": 0,
    "losses": 0,
    "scoresFor": 16,
    "scoresAgainst": 5,
    "goalDifference": 11,
    "points": 18,
    "qualification": "Champions League",
    "sourceUrl": "https://www.sofascore.com/football/tournament/england/premier-league/17",
    "scrapedAt": "2026-10-11T22:45:02.070Z"
}
```

### Key Output Fields

#### Every row

`type`, `sport`, `sourceUrl`, `scrapedAt`, and `searchQuery` when the row came from a name search.

#### Match

`matchId`, `url`, `country`, `tournament`, `tournamentId`, `season`, `round`, `status`, `statusDescription`, `startTime`, `homeTeam`, `awayTeam`, `homeScore`, `awayScore`, `winner`, `homePeriodScores`, `awayPeriodScores`, `homeRedCards`, `awayRedCards`, `venue`, `venueCity`, `venueCapacity`, `referee`, `attendance`, `homeManager`, `awayManager`.

#### Match details

One field per option you chose: `statistics[]` and `stats`, `lineups`, `incidents[]`, `odds[]`, `h2h`, `votes`, `shotmap[]`, `bestPlayers`, `momentum[]`, `commentary[]`, `averagePositions`, `form`, `streaks`, `winProbability`.

#### Team

`teamId`, `name`, `country`, `league`, `manager`, `venue`, `venueCapacity`, `foundedYear`, `followers`, `form`, `squad[]`, `seasonStatistics`, `transfersIn[]`, `transfersOut[]`. Tennis players, darts players and fighters are `team` rows with an `athlete` block (birth date, height, plays, prize money, ranking).

#### Player

`playerId`, `name`, `team`, `position`, `country`, `dateOfBirth`, `age`, `height`, `preferredFoot`, `marketValue`, `contractUntil`, `seasonStatistics[]` (one entry per league season), `transferHistory[]`.

#### League and standings

- `league`: `tournamentId`, `name`, `country`, `season`, `tier`, `titleHolder`, `mostTitlesTeams`, `startDate`, `endDate`, `seasonInfo` (goals, home and away wins, draws, cards), `seasons[]`.
- `standing`: `tournament`, `season`, `group`, `position`, `team`, `matches`, `wins`, `draws`, `losses`, `scoresFor`, `scoresAgainst`, `goalDifference`, `points`, `qualification`.

#### Player statistics of a league season

`playerSeasonStats`: `tournament`, `season`, `rank`, `player`, `team`, and the figures. For football these are `rating`, `appearances`, `minutesPlayed`, `goals`, `assists`, `expectedGoals` and 17 more.

Player statistics for a league come in two shapes, because SofaScore publishes them in two shapes. Football leagues have a full table with every player. Other sports have leaderboards (the top 50 per figure), which this actor merges into one row per player.

### FAQ

#### Do I need a proxy or a SofaScore account?

No. Leave everything else as it is and run.

#### How much does it cost?

| Event | Price |
|---|---|
| Run start | $0.005 per GB of memory (the default 1 GB run starts at $0.005) |
| Each row | $0.001 |

- 100 matches with statistics, lineups and incidents: about $0.10.
- A football season (380 matches, 20 standings rows, 1 league row): about $0.40.
- One team with its squad and transfers: $0.001.

Free Apify plans get up to 100 rows per run.

#### How fast is a run?

A day list reads one page per country with matches that day (about 200 requests for football), then the details per match. On 10 October 2026 a 100-match football run with the four default details took 20 seconds, and 3,000 matches took about two and a half minutes.

#### Why does a match have no lineups or statistics?

SofaScore does not record them for every league, and statistics do not exist before kick-off. The row still has teams, score, status and time.

#### Which day does a match belong to?

Days are UTC. A match that kicks off at 01:00 UTC on the 11th belongs to the 11th, even where local time still says the 10th.

#### Can I get historical seasons?

Yes. Give a league URL and a `season` such as `19/20`. The `league` row lists every season SofaScore has for that league.

#### What are the odds?

The odds SofaScore displays, converted from fractional to decimal, with the opening price and whether each selection won.

#### How do I get only one kind of row?

Choose what each source returns: `leagueData`, `teamData` and `playerData` control which rows a league, team or player produces.

#### Can I get a live feed?

Each run is a snapshot. For a live feed, schedule the same task every few minutes and use `matchId` as the key.

#### Can it read data behind a SofaScore login?

No. The actor reads only what SofaScore shows to everyone. It does not sign in, and it has no access to account data such as favourites or notifications.

### Support

Found a field that is missing or a URL that is not recognised? Open an issue on the actor's [Issues tab](https://apify.com/memo23/sofascore-scraper/issues) with the input you used. Issues are answered within 1 to 2 business days.

### Additional Services

Need a custom export shape, a scheduled feed straight into your database, or a scraper for another sports or odds site? Contact me through the actor page. Custom builds are available.

### Explore More Scrapers

- [**Tennis Scraper: Flashscore, SofaScore and TennisExplorer**](https://apify.com/memo23/flashscore-sofascore-tennis-scraper): tennis fixtures, results, match statistics, odds with line movement, player profiles and ATP and WTA rankings from three sites in one actor.
- [**MLB Stats Scraper**](https://apify.com/memo23/mlb-stats-scraper): baseball teams, players, scores and standings.
- [**UFC & MMA Stats Scraper**](https://apify.com/memo23/ufc-mma-stats-scraper): fighters, fights, events and rankings.
- [**Kalshi Markets API**](https://apify.com/memo23/kalshi-markets-api): prediction-market odds, volume and open interest.
- [**Polymarket Signals**](https://apify.com/memo23/polymarket-signals-scraper): whale flow, arbitrage and odds moves on Polymarket.

Full list at [apify.com/memo23](https://apify.com/memo23): job boards, review platforms, real-estate portals, flight prices and more, all pay-per-result.

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor through the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/sofascore-scraper`).

**Purpose:** SofaScore data for 24 sports as typed JSON rows: matches with optional statistics, lineups, incidents and odds, plus teams, players, leagues and standings.

**Minimal input:**

```json
{ "sports": ["football"], "maxItems": 50 }
```

**Output:** one dataset row per item, with `type` = `match`, `team`, `player`, `league`, `standing` or `playerSeasonStats`. A match row has `matchId`, `url`, `sport`, `country`, `tournament`, `round`, `status`, `startTime`, `homeTeam`, `awayTeam`, `homeScore`, `awayScore`, `winner`, `venue`, `referee`, `stats {key: {home, away}}`, `statistics[]`, `lineups {home, away}`, `incidents[]`, `odds[]`.

**Behaviors an agent should know:**

- Always set `maxItems`. The default is 100, and a full day of football is about 8,000 matches.
- A match row with the default details is about 90 KB. Pass `"matchDetails": []` for scores only, or `["statistics"]` for scores and headline figures.
- At least one of `startUrls`, `searchQueries`, `matchIds` or `sports` is required. A run with none of them fails at once with a message naming the fields. They can be combined in one run.
- To resolve a name, pass it in `searchQueries` with `maxResultsPerQuery: 1`. No id lookup is needed first.
- Days are UTC. `dateFrom` and `dateTo` take `YYYY-MM-DD` and cover up to 31 days. Without dates, `daysBack` and `daysAhead` count from today.
- A URL that is not a match, team, player, league or sport page is skipped and named in the log. A run that finds nothing ends as succeeded with no rows.
- Billing: $0.005 per GB of memory at run start, then $0.001 per row. Match details cost nothing extra. Free plans stop at 100 rows per run.
- Tennis players, darts players and fighters come back as `team` rows.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Sofa IT d.o.o., the operator of SofaScore (sofascore.com), or any of its subsidiaries, nor by any league, club, federation or bookmaker whose data or odds appear in the output. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available match, team, player and league data. It uses no authenticated endpoints, no paid features and no content behind the sofascore.com login. Odds data is informational, and nothing in this actor's output is betting advice. Users are responsible for making sure their use complies with SofaScore's Terms of Service, applicable data-protection law (GDPR, CCPA and others), local gambling regulations, and any contractual obligations of their own organisation.

***

### SEO Keywords

sofascore scraper, scrape SofaScore, SofaScore API, sofascore.com scraper, Apify SofaScore, live scores scraper, football data scraper, soccer data API, match statistics scraper, football lineups and player ratings, football odds data, xG data export, shot map data, league standings scraper, football fixtures and results, player statistics export, football transfers data, sports betting data, fantasy football data, basketball scores scraper, tennis live scores, sports data API

# Actor input Schema

## `startUrls` (type: `array`):

Any match, team, player or league page from sofascore.com. A sport page (sofascore.com/basketball) lists that sport's matches for today. Examples:

- Match: https://www.sofascore.com/football/match/arsenal-leeds-united/JsR#id:16363871
- Team: https://www.sofascore.com/football/team/arsenal/42
- Player: https://www.sofascore.com/football/player/erling-haaland/839956
- League: https://www.sofascore.com/football/tournament/england/premier-league/17

## `searchQueries` (type: `array`):

Team, player, league or match names, one per line (for example: Real Madrid, Nikola Jokic, Serie A). The run follows the best hits and returns their data, so you do not need a URL or an id.

## `searchType` (type: `string`):

Limit the search to one kind of result. "Anything" takes SofaScore's own ranking across all kinds.

## `maxResultsPerQuery` (type: `integer`):

How many of the top search hits to return for each name.

## `sports` (type: `array`):

Lists every match of the chosen sports for the days set below, the most-followed leagues first. Leave empty if you only want the URLs and names above.

## `liveOnly` (type: `boolean`):

Return only the matches in play right now for the chosen sports. The day settings below are then ignored.

## `dateFrom` (type: `string`):

First day to list, as YYYY-MM-DD in UTC. Leave empty to count from today with the two fields below.

## `dateTo` (type: `string`):

Last day to list. Leave empty for a single day. A run covers up to 31 days.

## `daysBack` (type: `integer`):

For scheduled runs: include this many days before today. Ignored when a From date is set. Example: 1 with "Finished only" gives yesterday's and today's results every time the run starts.

## `daysAhead` (type: `integer`):

For scheduled runs: include this many days after today. Ignored when a From date is set. Example: 7 with "Upcoming only" gives the coming week's fixtures.

## `matchPeriod` (type: `string`):

Applies to day lists and to the matches of a league, team or player.

## `matchDetails` (type: `array`):

Each option is one extra request per match, so fewer options means faster runs and smaller rows. Statistics, incidents, shot map, top players, momentum, commentary and average positions exist only once a match has started.

## `leagueData` (type: `array`):

What a league URL or a league found by name returns. Standings give one row per team. Matches give one row per match of the season. Player statistics give one row per player.

## `season` (type: `string`):

For leagues: 24/25, 2024/2025, 2024 or a SofaScore season id. Leave empty for the current season.

## `teamData` (type: `array`):

What a team row carries besides the profile (manager, venue, league, followers, form). "Matches" adds one row per match of the team.

## `playerData` (type: `array`):

What a player row carries besides the profile (team, position, age, height, market value, contract). "Matches" adds one row per match the player took part in.

## `matchIds` (type: `array`):

SofaScore match ids, one per line (the number after #id: in a match URL). Handy when you already store ids from an earlier run.

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

The run stops after this many rows. One row is one match, team, player, league, standings line or player-statistics line. Free Apify plans get up to 100 rows per run.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879"
    }
  ],
  "searchType": "all",
  "maxResultsPerQuery": 5,
  "liveOnly": false,
  "daysBack": 0,
  "daysAhead": 0,
  "matchPeriod": "all",
  "matchDetails": [
    "venue",
    "statistics",
    "lineups",
    "incidents"
  ],
  "leagueData": [
    "info",
    "standings",
    "matches"
  ],
  "teamData": [
    "squad"
  ],
  "playerData": [
    "seasonStatistics",
    "transferHistory"
  ],
  "maxItems": 100
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = { "startUrls": [{ "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879" }] }

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.sofascore.com/football/match/manchester-united-tottenham-hotspur/IsK#id:16363879"
    }
  ]
}' |
apify call memo23/sofascore-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/sofascore-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/frXwdfGeGNb2a8Y7N/builds/IpXNgpUMxNVQBRfd5/openapi.json
