# Transfermarkt (Brazil) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive football data including club squads, player profiles, statistics, and agency information to research teams, analyze player performance, and find representation details. Get detailed club information, player page data, and search for agencies all in one place.

**Category:** Sports | **Website:** [transfermarkt.com.br/](https://transfermarkt.com.br/) | **Docs:** [parse.bot/marketplace/bceb535d-eb8e-4541-979b-d7253339c10d/transfermarkt-com-br-api](https://parse.bot/marketplace/bceb535d-eb8e-4541-979b-d7253339c10d/transfermarkt-com-br-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_agency

Get details of a player agency including the list of represented players with their positions, ages, nationalities, clubs, and market values.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `agency_id` | string | Yes | Numeric Transfermarkt agency ID (e.g. 413 for Gestifute). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_agency \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agency_id":"<string>"}'
```

### get_club_info

Get overview information for a club including league, squad size, average age, stadium, transfer record, and total market value. Returns one club's summary page data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `club_id` | string | Yes | Numeric Transfermarkt club ID (e.g. 131 for FC Barcelona). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_club_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"club_id":"<string>"}'
```

### get_club_squad

Get the squad roster for a club in a given season. Returns all players with their names, IDs, shirt numbers, positions, nationalities, and market values. Contract expiry dates are included when available in the squad table. Each request fetches one club-season page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `club_id` | string | Yes | Numeric Transfermarkt club ID (e.g. 131 for FC Barcelona). |
| `season_id` | string | No | Season start year in YYYY format (e.g. 2024 for the 2024/25 season). Omitting defaults to 2024. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_club_squad \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"club_id":"<string>","season_id":"<string>"}'
```

### get_competition_clubs

Get all clubs in a competition/league for a given season. Returns every participating club with their IDs, names, squad sizes, average ages, foreigner counts, and market values. Each club_id can be passed directly into get_club_squad or get_club_info. Uses the competition overview page; one request per call. Without season_id, defaults to the current football season (July onward = current year). Competition codes follow the transfermarkt.com English-site convention (e.g. GB1, ES1, BRA1).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `competition_id` | string | Yes | Transfermarkt competition code as it appears in the URL path (e.g. GB1 for Premier League, ES1 for LaLiga, L1 for Bundesliga, IT1 for Serie A, FR1 for Ligue 1, PO1 for Liga Portugal, BRA1 for Brasileirão Série A, AR1N for Argentina Liga Profesional, MEX1 for Liga MX, SA1 for Saudi Pro League). |
| `season_id` | string | No | Season start year in YYYY format (e.g. 2026 for the 2026/27 season in split-year leagues, or the calendar year for single-year leagues). Omitting defaults to the current season (July onward = current year, before July = previous year). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_competition_clubs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"competition_id":"<string>","season_id":"<string>"}'
```

### get_expiring_contracts

Get players whose contracts are expiring in a given league/competition. Returns players still at their clubs whose contract_until falls within the next expiry window (typically the upcoming year), sorted by market value. Includes player_id, name, club, position, nationality, market value, and contract_until date. One page per request.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `competition_id` | string | Yes | Competition code (e.g. GB1 for Premier League, ES1 for LaLiga, L1 for Bundesliga, IT1 for Serie A). |
| `page` | string | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_expiring_contracts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"competition_id":"<string>","page":"<string>"}'
```

### get_player_market_value_history

Get the full chronological market value history for a player. Returns all recorded market value updates with date, formatted value, raw numeric value, club at the time, and player age. Uses an internal JSON API; one request per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric Transfermarkt player ID (e.g. 342229 for Kylian Mbappé). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_player_market_value_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_player_page_data

Get comprehensive player page data combining profile information with shirt number, contract expiry, join keys for club and agency, and current season performance summary. Returns the same profile fields as get_player_profile plus shirt_number and current_season_stats array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric Transfermarkt player ID (e.g. 937958 for Lamine Yamal). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_player_page_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_player_profile

Get a player's profile information including personal details, position, foot preference, current club, agent, market value, contract expiry, and join keys for club and agency.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric Transfermarkt player ID (e.g. 937958 for Lamine Yamal). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_player_stats

Get a player's detailed performance statistics broken down by season and competition. Includes appearances, goals, assists, and minutes played, plus career totals.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric Transfermarkt player ID (e.g. 937958 for Lamine Yamal). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_player_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_player_transfers

Get a player's full transfer history. Returns all transfers chronologically with dates, clubs involved, transfer fees, market value at the time, and a loan flag. Uses an internal JSON API; one request per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_id` | string | Yes | Numeric Transfermarkt player ID (e.g. 342229 for Kylian Mbappé). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_player_transfers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_id":"<string>"}'
```

### get_unattached_players

Get a paginated list of free agents (players without a club) from Transfermarkt. Supports optional filters by nationality country and last competition. Returns 50 players per page with name, position, age, nationality, last club, contract end date, and market value.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `competition_id` | string | No | Competition code to filter by last league (e.g. GB1 for Premier League, ES1 for LaLiga). Omitting returns all competitions. |
| `country_id` | string | No | Numeric country ID to filter by player nationality. Omitting returns all nationalities. |
| `page` | string | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/get_unattached_players \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"competition_id":"<string>","country_id":"<string>","page":"<string>"}'
```

### search_agencies

Browse the paginated list of player agencies on Transfermarkt, sorted by total market value. Supports filtering by country. Returns 25 agencies per page with player counts, market values, and pagination metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country_id` | string | No | Numeric country ID to filter agencies by country. Omitting returns all countries. |
| `page` | string | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/search_agencies \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country_id":"<string>","page":"<string>"}'
```

### search_players

Search for players by name on Transfermarkt. Returns up to 10 matching players with their IDs, names, clubs, positions, nationalities, ages, and market values from the quick-search results page. One request per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Player name search query (e.g. 'mbappe', 'lamine yamal'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-transfermarkt-com-br-api-bceb535d/search_players \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
