Python API wrapper for Transfermarkt undocumented API
Project description
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_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) |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transfermarkt_wrapper-0.0.7.tar.gz.
File metadata
- Download URL: transfermarkt_wrapper-0.0.7.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eda2cb6b42c9986da470c42d0e9ffaee259bdf447b8e5e4a9ae1adf18cc64fbc
|
|
| MD5 |
0949cc954b8eb2ed359b29893c3e4fa6
|
|
| BLAKE2b-256 |
613c0c093c31a974e4704709d24865a46f8506fd26cc20bbbca3d432e781b4b5
|
File details
Details for the file transfermarkt_wrapper-0.0.7-py3-none-any.whl.
File metadata
- Download URL: transfermarkt_wrapper-0.0.7-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f5aa5373cc9bdbcd05a6fddd7e29157863f809595b129e96bbf3c97a563596
|
|
| MD5 |
f466d805f2b648f73e8c13da39112da9
|
|
| BLAKE2b-256 |
26cd87eda21ad2c98074d48d0efe62233aa7fa31390b67f8f1bbc25ca2dd349c
|