{
  "openapi": "3.0.1",
  "info": {
    "title": "Transfermarkt football scraper V2",
    "description": "Complete Transfermarkt data: player profiles, market value history, transfer fees, achievements. 50+ leagues, custom URLs, multi-locale. Premier League to Liga 3. The most comprehensive football scraper.",
    "version": "2.0",
    "x-build-id": "D3w1jxmMaBtC0qQC5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/handsome_apostrophe~transfermarkt-football-scraper-v2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-handsome_apostrophe-transfermarkt-football-scraper-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/handsome_apostrophe~transfermarkt-football-scraper-v2/runs": {
      "post": {
        "operationId": "runs-sync-handsome_apostrophe-transfermarkt-football-scraper-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/handsome_apostrophe~transfermarkt-football-scraper-v2/run-sync": {
      "post": {
        "operationId": "run-sync-handsome_apostrophe-transfermarkt-football-scraper-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "leagues",
              "players",
              "clubs"
            ],
            "type": "string",
            "description": "Choose how to scrape data",
            "default": "leagues"
          },
          "leagues": {
            "title": "Preset Leagues",
            "type": "array",
            "description": "Select from popular leagues (use Custom League Codes for any other league)",
            "items": {
              "type": "string",
              "enum": [
                "GB1",
                "GB2",
                "ES1",
                "ES2",
                "IT1",
                "IT2",
                "L1",
                "L2",
                "FR1",
                "FR2",
                "NL1",
                "NL2",
                "PO1",
                "PO2",
                "BE1",
                "BE2",
                "RO1",
                "RO2",
                "RO3",
                "SER1",
                "SER2",
                "KR1",
                "KR2",
                "BOS1",
                "ALB1",
                "KOS1",
                "MNE1",
                "SL1",
                "SL2",
                "PL1",
                "PL2",
                "TS1",
                "TS2",
                "SK1",
                "A1",
                "A2",
                "IT3A",
                "IT3B",
                "IT3C",
                "PO3",
                "FR3",
                "FR4",
                "ES3",
                "ES4",
                "FI1",
                "LI1",
                "EST1",
                "MNP3"
              ],
              "enumTitles": [
                "🏴󠁧󠁢󠁥󠁮󠁧󠁿 England Premier League",
                "🏴󠁧󠁢󠁥󠁮󠁧󠁿 England Championship",
                "🇪🇸 Spain La Liga",
                "🇪🇸 Spain La Liga 2",
                "🇮🇹 Italy Serie A",
                "🇮🇹 Italy Serie B",
                "🇩🇪 Germany Bundesliga",
                "🇩🇪 Germany 2. Bundesliga",
                "🇫🇷 France Ligue 1",
                "🇫🇷 France Ligue 2",
                "🇳🇱 Netherlands Eredivisie",
                "🇳🇱 Netherlands Eerste Divisie",
                "🇵🇹 Portugal Primeira Liga",
                "🇵🇹 Portugal Liga 2",
                "🇧🇪 Belgium Pro League",
                "🇧🇪 Belgium Challenger Pro League",
                "🇷🇴 Romania Liga 1 (Superliga)",
                "🇷🇴 Romania Liga 2",
                "🇷🇴 Romania Liga 3",
                "🇷🇸 Serbia SuperLiga",
                "🇷🇸 Serbia Prva Liga",
                "🇭🇷 Croatia 1. HNL",
                "🇭🇷 Croatia 2. HNL",
                "🇧🇦 Bosnia Premier Liga",
                "🇦🇱 Albania Superiore",
                "🇽🇰 Kosovo Superliga",
                "🇲🇪 Montenegro 1. CFL",
                "🇸🇮 Slovenia 1. SNL",
                "🇸🇮 Slovenia 2. SNL",
                "🇵🇱 Poland Ekstraklasa",
                "🇵🇱 Poland 1. Liga",
                "🇨🇿 Czech 1. Liga",
                "🇨🇿 Czech 2. Liga",
                "🇸🇰 Slovakia Super Liga",
                "🇦🇹 Austria Bundesliga",
                "🇦🇹 Austria 2. Liga",
                "🇮🇹 Italy Serie C Group A",
                "🇮🇹 Italy Serie C Group B",
                "🇮🇹 Italy Serie C Group C",
                "🇵🇹 Portugal Liga 3",
                "🇫🇷 France National 1",
                "🇫🇷 France National 2",
                "🇪🇸 Spain Primera RFEF",
                "🇪🇸 Spain Segunda RFEF",
                "🇫🇮 Finland Veikkausliiga",
                "🇱🇹 Lithuania A Lyga",
                "🇪🇪 Estonia Meistriliiga",
                "🇺🇸 MLS Next Pro"
              ]
            },
            "default": [
              "GB1",
              "ES1"
            ]
          },
          "customLeagueCodes": {
            "title": "Custom League Codes",
            "type": "array",
            "description": "Enter any Transfermarkt league code (find it in the URL, e.g., 'GB1' from transfermarkt.com/premier-league/.../GB1)",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "playerUrls": {
            "title": "Player URLs",
            "type": "array",
            "description": "Direct player profile URLs (for 'players' mode). Example: https://www.transfermarkt.com/kylian-mbappe/profil/spieler/342229",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "clubUrls": {
            "title": "Club URLs",
            "type": "array",
            "description": "Club URLs to scrape full rosters (for 'clubs' mode). Example: https://www.transfermarkt.com/real-madrid/startseite/verein/418",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "locale": {
            "title": "Transfermarkt Locale",
            "enum": [
              "us",
              "com",
              "de",
              "co.uk",
              "es",
              "it",
              "fr"
            ],
            "type": "string",
            "description": "Which Transfermarkt domain to use (affects language and some data)",
            "default": "us"
          },
          "includeMarketValueHistory": {
            "title": "Include Market Value History",
            "type": "boolean",
            "description": "Fetch historical market value data (25-50 data points over career)",
            "default": true
          },
          "includeTransferHistory": {
            "title": "Include Transfer History",
            "type": "boolean",
            "description": "Fetch complete transfer history with fees",
            "default": true
          },
          "includeAchievements": {
            "title": "Include Achievements",
            "type": "boolean",
            "description": "Fetch trophies and achievements (slower)",
            "default": false
          },
          "maxPlayers": {
            "title": "Max Players",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum players to scrape (0 = unlimited)",
            "default": 100
          },
          "delayMs": {
            "title": "Delay Between Requests (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait between requests (lower = faster but riskier)",
            "default": 1500
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}