# FlashScore Live Sports Scraper (`crawlerbros/flashscore-scraper`) Actor

Scrape live matches from FlashScore for football, basketball, tennis, hockey, baseball and 11 other sports. Returns match ID, teams, live score, status, league, start time and optional event timeline.

- **URL**: https://apify.com/crawlerbros/flashscore-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 9 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## FlashScore Live Sports Scraper

Scrape live (or same-day) matches from **[FlashScore.com](https://www.flashscore.com)** for 14 sports including football (soccer), tennis, basketball, hockey, baseball, cricket, and more. Returns match ID, home / away teams, live score, status, league, country, start time, and match URL — all in one fast HTTP request.

### What it does

- Fetches matches from FlashScore's internal live-feed endpoint (no browser, no proxy, no cookies)
- Supports **14 sports** via a simple `sport` enum
- Optional **live-only filter** to return only matches currently in progress
- Clean, non-null output — empty fields are omitted so every record has only populated keys
- Hardcoded `X-Fsign` token + Chrome 131 TLS impersonation — runs from any datacenter IP

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `sport` | enum | `football` | One of: `football`, `tennis`, `basketball`, `hockey`, `american-football`, `baseball`, `handball`, `rugby-union`, `rugby-league`, `futsal`, `volleyball`, `cricket`, `darts`, `snooker` |
| `liveOnly` | boolean | `true` | If true, only matches currently in progress. If false, return all matches for today (scheduled + live + finished). |
| `maxItems` | integer | `100` | Maximum matches to return (1–1000) |

#### Example input

```json
{
    "sport": "football",
    "liveOnly": false,
    "maxItems": 10
}
````

### Output

Each match is a JSON record with the following fields (missing fields are omitted, never `null`):

| Field | Type | Always present | Description |
|---|---|---|---|
| `matchId` | string | ✓ | FlashScore match ID |
| `sport` | string | ✓ | The sport slug (same as the input) |
| `homeTeam` | string | ✓ | Home team name |
| `awayTeam` | string | ✓ | Away team name |
| `status` | string | ✓ | `scheduled`, `live`, `finished`, `half-time`, etc. |
| `statusCode` | number | ✓ | FlashScore's raw status code (`AB`) |
| `scrapedAt` | string | ✓ | UTC ISO 8601 scrape timestamp |
| `homeScore` | number | — | Current home score (omitted before kick-off) |
| `awayScore` | number | — | Current away score |
| `league` | string | — | League or tournament name, e.g. `ENGLAND: Premier League` |
| `country` | string | — | Country label from FlashScore's tree |
| `leaguePath` | string | — | Relative league URL path |
| `startTime` | string | — | ISO 8601 UTC kick-off time |
| `homeTeamShort` | string | — | 3-letter home team abbreviation |
| `awayTeamShort` | string | — | 3-letter away team abbreviation |
| `url` | string | — | Full match summary URL |

#### Sample output

```json
{
    "matchId": "bN6cMaFq",
    "sport": "football",
    "homeTeam": "Lanus",
    "awayTeam": "Banfield",
    "homeScore": 1,
    "awayScore": 0,
    "status": "finished",
    "statusCode": 3,
    "league": "ARGENTINA: Liga Profesional - Apertura",
    "country": "Argentina",
    "leaguePath": "/football/argentina/liga-profesional/",
    "startTime": "2026-04-13T13:20:00Z",
    "homeTeamShort": "LAN",
    "awayTeamShort": "BAN",
    "url": "https://www.flashscore.com/football/argentina/liga-profesional/lanus-banfield/#/match-summary",
    "scrapedAt": "2026-04-14T05:54:44Z"
}
```

### FAQ

**Do I need a proxy or cookies?**
No. FlashScore's internal feed accepts standard HTTP requests from any datacenter IP with just the `X-Fsign` token (which is hardcoded in the scraper) plus a Chrome 131 TLS fingerprint.

**How fresh is the data?**
Every run hits the live feed at request time. Live match scores update within seconds of the event.

**What does `liveOnly` do?**
Setting `liveOnly=true` filters the response to matches with a status code in the in-progress range (live, half-time, etc). Setting it to `false` returns all matches scheduled for today including finished ones — useful for overnight historical pulls.

**Why do some sports return 0 matches?**
Not every sport has live events running at every moment. For example, `american-football` will be empty outside the NFL season, and `cricket` will be empty outside the main test windows. The scraper returns `0 items` with `exit_code=0` in that case — it is not a failure.

**Are event timelines included?**
Not in the current release. The scraper returns match headers only. The per-match event timeline (goals, cards, substitutions) requires a second API call which is not yet implemented.

### Use cases

- **Sports betting signals** — monitor live score changes across 14 sports
- **Fantasy sports feeds** — ingest live scores into a fantasy scoring engine
- **Media sites** — power live score widgets for a sports publication
- **Stats research** — build historical datasets by running `liveOnly=false` daily
- **Notification services** — trigger alerts on specific team / league events

### Notes

- Pricing is configured in the Apify UI (pay-per-event or pay-per-result).
- The scraper uses a single HTTP request per run — very cheap to operate at the default `maxItems=100`.
- The daily Apify test run uses `sport=football`, `liveOnly=false`, `maxItems=5` against the live feed.

# Actor input Schema

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

Which sport to fetch live matches for.

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

If true, return only matches currently in progress. If false, return all matches for today (scheduled + live + finished).

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

Maximum number of matches to return.

## Actor input object example

```json
{
  "sport": "football",
  "liveOnly": true,
  "maxItems": 10
}
```

# 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 = {
    "sport": "football",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/flashscore-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 = {
    "sport": "football",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/flashscore-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 '{
  "sport": "football",
  "maxItems": 10
}' |
apify call crawlerbros/flashscore-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FlashScore Live Sports Scraper",
        "description": "Scrape live matches from FlashScore for football, basketball, tennis, hockey, baseball and 11 other sports. Returns match ID, teams, live score, status, league, start time and optional event timeline.",
        "version": "1.0",
        "x-build-id": "HDhfpZ2wEHGrW3XEh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~flashscore-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-flashscore-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/crawlerbros~flashscore-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-flashscore-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/crawlerbros~flashscore-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-flashscore-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": {
                    "sport": {
                        "title": "Sport",
                        "enum": [
                            "football",
                            "tennis",
                            "basketball",
                            "hockey",
                            "american-football",
                            "baseball",
                            "handball",
                            "rugby-union",
                            "rugby-league",
                            "futsal",
                            "volleyball",
                            "cricket",
                            "darts",
                            "snooker"
                        ],
                        "type": "string",
                        "description": "Which sport to fetch live matches for.",
                        "default": "football"
                    },
                    "liveOnly": {
                        "title": "Live matches only",
                        "type": "boolean",
                        "description": "If true, return only matches currently in progress. If false, return all matches for today (scheduled + live + finished).",
                        "default": true
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of matches to return.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
