transfermarkt-wrapper


Nametransfermarkt-wrapper JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/tommhe14/transfermarkt-wrapper
SummaryPython API wrapper for Transfermarkt undocumented API
upload_time2025-07-26 19:04:15
maintainerNone
docs_urlNone
authortommhe14
requires_python>=3.8
licenseMIT
keywords transfermarkt tmk football soccer fotmob sofascore flashscore api wrapper
VCS
bugtrack_url
requirements beautifulsoup4 aiohttp
Travis-CI
coveralls test coverage No coveralls.
            # 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

```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)` |
| `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: int)` | Get competition profile | `get_competition("GB1")` |
| `get_competition_transfers(competitionId: int)` | Get competition transfers | `get_competition_transfers("GB1")` |
| `get_competition_clubs(competitionId: int)` | Get participating clubs | `get_competition_clubs("GB1")` |
| `get_competition_table(competitionId: int)` | Get current standings | `get_competition_table("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()` |

            

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/4f/3c/7367f5ada30d9dd15cd8d98606d916a8d7ba3a6b40cf91673b3d3c89b678/transfermarkt_wrapper-0.0.2.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## 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| `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: int)` | Get competition profile | `get_competition(\"GB1\")` |\n| `get_competition_transfers(competitionId: int)` | Get competition transfers | `get_competition_transfers(\"GB1\")` |\n| `get_competition_clubs(competitionId: int)` | Get participating clubs | `get_competition_clubs(\"GB1\")` |\n| `get_competition_table(competitionId: int)` | Get current standings | `get_competition_table(\"GB1\")` |\n| `league_search(query: str)` | Search leagues by name | `league_search(\"Premier League\")` |\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.2",
    "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": "11cb3c1379fd5365bfa8e7c6a91f3d277b299c6d2d612dff1a616907d9f08fec",
                "md5": "2b82a12cdb0f9f710a925c08e1dd7edb",
                "sha256": "c855220d931383b73c1914236f8060d2219183cb3e57c8dc5738164482deacb1"
            },
            "downloads": -1,
            "filename": "transfermarkt_wrapper-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2b82a12cdb0f9f710a925c08e1dd7edb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5305,
            "upload_time": "2025-07-26T19:04:14",
            "upload_time_iso_8601": "2025-07-26T19:04:14.383291Z",
            "url": "https://files.pythonhosted.org/packages/11/cb/3c1379fd5365bfa8e7c6a91f3d277b299c6d2d612dff1a616907d9f08fec/transfermarkt_wrapper-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4f3c7367f5ada30d9dd15cd8d98606d916a8d7ba3a6b40cf91673b3d3c89b678",
                "md5": "7f3d3d76362d1724cdc8248633cf0359",
                "sha256": "965a43440802b0064bd8658b9907336660e5a6d7be9c4027a7cad174e93204dc"
            },
            "downloads": -1,
            "filename": "transfermarkt_wrapper-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7f3d3d76362d1724cdc8248633cf0359",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4820,
            "upload_time": "2025-07-26T19:04:15",
            "upload_time_iso_8601": "2025-07-26T19:04:15.456376Z",
            "url": "https://files.pythonhosted.org/packages/4f/3c/7367f5ada30d9dd15cd8d98606d916a8d7ba3a6b40cf91673b3d3c89b678/transfermarkt_wrapper-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-26 19:04:15",
    "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"
}
        
Elapsed time: 1.87758s