# Sofascore Scraper (`scrapesmith/sofascore-scraper`) Actor

Scrape Sofascore for live scores, fixtures, match stats, lineups, incidents, odds, standings, teams and players. 110+ fields with 9 enrichments. Football, basketball, tennis and 10+ sports. JSON/CSV/Excel. API, MCP, webhook, AI-agent ready.

- **URL**: https://apify.com/scrapesmith/sofascore-scraper.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Scraper

**Live sports data — matches, teams, players, standings — clean structured JSON in seconds.**

Extract live scores, fixtures, results, team profiles, player profiles, and league/tournament data from Sofascore in clean, structured JSON — no coding required. Built for sports bettors, fantasy sports players, sports media teams, data analysts, and AI agents that need reliable, structured sports data on demand.

### 🎯 Why Use This Scraper

✅ **One actor, every sports data need** — pull live matches, scheduled fixtures, team pages, player pages, and tournament standings from a single tool instead of stitching together multiple sources.

✅ **Clean, analysis-ready output** — every match, team, and player record is normalized into consistent fields, so you can plug the data straight into a spreadsheet, database, or machine learning pipeline without cleanup.

✅ **No-code web scraping** — set your inputs (sport, date, teams, or search terms) and run; the actor handles the rest and hands you a ready-to-use dataset.

✅ **Built for automation** — export instantly to JSON, CSV, Excel, or XML, or wire the actor into your existing stack via API, webhook, or no-code automation tools like Zapier, Make, and n8n.

### 🚀 Features

✅ Scrape **live, in-play matches** across football/soccer and many other sports, updated on demand.

✅ Pull **scheduled fixtures and results** for any date, with support for looking ahead multiple days.

✅ Fetch data directly from **match, team, player, or tournament URLs** for targeted collection.

✅ **Search by name** to find teams, players, or tournaments and retrieve their full profile data.

✅ Detailed **match statistics** — possession, shots, passes, xG, and more, where available.

✅ **Lineups and formations** — starting XI, substitutes, and player ratings per match.

✅ **Match incidents** — goals, cards, substitutions, and other key match events in sequence.

✅ **League standings** and current-season tournament context attached to matches and team results.

✅ **Team squads and player profiles**, including position, market value, and career/contract details.

✅ Optional **betting market and fan-vote data**, plus historical **head-to-head records** between teams.

### 📊 Output Fields

The scraper returns different record shapes depending on what you're collecting (matches, teams, players, or tournaments). Every field below is a real field name produced by the actor.

#### ⏱️ Match / Event Info

| Field | Description |
|---|---|
| `type` | Record type, e.g. `"match"` |
| `id` | Unique Sofascore match/event ID |
| `sport` | Sport slug (e.g. `football`, `basketball`, `tennis`) |
| `country` | Category/region the competition belongs to |
| `tournament` | Tournament name for this specific match |
| `tournamentSlug` | URL-friendly tournament identifier |
| `uniqueTournamentId` | ID of the parent competition (stable across seasons) |
| `uniqueTournamentName` | Name of the parent competition |
| `seasonName` | Season label (e.g. `2025/2026`) |
| `seasonYear` | Season year |
| `round` | Round or matchday number |
| `startTimestamp` | Match kickoff time (Unix timestamp) |
| `startTime` | Match kickoff time (ISO 8601) |
| `eventSlug` | URL-friendly match identifier |
| `customId` | Sofascore custom short ID |
| `url` | Direct link to the match page |
| `scrapedAt` | Timestamp when the record was collected |

#### 🏆 Score & Status

| Field | Description |
|---|---|
| `homeScore` | Current/final score for the home side |
| `awayScore` | Current/final score for the away side |
| `homeScorePeriod1` / `homeScorePeriod2` | Home team score by period/half |
| `awayScorePeriod1` / `awayScorePeriod2` | Away team score by period/half |
| `homeScoreNormaltime` / `awayScoreNormaltime` | Score at the end of regulation time |
| `homeScorePenalties` / `awayScorePenalties` | Penalty shootout score, if applicable |
| `statusCode` | Numeric match status code |
| `statusType` | Match status category (e.g. finished, live, scheduled) |
| `statusDescription` | Human-readable match status |
| `winnerCode` | Indicates which side won (or draw) |
| `hasXg` | Whether expected-goals data is available for this match |

#### ⚽ Team Info (Match Context)

| Field | Description |
|---|---|
| `homeTeamId` / `awayTeamId` | Unique team IDs |
| `homeTeamName` / `awayTeamName` | Full team names |
| `homeTeamShortName` / `awayTeamShortName` | Short team names |
| `homeTeamSlug` / `awayTeamSlug` | URL-friendly team identifiers |
| `homeTeamCountry` / `awayTeamCountry` | Country each team represents |

#### 🏟️ Venue & Match Officials

| Field | Description |
|---|---|
| `venue` | Stadium/arena name |
| `venueCity` | City where the venue is located |
| `venueCountry` | Country where the venue is located |
| `venueCapacity` | Stadium capacity |
| `referee` | Match referee name |
| `attendance` | Reported match attendance |

#### 👥 Team Profile

| Field | Description |
|---|---|
| `type` | `"team"` |
| `id` | Unique team ID |
| `name` | Team name |
| `fullName` | Full official team name |
| `shortName` | Short team name |
| `slug` | URL-friendly team identifier |
| `nameCode` | Short abbreviation/code (e.g. `MUN`) |
| `sport` | Sport slug |
| `country` | Country the team represents |
| `category` | Competition category/tier |
| `national` | Whether this is a national team |
| `gender` | Team gender category |
| `managerName` | Current head coach/manager name |
| `venueName` | Home stadium/arena name |
| `venueCapacity` | Home stadium capacity |
| `venueCity` | Home stadium city |
| `primaryColor` / `secondaryColor` | Official team colors |
| `foundationDateTimestamp` | Club founding date (Unix timestamp) |
| `userCount` | Number of Sofascore followers/fans |
| `url` | Direct link to the team page |
| `squad` | Full roster array (when enabled): `id`, `name`, `position`, `jerseyNumber`, `height`, `country` per player |

#### 👤 Player Profile

| Field | Description |
|---|---|
| `type` | `"player"` |
| `id` | Unique player ID |
| `name` | Player full name |
| `shortName` | Short display name |
| `slug` | URL-friendly player identifier |
| `sofascoreId` | Sofascore-specific identifier |
| `position` | Playing position |
| `jerseyNumber` | Shirt/jersey number |
| `height` | Player height |
| `preferredFoot` | Preferred foot |
| `dateOfBirthTimestamp` | Date of birth (Unix timestamp) |
| `country` | Player's nationality |
| `gender` | Player gender category |
| `deceased` | Whether the player is deceased |
| `marketValue` | Estimated market value |
| `marketValueCurrency` | Currency of the market value figure |
| `contractUntilTimestamp` | Contract expiry date (Unix timestamp) |
| `teamId` / `teamName` | Current club ID and name |
| `userCount` | Number of Sofascore followers/fans |
| `url` | Direct link to the player page |

#### 🏅 Tournament / League Info

| Field | Description |
|---|---|
| `type` | `"tournament"` |
| `id` | Unique tournament ID |
| `name` | Tournament/league name |
| `slug` | URL-friendly tournament identifier |
| `sport` | Sport slug |
| `country` | Country/region of the competition |
| `category` | Competition category |
| `tier` | Competition tier/level |
| `hasStandings` | Whether a standings table is available |
| `titleHolderName` | Current title holder |
| `mostTitlesCount` | Number of titles held by the most successful team(s) |
| `mostTitlesTeamNames` | Names of the most successful team(s) |
| `primaryColor` | Competition brand color |
| `userCount` | Number of Sofascore followers/fans |
| `currentSeasonId` / `currentSeasonName` | Current season ID and label |
| `url` | Direct link to the tournament page |
| `standings` | League table array (when enabled) |

#### 📈 Optional Deep-Dive Data

When enabled in the input, match records can also include `statistics` (possession, shots, passes, xG and more), `lineups` (starting XI, substitutes, formations, ratings), `incidents` (goals, cards, substitutions in order), `odds` (betting markets, where available), `votes` (fan prediction polls), and `h2h` (head-to-head history between the two teams).

### 💼 Use Cases

✅ **Sports betting research** — build your own models and compare markets using structured match, score, and status data.

✅ **Fantasy sports** — track player positions, team form, and fixture data to optimize lineup decisions.

✅ **Sports journalism & media** — pull fast, structured match results and player/team profiles for articles, graphics, and match reports.

✅ **Machine learning & prediction models** — feed clean historical match, score, and statistics data into training pipelines for outcome prediction models.

✅ **Fan apps & live score widgets** — power a website, app, or dashboard with up-to-date match, team, and league data.

✅ **Historical stats analysis** — analyze team and player performance trends across seasons and tournaments.

✅ **Scouting & recruitment research** — compare player profiles, positions, and market values across leagues.

✅ **Academic & sports analytics research** — collect large, structured sports datasets for statistical studies.

### 📥 Input

Configure the actor with a simple JSON input — choose a mode, set your filters, and run:

```json
{
  "mode": "scheduled",
  "sports": ["football"],
  "date": "2026-08-15",
  "daysAhead": 2,
  "maxItems": 200,
  "includeVenueDetails": true,
  "includeStatistics": true,
  "includeLineups": true,
  "includeIncidents": true,
  "includeOdds": false,
  "includeVotes": false,
  "includeH2h": false,
  "includeStandings": true,
  "includeSquad": false
}
````

**Supported modes:**

🏆 **live** — currently in-play matches across your chosen sports.

🏆 **scheduled** — all matches for a target date (plus optional days ahead).

🏆 **url** — specific match, team, player, or tournament pages by direct link.

🏆 **search** — find teams, players, or tournaments by name/keyword.

You can also target specific entities directly with `urls` (direct Sofascore links) or `searchQueries` with an optional `searchType` filter (`all`, `team`, `player`, `tournament`). Use `maxItems` to cap the size of any run.

### 📤 Output Example

```json
{
  "type": "match",
  "id": 12847563,
  "sport": "football",
  "country": "Spain",
  "tournament": "LaLiga",
  "tournamentSlug": "laliga",
  "uniqueTournamentId": 8,
  "uniqueTournamentName": "LaLiga",
  "seasonName": "2025/2026",
  "seasonYear": "2025",
  "round": 3,
  "homeTeamId": 2817,
  "homeTeamName": "Atletico Madrid",
  "homeTeamShortName": "Atletico",
  "homeTeamSlug": "atletico-madrid",
  "homeTeamCountry": "Spain",
  "awayTeamId": 2829,
  "awayTeamName": "Real Madrid",
  "awayTeamShortName": "Real Madrid",
  "awayTeamSlug": "real-madrid",
  "awayTeamCountry": "Spain",
  "homeScore": 2,
  "awayScore": 1,
  "homeScorePeriod1": 1,
  "homeScorePeriod2": 1,
  "awayScorePeriod1": 0,
  "awayScorePeriod2": 1,
  "homeScoreNormaltime": 2,
  "awayScoreNormaltime": 1,
  "homeScorePenalties": 0,
  "awayScorePenalties": 0,
  "statusCode": 100,
  "statusType": "finished",
  "statusDescription": "Ended",
  "winnerCode": 1,
  "startTimestamp": 1755273600,
  "startTime": "2026-08-15T19:00:00.000Z",
  "hasXg": true,
  "venue": "Estadio Civitas Metropolitano",
  "venueCity": "Madrid",
  "venueCountry": "Spain",
  "venueCapacity": 68456,
  "referee": "Carlos Del Cerro Grande",
  "attendance": 65210,
  "eventSlug": "atletico-madrid-real-madrid",
  "customId": "EgbsLgb",
  "url": "https://www.sofascore.com/event/12847563",
  "scrapedAt": "2026-08-15T21:47:00.000Z"
}
```

### 📁 Export Formats

Every run produces a structured dataset you can download or connect elsewhere in the format that suits your workflow: **JSON**, **CSV**, **Excel (XLSX)**, or **XML**. Grab the data through the Apify platform UI, or automate the download entirely through the API.

### 🔗 Integrations

This scraper is built to fit straight into modern data and automation stacks:

🔗 **API** — trigger runs and retrieve results programmatically from any language or backend.

🔗 **MCP server** — connect this actor to an MCP server and let AI agents call it as a tool directly.

🔗 **AI agents & LLMs** — use it as a data source for **Claude**, **ChatGPT**, **LangChain**, and other AI agent frameworks that need live sports data.

🔗 **Webhooks** — get notified automatically the moment a run finishes or new data is ready.

🔗 **Zapier** — connect Sofascore data to thousands of other apps with zero code.

🔗 **Make** — build visual automation scenarios around scraped sports data.

🔗 **n8n** — plug this actor into self-hosted or cloud n8n workflows.

🔗 **Google Sheets** — pipe results straight into a spreadsheet for reporting and sharing.

### 💡 Tips for Best Results

💡 Use **scheduled** mode with a specific date and `daysAhead` to build a rolling fixture calendar instead of running repeated live-mode checks.

💡 Turn off deep-dive add-ons (`includeStatistics`, `includeLineups`, `includeOdds`, etc.) when you only need scores — it keeps runs faster and datasets smaller.

💡 Use **search** mode first to confirm a team, player, or tournament's exact identity before switching to **url** mode for repeated, targeted pulls.

💡 Set `maxItems` deliberately for large date ranges or broad searches to keep runs predictable.

💡 Schedule recurring runs (via the Apify platform or a webhook/automation tool) to keep a live-updating sports dataset without manual intervention.

### ❓ FAQ

**Does this scraper work for sports other than football/soccer?**
Yes. Sofascore covers many sports, and you can target any of them through the `sports` input for live and scheduled modes.

**Can I get data for a specific match, team, or player instead of a whole date range?**
Yes. Use **url** mode with a direct Sofascore link, or **search** mode with a name or keyword to find and retrieve the right entity.

**What format is the data delivered in?**
All results are delivered as a structured dataset, exportable to JSON, CSV, Excel, or XML directly from the platform.

**Can I automate this with my existing tools?**
Yes. The actor supports API access, webhooks, and no-code integrations including Zapier, Make, n8n, and Google Sheets, plus MCP and AI agent connections for Claude, ChatGPT, and LangChain-based workflows.

**Do I need any technical or coding skills to use this?**
No. Set your inputs through the simple form, run the actor, and download your results — no code required.

### 💳 Pricing

Pay only for results — no subscription required. Try it free.

### 🔗 Related Scrapers

Looking for other sports data sources? Check out our other sports scrapers to build out a complete, multi-source sports data pipeline.

# Actor input Schema

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

What to scrape: 'live' currently in-play matches, 'scheduled' all matches for a date, 'url' specific match/team/player/tournament pages, 'search' find teams/players/tournaments by name.

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

Sports to include for live/scheduled modes.

## `date` (type: `string`):

Target date in YYYY-MM-DD format for 'scheduled' mode. Defaults to today (UTC) if left blank.

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

Additional days after the target date to include in 'scheduled' mode (0-14).

## `urls` (type: `array`):

Direct SofaScore links to matches, teams, players, or tournaments (for 'url' mode).

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

Keywords for teams, players, or tournaments (for 'search' mode).

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

Restrict search results to a specific entity type.

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

Cap on total results returned across the whole run.

## `includeVenueDetails` (type: `boolean`):

Fetch stadium, referee and attendance for each match (one extra request per match).

## `includeStatistics` (type: `boolean`):

Possession, shots, passes, xG and other match stats.

## `includeLineups` (type: `boolean`):

Starting XI, substitutes, formations and player ratings.

## `includeIncidents` (type: `boolean`):

Goals, cards, substitutions and other match events.

## `includeOdds` (type: `boolean`):

Pre-match and live betting markets, where available.

## `includeVotes` (type: `boolean`):

Fan prediction polls (match winner, both teams to score, etc).

## `includeH2h` (type: `boolean`):

Historical head-to-head record between the two teams.

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

Current league table (for tournament URL/search results).

## `includeSquad` (type: `boolean`):

Full player roster (for team URL/search results).

## Actor input object example

```json
{
  "mode": "live",
  "sports": [
    "football"
  ],
  "date": "",
  "daysAhead": 0,
  "urls": [
    "https://www.sofascore.com/football/match/atletico-madrid-real-madrid/EgbsLgb"
  ],
  "searchQueries": [
    "Barcelona"
  ],
  "searchType": "all",
  "maxItems": 100,
  "includeVenueDetails": true,
  "includeStatistics": true,
  "includeLineups": true,
  "includeIncidents": true,
  "includeOdds": false,
  "includeVotes": false,
  "includeH2h": false,
  "includeStandings": true,
  "includeSquad": 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 = {
    "sports": [
        "football"
    ],
    "urls": [
        "https://www.sofascore.com/football/match/atletico-madrid-real-madrid/EgbsLgb"
    ],
    "searchQueries": [
        "Barcelona"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/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 = {
    "sports": ["football"],
    "urls": ["https://www.sofascore.com/football/match/atletico-madrid-real-madrid/EgbsLgb"],
    "searchQueries": ["Barcelona"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesmith/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 '{
  "sports": [
    "football"
  ],
  "urls": [
    "https://www.sofascore.com/football/match/atletico-madrid-real-madrid/EgbsLgb"
  ],
  "searchQueries": [
    "Barcelona"
  ]
}' |
apify call scrapesmith/sofascore-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sofascore Scraper",
        "description": "Scrape Sofascore for live scores, fixtures, match stats, lineups, incidents, odds, standings, teams and players. 110+ fields with 9 enrichments. Football, basketball, tennis and 10+ sports. JSON/CSV/Excel. API, MCP, webhook, AI-agent ready.",
        "version": "0.0",
        "x-build-id": "47yowvj7ViCoH4TsO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesmith~sofascore-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesmith-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/scrapesmith~sofascore-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesmith-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/scrapesmith~sofascore-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesmith-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": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "live",
                            "scheduled",
                            "url",
                            "search"
                        ],
                        "type": "string",
                        "description": "What to scrape: 'live' currently in-play matches, 'scheduled' all matches for a date, 'url' specific match/team/player/tournament pages, 'search' find teams/players/tournaments by name.",
                        "default": "live"
                    },
                    "sports": {
                        "title": "Sports",
                        "type": "array",
                        "description": "Sports to include for live/scheduled modes.",
                        "default": [
                            "football"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "date": {
                        "title": "Date",
                        "type": "string",
                        "description": "Target date in YYYY-MM-DD format for 'scheduled' mode. Defaults to today (UTC) if left blank.",
                        "default": ""
                    },
                    "daysAhead": {
                        "title": "Days ahead",
                        "minimum": 0,
                        "maximum": 14,
                        "type": "integer",
                        "description": "Additional days after the target date to include in 'scheduled' mode (0-14).",
                        "default": 0
                    },
                    "urls": {
                        "title": "SofaScore URLs",
                        "type": "array",
                        "description": "Direct SofaScore links to matches, teams, players, or tournaments (for 'url' mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQueries": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "Keywords for teams, players, or tournaments (for 'search' mode).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchType": {
                        "title": "Search type",
                        "enum": [
                            "all",
                            "team",
                            "player",
                            "tournament"
                        ],
                        "type": "string",
                        "description": "Restrict search results to a specific entity type.",
                        "default": "all"
                    },
                    "maxItems": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on total results returned across the whole run.",
                        "default": 100
                    },
                    "includeVenueDetails": {
                        "title": "Include venue/referee/attendance",
                        "type": "boolean",
                        "description": "Fetch stadium, referee and attendance for each match (one extra request per match).",
                        "default": true
                    },
                    "includeStatistics": {
                        "title": "Include match statistics",
                        "type": "boolean",
                        "description": "Possession, shots, passes, xG and other match stats.",
                        "default": true
                    },
                    "includeLineups": {
                        "title": "Include lineups",
                        "type": "boolean",
                        "description": "Starting XI, substitutes, formations and player ratings.",
                        "default": true
                    },
                    "includeIncidents": {
                        "title": "Include incidents",
                        "type": "boolean",
                        "description": "Goals, cards, substitutions and other match events.",
                        "default": true
                    },
                    "includeOdds": {
                        "title": "Include odds",
                        "type": "boolean",
                        "description": "Pre-match and live betting markets, where available.",
                        "default": false
                    },
                    "includeVotes": {
                        "title": "Include fan votes",
                        "type": "boolean",
                        "description": "Fan prediction polls (match winner, both teams to score, etc).",
                        "default": false
                    },
                    "includeH2h": {
                        "title": "Include head-to-head",
                        "type": "boolean",
                        "description": "Historical head-to-head record between the two teams.",
                        "default": false
                    },
                    "includeStandings": {
                        "title": "Include standings",
                        "type": "boolean",
                        "description": "Current league table (for tournament URL/search results).",
                        "default": true
                    },
                    "includeSquad": {
                        "title": "Include full squad",
                        "type": "boolean",
                        "description": "Full player roster (for team URL/search results).",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
