# 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.
[](https://pepy.tech/projects/transfermarkt-wrapper)
## 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
```bash
pip install transfermarkt-wrapper
```
## Example usage
```py
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(262749)` |
| `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)` |
| `team_search(query: str)` | Search clubs by name | `team_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")` |
| `league_search(query: str)` | Search leagues by name | `league_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()` |
Raw data
{
"_id": null,
"home_page": "https://github.com/tommhe14/transfermarkt-wrapper",
"name": "transfermarkt-wrapper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "transfermarkt tmk football soccer fotmob sofascore flashscore api wrapper",
"author": "tommhe14",
"author_email": "theckley@yahoo.co.uk",
"download_url": "https://files.pythonhosted.org/packages/89/f9/59a9f42fefa6f948a463507288d6fae2486e397766f3fa1291cc6dff4dda/transfermarkt_wrapper-0.0.6.tar.gz",
"platform": null,
"description": "# TMKT - Transfermarkt API Wrapper\n\nA Python wrapper for the Transfermarkt API, providing easy access to football (soccer) data including players, clubs, competitions, transfers, and more.\n\n[](https://pepy.tech/projects/transfermarkt-wrapper)\n\n## Features\n\n- **Player Data**: Transfers, injuries, profiles\n- **Club Data**: Squads, stadiums, transfers\n- **Competition Data**: Tables, participating clubs\n- **Search Functionality**: Players, clubs, leagues\n- **Clean Data Parsing**: Automatic HTML-to-text conversion for search results\n\n## Installation\n\n```bash\npip install transfermarkt-wrapper\n```\n\n## Example usage\n\n```py\nfrom tmkt import TMKT\nimport asyncio\n\nimport json\n\nasync def main():\n async with TMKT() as tmkt:\n # Search for a league\n leagues = await tmkt.league_search(\"Premier League\")\n print(json.dumps(leagues, indent = 4))\n\n # Get player data\n player = await tmkt.get_player(433177) # Bukayo Saka\n print(json.dumps(player, indent = 4))\n\nasyncio.run(main())\n```\n\n## Complete API Reference\n\n### Player Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_player(playerId: int)` | Get player profile | `get_player(433177)` |\n| `get_player_transfers(playerId: int)` | Get player's transfer history | `get_player_transfers(433177)` |\n| `get_player_injuries(playerId: int)` | Get player's injury history | `get_player_injuries(433177)` |\n| `get_player_stats(playerId: int, season: int = None)` | Get player's seasonal stats | `get_player_stats(262749)` |\n| `player_search(query: str)` | Search players by name | `player_search(\"Saka\")` |\n\n### Club Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_club(clubId: int)` | Get club profile | `get_club(11)` (Arsenal) |\n| `get_club_transfers(clubId: int)` | Get club's transfer history | `get_club_transfers(11)` |\n| `get_club_squad(clubId: int)` | Get current squad | `get_club_squad(11)` |\n| `get_club_stadium(clubId: int)` | Get stadium info | `get_club_stadium(11)` |\n| `team_search(query: str)` | Search clubs by name | `team_search(\"Arsenal\")` |\n\n### Competition Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_competition(competitionId: str)` | Get competition profile | `get_competition(\"GB1\")` |\n| `get_competition_transfers(competitionId: str)` | Get competition transfers | `get_competition_transfers(\"GB1\")` |\n| `get_competition_clubs(competitionId: str)` | Get participating clubs | `get_competition_clubs(\"GB1\")` |\n| `get_competition_table(competitionId: str)` | Get current standings | `get_competition_table(\"GB1\")` |\n| `get_current_season(competitionId: str)` | Get league current season | `get_current_season(\"GB1\")` |\n| `league_search(query: str)` | Search leagues by name | `league_search(\"Premier League\")` |\n\n### Match Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_match(matchId: int)` | Get match details | `get_match(4625790)` |\n\n### General Endpoints\n\n| Method | Description | Example |\n|--------|-------------|---------|\n| `get_all_transfers()` | Get latest transfers | `get_all_transfers()` |\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python API wrapper for Transfermarkt undocumented API",
"version": "0.0.6",
"project_urls": {
"Bug Reports": "https://github.com/tommhe14/cs2api/transfermarkt-wrapper",
"Homepage": "https://github.com/tommhe14/transfermarkt-wrapper",
"Source": "https://github.com/tommhe14/transfermarkt-wrapper"
},
"split_keywords": [
"transfermarkt",
"tmk",
"football",
"soccer",
"fotmob",
"sofascore",
"flashscore",
"api",
"wrapper"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5b99467b9a5818621db7098299cad83ea63e2e1dd9f51883b3b126acc7161c4d",
"md5": "fa3e30f844640f22872baf017575d80e",
"sha256": "a7d93e510ef27b816a306a0b41fd28782eda00d6819a115fa79df622ede19032"
},
"downloads": -1,
"filename": "transfermarkt_wrapper-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa3e30f844640f22872baf017575d80e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6529,
"upload_time": "2025-08-26T14:57:59",
"upload_time_iso_8601": "2025-08-26T14:57:59.528685Z",
"url": "https://files.pythonhosted.org/packages/5b/99/467b9a5818621db7098299cad83ea63e2e1dd9f51883b3b126acc7161c4d/transfermarkt_wrapper-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "89f959a9f42fefa6f948a463507288d6fae2486e397766f3fa1291cc6dff4dda",
"md5": "92d3aea24fb44d168c1204ad5cc21e6a",
"sha256": "5189fadb87f2b89f02aa2e1c0075c6842f4e5fec8385959cf51a6e4f52d93f36"
},
"downloads": -1,
"filename": "transfermarkt_wrapper-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "92d3aea24fb44d168c1204ad5cc21e6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6693,
"upload_time": "2025-08-26T14:58:00",
"upload_time_iso_8601": "2025-08-26T14:58:00.634555Z",
"url": "https://files.pythonhosted.org/packages/89/f9/59a9f42fefa6f948a463507288d6fae2486e397766f3fa1291cc6dff4dda/transfermarkt_wrapper-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-26 14:58:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tommhe14",
"github_project": "transfermarkt-wrapper",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "beautifulsoup4",
"specs": [
[
">=",
"4.9.3"
]
]
},
{
"name": "aiohttp",
"specs": [
[
">=",
"3.8.0"
]
]
}
],
"lcname": "transfermarkt-wrapper"
}