# Transfermarkt Player Values & Transfers (`scrapermaster/transfermarkt-player-values-transfers`) Actor

Football player market values, squads, club valuations and transfers from Transfermarkt. Modes for player, club squad, league clubs and transfer windows, with optional market value history.

- **URL**: https://apify.com/scrapermaster/transfermarkt-player-values-transfers.md
- **Developed by:** [Scraper Master](https://apify.com/scrapermaster) (community)
- **Categories:** Sports, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.81 / 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/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

## Transfermarkt Player Values & Transfers

Turn public Transfermarkt pages into clean, structured rows: player profiles with current and peak market value, full club squads, league club tables, and transfer lists with parsed fees.

The Actor only reads public pages (no login), runs with low concurrency, waits a small random time between requests, retries politely on 429 and 5xx responses, and stops at your `maxItems`.

### Modes

Pick one with the `mode` input.

#### 1. `player`

One row per player. Accepts profile URLs or bare numeric IDs. Set `includeMarketValueHistory` to add the full value timeline.

```json
{
  "mode": "player",
  "playerUrls": ["https://www.transfermarkt.com/erling-haaland/profil/spieler/418560", "3333"],
  "includeMarketValueHistory": true,
  "maxItems": 10
}
```

#### 2. `club-squad`

One row per squad member of each club for a season. `season` is the year the season starts (2025 = 2025/26).

```json
{ "mode": "club-squad", "clubUrls": ["https://www.transfermarkt.com/manchester-city/startseite/verein/281", "11"], "season": 2025, "maxItems": 60 }
```

#### 3. `competition-clubs`

One row per club in a league table of clubs: squad size, average age, total market value.

```json
{ "mode": "competition-clubs", "competitionIds": ["GB1", "ES1", "L1", "IT1", "FR1"], "season": 2025, "maxItems": 100 }
```

#### 4. `transfers`

One row per transfer. Use `competitionIds` (all clubs of a league, filtered by `window`) or `clubUrls` (one club, whole season).

```json
{ "mode": "transfers", "competitionIds": ["GB1"], "season": 2025, "window": "summer", "includeLoans": true, "maxItems": 200 }
```

### Output fields

| Field | Modes | Description |
|---|---|---|
| playerId, name | player, club-squad | Transfermarkt ID and display name |
| shirtNumber, position | player, club-squad | Squad number (when shown) and playing position |
| dateOfBirth, age | player, club-squad | ISO date and age at scrape time |
| placeOfBirth, countryOfBirth | player | Birthplace |
| citizenship | player, club-squad | Array of countries |
| heightCm, foot | player, club-squad | Height in centimetres, preferred foot |
| currentClub, clubId | player, club-squad | Club the player belongs to now |
| joinedDate | player, club-squad | ISO date the player joined the club |
| contractExpires, agent | player | ISO date and agent name, if listed |
| marketValueEur, marketValueText | player, club-squad | Current value as a number and as displayed |
| highestMarketValueEur, highestMarketValueDate | player | Career peak value and when it was set |
| marketValueHistory | player (optional) | Array of `{date, valueEur, club}` |
| signedFrom, squadClub, squadClubId, season | club-squad | Previous club and the squad the row came from |
| competitionId, clubId, name, squadSize, avgAge, foreigners, avgMarketValueEur, totalMarketValueEur | competition-clubs | League club table |
| playerName, direction, fromClub(Id), toClub(Id), feeText, feeEur, loan, date, window | transfers | Transfer details; `feeEur` is 0 for free transfers and null when unknown |
| profileUrl, scrapedAt | all player rows | Source link and ISO timestamp |

Failed pages produce a row such as `{"error": true, "mode": "...", "url": "...", "errorMessage": "..."}` instead of stopping the run. Error rows are not counted against `maxItems`.

### Notes and limitations

- Values are what the site shows, in euros. Amounts like `€1.39bn`, `€220.00m` and `€500k` are converted to plain numbers.
- Squad pages list each player's current club, so a past-season squad can contain players who have since moved on.
- Transfer lists on the site carry no exact date for most moves; `date` is filled only when the page shows one (for example the end date of a loan).
- Club-based transfers cannot be split by window and always cover the whole season (`window` is `"all"` in the output).
- `contractExpires` and `agent` are only collected in `player` mode (they are not on squad pages).
- Retired players or players without a club have empty club and value fields.
- Page layouts can change; if a selector stops matching you get an error row rather than wrong data.
- Respect the site's terms and applicable law when using the data.

### Pay-per-event

Each result row is charged with the `result-item` event through the Apify SDK, and the run stops once your maximum charge is reached. Error rows are free.

### Local run

```bash
npm install
mkdir -p storage/key_value_stores/default
echo '{"mode":"player","maxItems":1}' > storage/key_value_stores/default/INPUT.json
APIFY_LOCAL_STORAGE_DIR=./storage node src/main.js
```

# Actor input Schema

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

What to scrape. 'player' = one row per player profile; 'club-squad' = one row per squad member; 'competition-clubs' = one row per club of a league; 'transfers' = one row per transfer.

## `playerUrls` (type: `array`):

Used in 'player' mode. Transfermarkt profile URLs or plain numeric player IDs.

## `clubUrls` (type: `array`):

Used in 'club-squad' mode and, when no competition IDs are given, in 'transfers' mode. Club page URLs or numeric club IDs (Manchester City = 281).

## `competitionIds` (type: `array`):

Used in 'competition-clubs' and 'transfers' modes. Transfermarkt competition codes such as GB1 (Premier League), ES1 (LaLiga), L1 (Bundesliga), IT1 (Serie A), FR1 (Ligue 1).

## `season` (type: `integer`):

Year in which the season starts, e.g. 2025 for 2025/26. Leave empty to use the current season.

## `window` (type: `string`):

Used for competition transfers. Club-based transfers always cover the whole season.

## `includeLoans` (type: `boolean`):

Competition transfers: also list loan moves (flagged with loan = true).

## `includeMarketValueHistory` (type: `boolean`):

Player mode: add a marketValueHistory array (date, value in EUR, club) to every row.

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

Stop after this many result rows. Error rows are not counted.

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

Parallel requests for player mode (1 to 3). Kept low on purpose to be polite to the site.

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

Optional. Plain requests normally work without a proxy; enable one if you are rate limited.

## Actor input object example

```json
{
  "mode": "player",
  "playerUrls": [
    "https://www.transfermarkt.com/erling-haaland/profil/spieler/418560",
    "3333"
  ],
  "clubUrls": [
    "https://www.transfermarkt.com/manchester-city/startseite/verein/281"
  ],
  "competitionIds": [
    "GB1"
  ],
  "window": "summer",
  "includeLoans": true,
  "includeMarketValueHistory": false,
  "maxItems": 10,
  "maxConcurrency": 2
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "playerUrls": [
        "https://www.transfermarkt.com/erling-haaland/profil/spieler/418560",
        "3333"
    ],
    "clubUrls": [
        "https://www.transfermarkt.com/manchester-city/startseite/verein/281"
    ],
    "competitionIds": [
        "GB1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapermaster/transfermarkt-player-values-transfers").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 = {
    "playerUrls": [
        "https://www.transfermarkt.com/erling-haaland/profil/spieler/418560",
        "3333",
    ],
    "clubUrls": ["https://www.transfermarkt.com/manchester-city/startseite/verein/281"],
    "competitionIds": ["GB1"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapermaster/transfermarkt-player-values-transfers").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 '{
  "playerUrls": [
    "https://www.transfermarkt.com/erling-haaland/profil/spieler/418560",
    "3333"
  ],
  "clubUrls": [
    "https://www.transfermarkt.com/manchester-city/startseite/verein/281"
  ],
  "competitionIds": [
    "GB1"
  ]
}' |
apify call scrapermaster/transfermarkt-player-values-transfers --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapermaster/transfermarkt-player-values-transfers"
        }
    }
}
```

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/g45pHzI6lawhOrsj9/builds/LE0bLunUyRFoc0q1q/openapi.json
