# Transfermarkt Scraper (`scrapedo/transfermarkt-scraper`) Actor

Scrape Transfermarkt: every club in a league, every player with position, age, nationality, contract, transfer fee and market value, plus player profiles. Free trial, no per-result fee. Powered by Scrape.do.

- **URL**: https://apify.com/scrapedo/transfermarkt-scraper.md
- **Developed by:** [scrapedo](https://apify.com/scrapedo) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

Scrape [Transfermarkt](https://www.transfermarkt.com): every **club in a league** (squad size, average age, foreigners, average and total market value), every **player in a squad** (shirt number, position, date of birth, age, nationalities, height, foot, joined date, previous club and transfer fee, contract end, market value in euros) and **player profiles** (full name, birthplace, citizenship, agent, contract, current market value and its last update).

**Free to try:** run it without any setup and get up to 50 results per run. Add your free Scrape.do API token to remove the limit.

### Why Transfermarkt scrapers get blocked

Transfermarkt serves plain HTML, so a few requests from your laptop work. A crawl of whole leagues from a server, season after season, is where you get throttled and your IP blocked. This actor fetches every page through the [Scrape.do](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=transfermarkt-scraper) web scraping API, which rotates the IP on every request, then reads the squad tables and profile pages, so you don't manage proxies or retries.

### How to use it

1. Add **Competitions** (`GB1`, `ES1`, `L1`, `IT1`, `FR1`, `TR1`, ...), **Club IDs** (`281`) or **Player IDs** (`418560`). URLs work too.
2. Pick **Players** or **Clubs** as the output for competitions. Optionally set a **Season** (2025 = 25/26).
3. Set **Max results** (0 for everything, with your own token).

#### Input example

```json
{
    "competitions": ["GB1", "ES1"],
    "output": "players",
    "maxItems": 0,
    "scrapeDoToken": "YOUR_SCRAPEDO_TOKEN"
}
```

#### Output example (player)

Fictional player, illustrative values:

```json
{
    "type": "player",
    "competition": "EX1",
    "id": 990002,
    "name": "John Doe",
    "number": 4,
    "position": "Centre-Back",
    "positionGroup": "Defender",
    "dateOfBirth": "2003-11-15",
    "age": 22,
    "nationalities": ["Exampleland", "Samplestan"],
    "heightM": 1.85,
    "foot": "left",
    "joined": "2026-01-10",
    "signedFrom": "Sample Rovers",
    "transferFee": "€5.00M",
    "contractUntil": "2031-06-30",
    "marketValue": "€850.0K",
    "marketValueEur": 850000,
    "clubId": 900001,
    "clubName": "Example FC",
    "season": 2026,
    "url": "https://www.transfermarkt.com/-/profil/spieler/990002",
    "scrapedAt": "2026-11-24T08:00:00.000Z"
}
```

With **Clubs** output each row has `name`, `squadSize`, `averageAge`, `foreigners`, `averageMarketValue`, `totalMarketValue` (text and euros) and the squad URL. Turn on **Add profile fields** to add `fullName`, `placeOfBirth`, `citizenship`, `agent` and `marketValueUpdated` to every player. Download the results as JSON, CSV, Excel or HTML from the run's **Output** tab, or through the Apify API.

### Pricing and your Scrape.do token

There is no per-result fee for this actor; Apify only bills its normal platform usage. Pages come through the Scrape.do API:

1. **Free trial, no token:** leave **Scrape.do API token** empty and get up to 50 results per run.
2. **Your own token:** no limit. Every page is 1 Scrape.do credit: a league page lists every club, a squad page every player of a club. In a live test, all 548 players of the 20 Premier League clubs cost 21 credits. [Create a free Scrape.do account](https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=transfermarkt-scraper) for 1,000 free credits a month.

### Tips

- **Competition codes** are in the Transfermarkt URL: `.../startseite/wettbewerb/GB1`.
- **Market values** come as Transfermarkt prints them (`€45.00M`) and as plain euros (`45000000`) for sorting.
- **Past seasons**: set **Season** to the start year; squads and values are as Transfermarkt shows them for that season.
- **Prefer Python?** The same logic is an open-source package: `pip install transfermarkt-scraper` ([GitHub](https://github.com/bugrahansss/transfermarkt-scraper)).

### FAQ

**Is scraping Transfermarkt legal?** The pages are public, but the data is the work of Transfermarkt's editors and community: respect its terms of use, keep request rates reasonable, don't republish player photos and credit Transfermarkt when you publish analysis. Players are people, so use personal fields like date of birth only where you need them. This is not legal advice.

**Something broke or a field is missing?** Open an issue in the Issues tab and we will look at it.

# Actor input Schema

## `competitions` (type: `array`):

Transfermarkt competition codes or URLs, one per line: GB1 (Premier League), ES1 (LaLiga), L1 (Bundesliga), IT1 (Serie A), FR1 (Ligue 1), TR1 (Süper Lig), NL1, PO1, GB2, MLS1 ...

## `clubs` (type: `array`):

Clubs to scrape directly, e.g. 281 (Manchester City) or https://www.transfermarkt.com/manchester-city/startseite/verein/281.

## `players` (type: `array`):

Player profiles to scrape, e.g. 418560 or https://www.transfermarkt.com/erling-haaland/profil/spieler/418560.

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

Season start year, e.g. 2026 for 26/27 or 2025 for 25/26. Leave empty for the current season.

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

Every player of every club in the competitions, or one row per club.

## `openProfiles` (type: `boolean`):

On: open each player's profile for full name, birthplace, citizenship, agent and market value update date (one extra request per player). Off: squad table fields only.

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

Stop after this many results. 0 means no limit (free trial runs stop at 50).

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

Clubs or players scraped in parallel with your own token.

## `scrapeDoToken` (type: `string`):

Optional. Without a token you get a free trial of up to 50 results per run. With your own token there is no limit; every page is 1 Scrape.do credit. Free account with 1,000 credits a month: https://scrape.do/?utm_source=apify\&utm_medium=actor\&utm_campaign=transfermarkt-scraper

## Actor input object example

```json
{
  "competitions": [
    "GB1"
  ],
  "output": "players",
  "openProfiles": false,
  "maxItems": 50,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

No description

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

No description

## `allFields` (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 = {
    "competitions": [
        "GB1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapedo/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 = { "competitions": ["GB1"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapedo/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 '{
  "competitions": [
    "GB1"
  ]
}' |
apify call scrapedo/transfermarkt-scraper --silent --output-dataset

```

## MCP server setup

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