Skip to main content

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.

PyPI Downloads

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(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")

General Endpoints

Method Description Example
get_all_transfers() Get latest transfers get_all_transfers()

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

transfermarkt_wrapper-0.0.5.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transfermarkt_wrapper-0.0.5-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file transfermarkt_wrapper-0.0.5.tar.gz.

File metadata

  • Download URL: transfermarkt_wrapper-0.0.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for transfermarkt_wrapper-0.0.5.tar.gz
Algorithm Hash digest
SHA256 f45f34417c2ddfee70cec68f285737f1ea0e930534aa7a93bce853178b230942
MD5 9bff351c90c095387735653c7203fcef
BLAKE2b-256 cd7642cd8c61e5897b6aaddb61e801f30fb7c10a910264a7cf7bde7a9d21559d

See more details on using hashes here.

File details

Details for the file transfermarkt_wrapper-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for transfermarkt_wrapper-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7fc02ec3d7fcbf458c83e6004e1bb027c01dd373cfc5d338d6267c1b65a61676
MD5 65a77eed749aa5b91beaf015dd7fbb48
BLAKE2b-256 fc9d8797f3b6b965ac24c38eb8b0f107f6767f797ccec06c9c90323b7a101fd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page