# FotMob Match Details Scraper (`powerbox/fotmob-match-details-scraper`) Actor

Full FotMob match details in one record — score, lineups, player stats, events, team stats, and venue.

- **URL**: https://apify.com/powerbox/fotmob-match-details-scraper.md
- **Developed by:** [PowerBox](https://apify.com/powerbox) (community)
- **Categories:** Agents
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

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

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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

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

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

# README

## FotMob Match Details Scraper

Turn any FotMob match into clean, structured JSON or CSV: final score, both teams' formations and lineups, per-player statistics and ratings, a goal / card / substitution timeline, head-to-head team-stat comparison (possession, shots, xG, passing, duels…), plus venue, referee, attendance, and player of the match — one normalized record per match.

Give it one or more match ids (or match URLs), toggle which sections you need, and download results from the Dataset tab.

### Features

- Score, status, league, venue, referee, attendance, player of the match
- Optional lineups (formation, starters, subs, coach)
- Optional events timeline (goals, cards, substitutions)
- Optional team-stat comparison (possession, shots, xG, …)
- Optional per-player stats and ratings (flat, analysis-ready)
- Optional head-to-head history between the two teams
- Optional full raw payload under `rawData`
- Accepts numeric ids or FotMob match URLs
- Failed lookups are reported in Key-value store `SUMMARY` and not written to the dataset

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `matchIds` | array | `["4506324"]` | FotMob match ids or match URLs |
| `includePlayerStats` | boolean | `true` | Per-player stats and ratings |
| `includeEvents` | boolean | `true` | Goal / card / substitution timeline |
| `includeLineups` | boolean | `true` | Formations, starters, subs, coach |
| `includeTeamStats` | boolean | `true` | Team-stat comparison |
| `includeH2H` | boolean | `false` | Previous meetings |
| `includeRawData` | boolean | `false` | Full raw payload under `rawData` |
| `maxConcurrency` | integer | `5` | Parallel requests (1–20) |
| `requestDelaySecs` | integer | `1` | Delay before each request (0–10) |
| `maxItems` | integer | `0` | Cap successful records (`0` = no limit) |
| `proxyConfiguration` | object | — | Optional Apify proxy |

#### Input example

```json
{
  "matchIds": ["4506324"],
  "includePlayerStats": true,
  "includeEvents": true,
  "includeLineups": true,
  "includeTeamStats": true,
  "includeH2H": false,
  "maxConcurrency": 5,
  "requestDelaySecs": 1
}
```

### Output

One Dataset item per successful match:

| Field | Description |
| --- | --- |
| `matchId` | FotMob numeric match id |
| `matchName` / `matchUrl` | Label and absolute match URL |
| `leagueId` / `leagueName` / `round` / `countryCode` | Competition context |
| `matchTimeUtc` | Kickoff (ISO 8601 UTC) |
| `started` / `finished` | Match status flags |
| `homeTeam` / `awayTeam` | `{ id, name, score }` |
| `venue` / `referee` / `attendance` | Match info box |
| `playerOfTheMatch` | `{ playerId, name, teamName }` when awarded |
| `teamStats` | Optional head-to-head stats |
| `events` | Optional timeline |
| `lineups` | Optional `{ home, away }` formations |
| `playerStats` | Optional flat per-player stats |
| `h2h` | Optional previous meetings |
| `source` / `scrapedAt` | Provenance |

#### Example (trimmed)

```json
{
  "matchId": 4506324,
  "matchName": "Aston Villa-vs-Manchester United_Sun, Oct 6, 2024, 13:00 UTC",
  "matchUrl": "https://www.fotmob.com/match/4506324",
  "leagueId": 47,
  "leagueName": "Premier League",
  "round": "7",
  "countryCode": "ENG",
  "matchTimeUtc": "2024-10-06T13:00:00.000Z",
  "started": true,
  "finished": true,
  "homeTeam": { "id": 10252, "name": "Aston Villa", "score": 0 },
  "awayTeam": { "id": 10260, "name": "Manchester United", "score": 0 },
  "venue": "Villa Park",
  "referee": "Robert Jones",
  "attendance": 42682,
  "playerOfTheMatch": {
    "playerId": 268375,
    "name": "Emiliano Martínez",
    "teamName": "Aston Villa"
  },
  "source": "fotmob-match-details-scraper",
  "scrapedAt": "2026-10-26T12:00:00.000Z"
}
```

### Notes

- Per-player stats are only available for matches that have started.
- Keep concurrency moderate and use a small request delay for large batches.
- Residential proxies are recommended for production / high-volume runs.
- This project is not affiliated with FotMob. Use responsibly and comply with applicable terms and law.

# Actor input Schema

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

One FotMob match id or match URL per line, e.g. "4506324" or "https://www.fotmob.com/match/4506324".

## `includePlayerStats` (type: `boolean`):

Per-player statistics and ratings for started matches.

## `includeEvents` (type: `boolean`):

Goal / card / substitution timeline.

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

Both teams' formations, starters, substitutes, and coach.

## `includeTeamStats` (type: `boolean`):

Head-to-head team statistics (possession, shots, xG, …).

## `includeH2H` (type: `boolean`):

Previous meetings between the two teams. Increases item size.

## `includeRawData` (type: `boolean`):

Attach the full raw FotMob match payload under rawData. Significantly increases item size.

## `maxConcurrency` (type: `integer`):

Maximum parallel match requests (1–20).

## `requestDelaySecs` (type: `integer`):

Politeness delay before each request (0–10).

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

Stop after this many successful match records. 0 = no limit.

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

Optional Apify proxy. Datacenter is usually enough; residential recommended for large jobs.

## Actor input object example

```json
{
  "matchIds": [
    "4506324"
  ],
  "includePlayerStats": true,
  "includeEvents": true,
  "includeLineups": true,
  "includeTeamStats": true,
  "includeH2H": false,
  "includeRawData": false,
  "maxConcurrency": 5,
  "requestDelaySecs": 1,
  "maxItems": 0
}
```

# Actor output Schema

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

Table view of scraped match records.

## `rawResults` (type: `string`):

All dataset items as JSON.

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

Totals, successes, and failures from the key-value store.

# 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 = {
    "matchIds": [
        "4506324"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerbox/fotmob-match-details-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 = { "matchIds": ["4506324"] }

# Run the Actor and wait for it to finish
run = client.actor("powerbox/fotmob-match-details-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 '{
  "matchIds": [
    "4506324"
  ]
}' |
apify call powerbox/fotmob-match-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerbox/fotmob-match-details-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/TysY43ysfCBDhB8za/builds/CFSxHPtFlryiCFZ1G/openapi.json
