TMKT - Transfermarkt API Wrapper
A Python wrapper for the Transfermarkt API, providing easy access to football (soccer) data including players, clubs, competitions, transfers, and more.
Features
- Player Data: Transfers, injuries, profiles
- Club Data: Squads, stadiums, transfers
- Competition Data: Tables, participating clubs
- Search Functionality: Players, clubs, leagues
- Clean Data Parsing: Automatic HTML-to-text conversion for search results
Installation
pip install transfermarkt-wrapper
Example usage
from tmkt import TMKT
import asyncio
import json
async def main():
async with TMKT() as tmkt:
# Search for a league
leagues = await tmkt.league_search("Premier League")
print(json.dumps(leagues, indent = 4))
# Get player data
player = await tmkt.get_player(433177) # Bukayo Saka
print(json.dumps(player, indent = 4))
asyncio.run(main())
Complete API Reference
Player Endpoints
| Method | Description | Example |
|---|---|---|
get_player(playerId: int) |
Get player profile | get_player(433177) |
get_player_transfers(playerId: int) |
Get player's transfer history | get_player_transfers(433177) |
get_player_injuries(playerId: int) |
Get player's injury history | get_player_injuries(433177) |
get_player_stats(playerId: int, season: int = None) |
Get player's seasonal stats | get_player_stats(433177) |
get_player_stats_per_club(playerId: int) |
Get player's stats per club | get_player_stats_per_club(433177) |
get_player_stats_per_competition(playerId: int) |
Get player's stats per comp | get_player_stats_per_competition(433177) |
get_player_stats_national_career(playerId: int) |
Get player's national career stats | get_player_stats_national_career(433177) |
get_player_news(playerId: int) |
Get player relevant news | get_player_news(433177) |
player_search(query: str) |
Search players by name | player_search("Saka") |
Club Endpoints
| Method | Description | Example |
|---|---|---|
get_club(clubId: int) |
Get club profile | get_club(11) (Arsenal) |
get_club_transfers(clubId: int) |
Get club's transfer history | get_club_transfers(11) |
get_club_squad(clubId: int) |
Get current squad | get_club_squad(11) |
get_club_stadium(clubId: int) |
Get stadium info | get_club_stadium(11) |
get_club_news(clubId: int) |
Get club relevant news | get_club_news(11) |
club_search(query: str) |
Search clubs by name | club_search("Arsenal") |
Competition Endpoints
| Method | Description | Example |
|---|---|---|
get_competition(competitionId: str) |
Get competition profile | get_competition("GB1") |
get_competition_transfers(competitionId: str) |
Get competition transfers | get_competition_transfers("GB1") |
get_competition_clubs(competitionId: str) |
Get participating clubs | get_competition_clubs("GB1") |
get_competition_table(competitionId: str) |
Get current standings | get_competition_table("GB1") |
get_current_season(competitionId: str) |
Get league current season | get_current_season("GB1") |
get_competition_news(competitionId: str) |
Get competition relevant news | get_competition_news("GB1") |
competition_search(query: str) |
Search leagues by name | competition_search("Premier League") |
Match Endpoints
| Method | Description | Example |
|---|---|---|
get_match(matchId: int) |
Get match details | get_match(4625790) |
General Endpoints
| Method | Description | Example |
|---|---|---|
get_all_transfers() |
Get latest transfers | get_all_transfers() |
get_coach(coachId: int) |
Get coach details | get_coach(7451) |
get_coach_news(coachId: int) |
Get coach relevant news | get_coach_news(7451) |
Metadata
Release files for transfermarkt-wrapper 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| transfermarkt_wrapper-0.0.8.tar.gz | 7.4 kB | Without provenance | Details for transfermarkt_wrapper-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| transfermarkt_wrapper-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for transfermarkt_wrapper-0.0.8-py3-none-any.whl |
Total release size: 14.3 kB
Release files / transfermarkt_wrapper-0.0.8.tar.gz
| Download URL | transfermarkt_wrapper-0.0.8.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7b6f3e6dc83be347cfe38743d627c82c06372f3ef862066cf732edd9db64fdf
|
|
BLAKE2b-256 checksum How to use checksums |
e72fe37f91bd39685d70c46763cd012a4e5c4fbda236fb5b3fa04cba9476b8de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / transfermarkt_wrapper-0.0.8-py3-none-any.whl
| Download URL | transfermarkt_wrapper-0.0.8-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a32cd5e0b4f69e91c4690fd91523e00860eb52fa985d5758da88fda652cedb90
|
|
BLAKE2b-256 checksum How to use checksums |
3d472ac2812d708815cfde9e116a832568664459ee6113fcaef76aea601fa97b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for transfermarkt-wrapper 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.