# 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:** 76 total users, 5 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 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/actors/running/actors-in-store.md#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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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(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 '{
  "sport": "football",
  "maxItems": 10
}' |
apify call crawlerbros/flashscore-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/flashscore-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/ySzCevmuFcasFSkGw/builds/HDhfpZ2wEHGrW3XEh/openapi.json
