# Flashscore Scraper (`khadinakbar/flashscore-scraper`) Actor

Scrape Flashscore live scores, results, fixtures, standings, H2H and match stats across football, tennis, basketball and 30+ sports. HTTP-only, MCP-ready.

- **URL**: https://apify.com/khadinakbar/flashscore-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** News, Automation, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 match records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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.

- **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 Scraper — Live Scores, Results, Fixtures, Standings & Stats

Scrape **Flashscore** sports data across **football, tennis, basketball, hockey and 30+ other sports** — in one actor. Pull live scores, finished results, upcoming fixtures, league standings, head-to-head history, and full match detail (statistics, lineups, incidents). HTTP-only against Flashscore's own data feed, so it is fast, cheap, and reliable — no slow headless browser. Built MCP-ready for AI agents.

### What you get

| Mode | What it returns |
|------|-----------------|
| **Live scores** | Matches in progress with running score and status |
| **Results** | Finished matches with final score |
| **Fixtures** | Upcoming scheduled matches and kick-off times |
| **Standings** | Full league/group table — rank, W/D/L, goals, points |
| **Head-to-head** | Prior meetings between two teams |
| **Match detail** | Statistics, lineups & formations, incidents (goals/cards/subs) |

### When to use it

- Building a **betting model** or odds/value tool that needs structured results and stats.
- Powering a **sports dashboard, app, or Discord/Telegram bot** with live scores.
- **Data analysts and researchers** collecting historical results across leagues.
- **AI agents** that need a clean sports-data tool call (single sport/date or match URL in, JSON out).

Not the right tool for: sportsbook odds-only feeds, or live in-play tick-by-tick streaming.

### Output sample

List record (one per match):

```json
{
  "recordType": "match",
  "matchId": "2L651Hgn",
  "sport": "football",
  "country": "Argentina",
  "league": "Primera Nacional",
  "homeTeam": "Nueva Chicago",
  "awayTeam": "Atl. Rafaela",
  "homeScore": 0,
  "awayScore": 0,
  "status": "finished",
  "startTime": "2026-06-23T21:30:00.000Z",
  "matchUrl": "https://www.flashscore.com/match/2L651Hgn/"
}
```

Match-detail record adds `statistics[]`, `incidents[]`, `lineups`, `standings[]`, and `headToHead[]`.

### Pricing

Pay-per-event:

| Event | Price |
|-------|-------|
| Actor start | $0.00005 |
| Match record (list row) | **$0.003** |
| Match detail (stats, lineups, incidents, standings, H2H) | **$0.005** |

A typical 100-match list pull costs about **$0.30**. You set a hard `maxResults` cap on every run, and the run prints its maximum cost before billing anything.

### Input

| Field | Description |
|-------|-------------|
| `sport` | Sport to scrape by day (football, tennis, basketball, ...). Default `football`. |
| `dayOffsets` | Days relative to today: `0` = today, `-1` = yesterday's results, `1` = tomorrow's fixtures. Range −7…+7. |
| `date` | Single exact day `YYYY-MM-DD` (within 7 days). Overrides `dayOffsets`. |
| `matchUrls` | Flashscore match URLs or raw IDs → runs **detail mode** for those matches. |
| `detailSections` | Which detail sections to fetch: summary, stats, incidents, lineups, standings, h2h. |
| `enrichListWithDetails` | In list mode, also attach full match detail to every match (extra cost). Default off. |
| `maxResults` | Hard cap on billable records. Default 100. |
| `language` | Feed language for labels (`en`, `es`, `de`, ...). Default `en`. |
| `sportId` | Advanced: numeric Flashscore sport ID for a sport not in the dropdown. |

#### Example — yesterday's football results

```json
{ "sport": "football", "dayOffsets": [-1], "maxResults": 200 }
```

#### Example — full detail for specific matches

```json
{
  "matchUrls": ["https://www.flashscore.com/match/2L651Hgn/"],
  "detailSections": ["stats", "lineups", "incidents", "standings", "h2h"]
}
```

### How it works

The actor calls Flashscore's internal data feed directly and parses its compact delimited format into clean, flat JSON. List mode pulls a whole day of matches per sport; detail mode resolves each match ID and fetches the requested sections. Requests run through Apify Proxy with retry, backoff, and graceful degradation — a single bad match never crashes the batch, and partial results are always returned.

### Use with AI agents (MCP)

This actor is exposed through the Apify MCP server as `apify--flashscore-scraper`. An agent can ask for a sport + date, or hand it a match URL, and receive structured JSON it can reason over directly. Input fields and output keys are written for LLM consumption.

### FAQ

**How far back can I scrape?** List mode covers −7 to +7 days (the feed's window). Match detail works for any match whose page still exists, including older matches.

**Which sports are supported?** Football, tennis, basketball, ice hockey, American football, baseball, handball, rugby (union & league), floorball, futsal, volleyball, cricket, darts, snooker, boxing, badminton, water polo, table tennis, MMA — plus any other via the numeric `sportId`.

**Do I need a login or cookies?** No. It uses public data feeds only.

**Why are some fields null?** Not every sport or match exposes every field (e.g. a future fixture has no score yet). Nulls are explicit and consistent.

### Legal

This tool accesses publicly available data for personal, research, and analytical use. You are responsible for complying with Flashscore's Terms of Service and all applicable laws, including data-protection regulations, in your jurisdiction. Do not use scraped data to infringe copyright or redistribute in violation of the source's terms. This actor is not affiliated with, endorsed by, or connected to Flashscore.

# Actor input Schema

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

Sport to scrape in list mode (by day). Pick the sport whose matches you want. Defaults to 'football'. For a sport not listed here, leave this and set the numeric 'sportId' instead.

## `dayOffsets` (type: `array`):

Which days to scrape in list mode, relative to today. 0 = today, -1 = yesterday's results, 1 = tomorrow's fixtures. Range -7 to 7. Example: \[-1, 0, 1]. Ignored when 'date' or 'matchUrls' is set.

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

Single calendar day to scrape in list mode, as YYYY-MM-DD (e.g. 2026-06-26). Must be within 7 days of today (Flashscore feed limit). Overrides 'dayOffsets'. Leave empty to use 'dayOffsets'.

## `matchUrls` (type: `array`):

Flashscore match URLs or raw 8-char match IDs to fetch full match detail for (stats, lineups, incidents, standings, H2H). Example: 'https://www.flashscore.com/match/2L651Hgn/' or '2L651Hgn'. When set, the actor runs detail mode and ignores sport/day inputs.

## `detailSections` (type: `array`):

Which sections to include for each match in detail mode (and when 'enrichListWithDetails' is on). Defaults to summary, stats, incidents and lineups. Add 'standings' for the league table and 'h2h' for head-to-head history.

## `enrichListWithDetails` (type: `boolean`):

In list mode, also fetch full match detail for every match found and nest it under each record. This is slower and bills an extra match-detail event per match. Defaults to false. Leave off for fast, cheap list scraping.

## `maxResults` (type: `integer`):

Hard cap on billable records produced this run (list rows or match details). Protects your budget. Defaults to 100. Set higher for full-day or multi-day pulls.

## `language` (type: `string`):

Feed language code for team/league naming (e.g. 'en', 'es', 'de', 'fr'). Defaults to 'en'. This affects text labels only, not which matches are returned.

## `sportId` (type: `integer`):

Advanced override: Flashscore's numeric sport ID, used only for a sport not in the 'sport' dropdown. Example: 1 = football, 2 = tennis, 3 = basketball. Leave empty to use the 'sport' field.

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

Proxy settings. Defaults to Apify Proxy (datacenter), which the Flashscore feed tolerates. Switch to residential only if you hit blocks.

## Actor input object example

```json
{
  "sport": "football",
  "dayOffsets": [
    0
  ],
  "date": "2026-06-26",
  "matchUrls": [],
  "detailSections": [
    "summary",
    "stats",
    "incidents",
    "lineups"
  ],
  "enrichListWithDetails": false,
  "maxResults": 100,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `matches` (type: `string`):

Match list rows and/or match-detail records produced by the run.

## `summary` (type: `string`):

Detailed terminal diagnostics and billing counters.

## `output` (type: `string`):

Stable machine-readable terminal outcome and delivery counters.

# 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",
    "dayOffsets": [
        0
    ],
    "matchUrls": [],
    "maxResults": 100,
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/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",
    "dayOffsets": [0],
    "matchUrls": [],
    "maxResults": 100,
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/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",
  "dayOffsets": [
    0
  ],
  "matchUrls": [],
  "maxResults": 100,
  "language": "en"
}' |
apify call khadinakbar/flashscore-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2zr3ryDGgOPbAspYG/builds/DxAsuLjUu7tllfnBX/openapi.json
