# Transfermarkt Scraper — Player Market Values & Squads (`northbell/transfermarkt-scraper`) Actor

Transfermarkt player market values, club squads with contract dates and league tables of squad value, from club, league or player URLs. Run it again to see which values and club totals moved since the last run. Player value history on request. No login.

- **URL**: https://apify.com/northbell/transfermarkt-scraper.md
- **Developed by:** [Northbell](https://apify.com/northbell) (community)
- **Categories:** Sports, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 player or clubs

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 Scraper — Player Market Values & Squads

Give it Transfermarkt URLs — a **league**, a **club** or a **player** — and get one clean row per club and per player: **market value in euros, position, age, nationality, club, contract end, shirt number, height, foot**, and for clubs the **squad size, average age and total squad value**. A player URL also returns the **full market value history**. **$0.50 per 1,000 rows**, no login, no API key. A whole league is 500 to 600 player rows (the Premier League has 543), so raise *Maximum players* when you want all of it.

Run it again — or put it on a schedule — and every row tells you **what changed since the last run**: the player's value now and before (`marketValueChange`), a club's total squad value now and before (`change`), how clubs moved in the league's value ranking (`valueRankChange`), and which players joined a squad (`isNew`). A Transfermarkt page shows the figures as they are now; the movement between two of your runs is kept by the Actor.

### What you get

Every row has `type` (`player`, `club` or `error`) and `observedAt`.

**Players** — from a club or league URL, or from a player URL

| Field | What it is |
|---|---|
| `playerId`, `url`, `name` | the player and their Transfermarkt page |
| `position`, `positionGroup` | `Centre-Back` and `Defender`, `Right Winger` and `Attack` (groups: Goalkeeper, Defender, Midfield, Attack) |
| `age`, `nationality`, `nationalities` | age today, the first nationality and all of them |
| `shirtNumber`, `heightCm`, `foot` | as listed (`foot` is `right`, `left` or `both`) |
| `club`, `clubId`, `league`, `leagueCode` | the current club and its league. A player without a club shows what Transfermarkt shows (`Retired`) and has no `clubId` |
| `joinedClubAt`, `signedFrom`, `contractUntil` | when they joined (ISO date), the club they came from (club and league URLs) and when the contract ends (`null` where Transfermarkt shows none) |
| `marketValueEur`, `marketValueText` | Transfermarkt's market value as a number and as the site writes it (`€30.00m`). `null` when the site lists no value |
| `marketValueUpdatedAt` | the day Transfermarkt last changed this value (player URLs) |
| `valueBeforeUpdateEur` | the value before Transfermarkt's latest update. Squad lists show it only for players whose value changed in the latest update; player URLs read it from the history |
| `previousMarketValueEur`, `marketValueChange`, `marketValueChangePct`, `previousObservedAt` | the change since your previous run that read this player (`null` on the first run) |
| `isNew` | `true` when the player was not in this club's squad list the last time you read it, `false` when they were; `null` on the first read of a squad and for player URLs |
| `peakMarketValueEur`, `peakMarketValueAt`, `marketValueHistory` | player URLs only: the highest value ever and when, and every update as `{date, marketValueEur, club}` (oldest first) |

**Clubs** — from a league or club URL

| Field | What it is |
|---|---|
| `clubId`, `url`, `name`, `league`, `leagueCode`, `country` | the club and its league |
| `squadSize`, `averageAge`, `foreigners` | the first-team squad as Transfermarkt lists it |
| `averageMarketValueEur` | average player value: the total divided by the squad size, as Transfermarkt does it (a player without a value counts as 0) |
| `totalMarketValueEur`, `totalMarketValueText` | the total value of the squad, rounded the way the site shows it (`€1.38bn`) |
| `valueRank` | position in the league by total value (league URLs; ties share a rank) |
| `previousTotal`, `change`, `changePct`, `previousObservedAt` | the change of the total since your previous run (`null` on the first run) |
| `previousValueRank`, `valueRankChange` | the ranking in your previous run of the same league, and how many places the club moved (positive = moved up) |

### Run it again and again

- **On a schedule** — save your input as a task and add a **Schedule**: the same clubs or players every week. Send each run to Google Sheets, Slack or email with an integration on the task.
- **Watch for changes** — Keep the same input on the schedule. Each run is its own dataset with the date it ran, so the series builds up run by run and you can compare one day with the last.
- **In bulk** — Put every club, league or player link in **Transfermarkt URLs** in one run.

### Use it for

- **Scouting and recruitment** — pull a whole league with contract end dates and filter for players whose contract ends soon and whose value is rising
- **Fantasy and manager games** — see whose value moved this week (`marketValueChange`) and who just arrived (`isNew`)
- **Journalism and newsletters** — a league table of squad value (`valueRank`, `change`) and a player's value history, ready for a chart
- **Football analytics** — a clean, repeatable feed of values, ages and contracts instead of parsing pages by hand

### Input

A whole league (clubs and every squad):

```json
{ "urls": ["https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"], "maxPlayers": 600 }
```

Just the league table of squad value, in one request:

```json
{ "urls": ["https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"], "includePlayers": false }
```

A club, and two players with their value history:

```json
{ "urls": ["https://www.transfermarkt.com/fc-arsenal/startseite/verein/11", "https://www.transfermarkt.com/bukayo-saka/profil/spieler/433177", "https://www.transfermarkt.com/erling-haaland/profil/spieler/418560"] }
```

A **league** URL ends in `/startseite/wettbewerb/<code>` (`GB1` Premier League, `ES1` LaLiga, `L1` Bundesliga, `IT1` Serie A, `FR1` Ligue 1, `BRA1` Brazil, `GB2` Championship), a **club** URL in `/verein/<id>` and a **player** URL in `/spieler/<id>`. Any page of the club or player works (squad, profile, market value page). **Maximum players** caps the player rows of the whole run (default 500). **Include players of clubs and leagues** off returns club rows only. **Include market value history** off skips the extra request per player URL.

What the Actor remembers (to show the change since the last run) is kept in a named key-value store in your Apify account, so the second run already shows changes. Schedule it (Apify → Schedules) for a weekly or daily record.

### Pricing

**$0.50 per 1,000 rows** (a row is one player or one club), plus $0.01 per run. Error rows (a page that does not exist, a URL that is not Transfermarkt) are free. The $0.01 run-start fee is the one charge every run pays, even one that returns nothing. For scale: on 10/8 the Premier League with all squads was 20 club rows and 543 player rows, about $0.29 in total; the league table alone (`includePlayers` off) is 20 rows, $0.02.

### Notes

- **Public data only.** The Actor reads the same Transfermarkt pages anyone can open without signing in. It is not affiliated with or endorsed by Transfermarkt. Market values are Transfermarkt's own estimates, not official valuations.
- **Speed.** The Actor makes one request every two seconds, because Transfermarkt rate limits. A whole league is one request for the table plus one per club: the Premier League with all squads (21 requests) took about 40 seconds on 10/8. A player URL costs two requests (profile and history), plus one redirect when the URL has no name part (`transfermarkt.com/spieler/433177`). Requests that Transfermarkt answers with "too many requests" are retried twice, after 5 and 10 seconds.
- **What is read.** The season Transfermarkt shows by default (the current one for the leagues checked), from the English transfermarkt.com, whatever domain or season you put in the URL (`.co.uk` URLs work). There is no country or language setting. League tables checked on 10/8: `GB1`, `GB2`, `ES1`, `L1`, `L2`, `IT1`, `FR1`, `BRA1`, `NL1`, `PO1`, `TR1`, `BE1`, `A1`, `SC1`, `DK1`, `SER1`, `SA1`, `JAP1`, `MLS1`, `MEXA`; squads were read for the Premier League, the Eredivisie and a few clubs of other leagues. Cups and international tournaments (Champions League, World Cup) have no club table and national team pages are not supported: both return an error row. Give the club pages instead.
- **Club totals are rounded by Transfermarkt** to two decimals of the unit it shows (`€1.38bn` is rounded to €10 million, `€738.30m` to €10,000), so a club's `change` only appears when that rounded figure moves. Player rows carry the exact values: add them up for finer tracking. `averageMarketValueEur` is Transfermarkt's own figure in a league table, and the same sum divided by the squad size, computed from the player values, when you give a club URL.
- **Values change from time to time, not daily.** Transfermarkt updates a player's value in batches, so most players show a change of `0` between close runs. `valueBeforeUpdateEur` tells you what the value was before the latest update.
- **Fields that are only filled in some cases:** `marketValueUpdatedAt`, `peakMarketValueEur`, `peakMarketValueAt` and `marketValueHistory` (player URLs; the history needs *Include market value history*), `signedFrom` (club and league URLs), `valueBeforeUpdateEur` (about half of the squad rows on 10/8: those whose value changed in the latest update), `valueRank` (league URLs only), `contractUntil` (17 of the 543 Premier League players had none on 10/8) and `marketValueEur` (2 of 543 had no value). All change fields are `null` on the first run. Missing values are `null`, never a guess.
- **Since the last run** compares with the previous run that read the same player or club, whichever URL it came from. A club's rank change compares only runs of the same league. `isNew` needs a previous read of that club's squad: a player who moved to a club you read before shows `isNew: true`.
- **Maximum players.** Squads are read club by club, highest squad value first (the order of `valueRank`), until the limit is reached, so the clubs with the lowest squad value are left out first. The run log says how many players and clubs were not read. The Premier League has 543 players (10/8), so the default of 500 stops short of a full one. A player or club URL that comes after the limit is reached gets a free error row saying so.
- **What is left out on purpose:** agents, social media accounts, birth dates and places, and injuries. Names are public sports figures and appear only as the player's name.
- A player's `position` is the main position Transfermarkt lists. `nationality` is the first of `nationalities` (the first citizenship Transfermarkt lists).

For scores and standings, see [ESPN Scores Scraper](https://apify.com/northbell/espn-scores-scraper); for live scores and results, see [Flashscore Scores Scraper](https://apify.com/northbell/flashscore-scores-scraper).

### For AI agents

`{"urls": ["https://www.transfermarkt.com/bukayo-saka/profil/spieler/433177"]}` returns one `player` row with `marketValueEur`, `contractUntil`, `club` and `marketValueHistory` (a list of `{date, marketValueEur, club}`). `{"urls": ["https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"], "includePlayers": false}` returns one `club` row per club with `totalMarketValueEur` and `valueRank`. A club URL returns the `club` row plus its squad as `player` rows. Rows have `type`: `player`, `club` or `error`; error rows carry `input` and `message` and are free.

# Actor input Schema

## `urls` (type: `array`):

One URL per line. A league page (…/startseite/wettbewerb/GB1) gives one row per club with its total market value, plus the players of every club. A club page (…/startseite/verein/11) gives the club and its squad. A player page (…/profil/spieler/433177) gives that player with the full market value history. Any Transfermarkt domain works; the current season is always read.

## `maxPlayers` (type: `integer`):

The most player rows to return in one run, across all URLs. A big league has 500 to 600 players (the Premier League has 543), so raise it to read a whole league. Club rows are not counted. Once the limit is reached, the remaining squads are not read.

## `includePlayers` (type: `boolean`):

On: a league or club URL also returns every player of the squads. Off: only club rows (a league table of squad value in a single request, a few seconds). Player URLs are always returned as players.

## `includeHistory` (type: `boolean`):

For player URLs, also read the full market value history (date, value, club) and the highest value ever. One extra request per player. Players found through a club or league URL never get a history.

## Actor input object example

```json
{
  "urls": [
    "https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"
  ],
  "maxPlayers": 500,
  "includePlayers": true,
  "includeHistory": true
}
```

# Actor output Schema

## `players` (type: `string`):

Market value, position, age, nationality, club, contract end and the change in value since the last run.

## `clubs` (type: `string`):

Squad size, average age, total market value and its change since the last run.

# 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 = {
    "urls": [
        "https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("northbell/transfermarkt-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 = { "urls": ["https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"] }

# Run the Actor and wait for it to finish
run = client.actor("northbell/transfermarkt-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 '{
  "urls": [
    "https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1"
  ]
}' |
apify call northbell/transfermarkt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,northbell/transfermarkt-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/mmsNWumaAKr3poUcx/builds/3nBNecpGOU0urpmwj/openapi.json
