Skip to main content

Overview

The Transfer endpoints provide access to Premier League transfer data, including incoming and outgoing transfers for specific teams. You can retrieve all teams in a season and export transfer data in various formats.

Get All Teams

curl "http://localhost:5000/all_teams?season=2023-2024&league=Premier%20League"
Retrieve a list of all teams in the Premier League for a given season.

Query Parameters

season
string
Filter results by season. Format: YYYY-YYYY (e.g., 2023-2024)Defaults to current season if not specified.
league
string
default:"Premier League"
Filter results by league name.Supported values: Premier League, La Liga, Serie A, Ligue 1, Bundesliga

Response

response
array
Array of team names or team objects
[
  "Arsenal",
  "Aston Villa",
  "Bournemouth",
  "Brentford",
  "Brighton & Hove Albion",
  "Chelsea",
  "Crystal Palace",
  "Everton",
  "Fulham",
  "Liverpool",
  "Luton Town",
  "Manchester City",
  "Manchester United",
  "Newcastle United",
  "Nottingham Forest",
  "Sheffield United",
  "Tottenham Hotspur",
  "West Ham United",
  "Wolverhampton Wanderers"
]

Get Incoming Transfers

curl "http://localhost:5000/transfers/in?team=Chelsea&season=2023-2024&league=Premier%20League"
Retrieve all players transferred into a specific team.

Query Parameters

team
string
required
Team name or identifier.Must match exactly with team names from /all_teams endpoint. Case-sensitive.
season
string
Filter results by season. Format: YYYY-YYYY (e.g., 2023-2024)Defaults to current season if not specified.
league
string
default:"Premier League"
Filter results by league name.

Response

response
array
Array of transfer objects with player and transfer details
[
  {
    "Player": "Cole Palmer",
    "Position": "Forward",
    "From": "Manchester City",
    "Fee": "£42.5m",
    "Date": "01/09/2023"
  },
  {
    "Player": "Moises Caicedo",
    "Position": "Midfielder",
    "From": "Brighton & Hove Albion",
    "Fee": "£100m",
    "Date": "14/08/2023"
  },
  {
    "Player": "Romeo Lavia",
    "Position": "Midfielder",
    "From": "Southampton",
    "Fee": "£58m",
    "Date": "18/08/2023"
  }
]

Get Outgoing Transfers

curl "http://localhost:5000/transfers/out?team=Chelsea&season=2023-2024&league=Premier%20League"
Retrieve all players transferred out from a specific team.

Query Parameters

team
string
required
Team name or identifier.Must match exactly with team names from /all_teams endpoint. Case-sensitive.
season
string
Filter results by season. Format: YYYY-YYYY (e.g., 2023-2024)Defaults to current season if not specified.
league
string
default:"Premier League"
Filter results by league name.

Response

response
array
Array of transfer objects with player and transfer details
[
  {
    "Player": "Mason Mount",
    "Position": "Midfielder",
    "To": "Manchester United",
    "Fee": "£55m",
    "Date": "05/07/2023"
  },
  {
    "Player": "Kai Havertz",
    "Position": "Forward",
    "To": "Arsenal",
    "Fee": "£65m",
    "Date": "28/06/2023"
  },
  {
    "Player": "Mateo Kovacic",
    "Position": "Midfielder",
    "To": "Manchester City",
    "Fee": "£25m",
    "Date": "27/06/2023"
  }
]

Export Transfers to CSV

curl "http://localhost:5000/transfers/csv_file?team=Chelsea&filename=chelsea_transfers&transfer_type=both&season=2023-2024" \
  -o chelsea_transfers.csv
Export transfer data for a specific team to a CSV file.

Query Parameters

team
string
required
Team name or identifier.Must match exactly with team names from /all_teams endpoint.
filename
string
required
Name for the exported file (without extension).The filename will be sanitized for security. Special characters and path separators will be removed.
transfer_type
string
default:"both"
Type of transfers to include in the export.Accepted values:
  • in - Only incoming transfers
  • out - Only outgoing transfers
  • both - Both incoming and outgoing transfers (default)
season
string
Filter results by season. Format: YYYY-YYYY (e.g., 2023-2024)
league
string
default:"Premier League"
Filter results by league name.

Response

file
file
CSV file download with text/csv MIME type.The file contains transfer data with columns depending on transfer type:
  • Incoming: Player, Position, From, Fee, Date
  • Outgoing: Player, Position, To, Fee, Date

Error Responses

{
  "error": "Missing team parameter"
}

Export Transfers to JSON

curl "http://localhost:5000/transfers/json_file?team=Chelsea&filename=chelsea_transfers&transfer_type=both&season=2023-2024" \
  -o chelsea_transfers.json
Export transfer data for a specific team to a JSON file.

Query Parameters

team
string
required
Team name or identifier.Must match exactly with team names from /all_teams endpoint.
filename
string
required
Name for the exported file (without extension).The filename will be sanitized for security. Special characters and path separators will be removed.
transfer_type
string
default:"both"
Type of transfers to include in the export.Accepted values:
  • in - Only incoming transfers
  • out - Only outgoing transfers
  • both - Both incoming and outgoing transfers (default)
season
string
Filter results by season. Format: YYYY-YYYY (e.g., 2023-2024)
league
string
default:"Premier League"
Filter results by league name.

Response

file
file
JSON file download with application/json MIME type.The file contains transfer data as an array of objects with player and transfer details.

Error Responses

{
  "error": "Missing team parameter"
}

Build docs developers (and LLMs) love