{
  "openapi": "3.0.1",
  "info": {
    "title": "Transfermarkt Scraper",
    "description": "Scrape Transfermarkt for football player market values, transfer history, contract details, and club rosters. Full player profiles with historical market valuations.",
    "version": "1.0",
    "x-build-id": "TSInABtVcnzZdrd28"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~transfermarkt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-transfermarkt-scraper",
        "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/junipr~transfermarkt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-junipr-transfermarkt-scraper",
        "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/junipr~transfermarkt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-transfermarkt-scraper",
        "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": [
              "players",
              "club",
              "league",
              "transfers"
            ],
            "type": "string",
            "description": "Scraping mode: players (search by name), club (full roster), league (all clubs + rosters), transfers (recent transfers).",
            "default": "players"
          },
          "playerNames": {
            "title": "Player Names",
            "type": "array",
            "description": "Player names to search. E.g. [\"Erling Haaland\", \"Kylian Mbappé\"]. Max 200.",
            "items": {
              "type": "string"
            },
            "default": [
              "Erling Haaland"
            ]
          },
          "playerUrls": {
            "title": "Player Profile URLs",
            "type": "array",
            "description": "Direct Transfermarkt player profile URLs. E.g. [\"https://www.transfermarkt.com/erling-haaland/profil/spieler/418560\"]. Max 200.",
            "items": {
              "type": "string"
            }
          },
          "clubUrls": {
            "title": "Club URLs",
            "type": "array",
            "description": "Club page URLs for roster scraping. E.g. [\"https://www.transfermarkt.com/manchester-city/startseite/verein/281\"].",
            "items": {
              "type": "string"
            }
          },
          "leagueUrls": {
            "title": "League URLs",
            "type": "array",
            "description": "League page URLs for league-wide scraping. E.g. [\"https://www.transfermarkt.com/premier-league/startseite/wettbewerb/GB1\"].",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Freeform search on Transfermarkt (players, clubs, or competitions)."
          },
          "includeMarketValueHistory": {
            "title": "Include Market Value History",
            "type": "boolean",
            "description": "Scrape full market value history chart with historical values and dates.",
            "default": false
          },
          "includeTransferHistory": {
            "title": "Include Transfer History",
            "type": "boolean",
            "description": "Extract all transfers including loan spells.",
            "default": false
          },
          "includeStats": {
            "title": "Include Career Stats",
            "type": "boolean",
            "description": "Extract career statistics per season (games, goals, assists). Requires additional page requests.",
            "default": false
          },
          "includeAchievements": {
            "title": "Include Achievements",
            "type": "boolean",
            "description": "Club and national team trophies/achievements.",
            "default": false
          },
          "includeInjuryHistory": {
            "title": "Include Injury History",
            "type": "boolean",
            "description": "Past injury records.",
            "default": false
          },
          "includeYouthCareer": {
            "title": "Include Youth Career",
            "type": "boolean",
            "description": "Youth club career history.",
            "default": false
          },
          "includeNationalTeam": {
            "title": "Include National Team",
            "type": "boolean",
            "description": "National team career and caps.",
            "default": false
          },
          "minMarketValueEur": {
            "title": "Min Market Value (EUR)",
            "type": "integer",
            "description": "Filter players with market value below this amount (EUR)."
          },
          "maxMarketValueEur": {
            "title": "Max Market Value (EUR)",
            "type": "integer",
            "description": "Filter players with market value above this amount (EUR)."
          },
          "positions": {
            "title": "Positions Filter",
            "type": "array",
            "description": "Filter by position. E.g. [\"centre-forward\", \"centre-back\"].",
            "items": {
              "type": "string"
            }
          },
          "nationality": {
            "title": "Nationality Filter",
            "type": "string",
            "description": "Filter by nationality (country name as shown on Transfermarkt)."
          },
          "maxAge": {
            "title": "Max Age",
            "type": "integer",
            "description": "Filter players older than this age."
          },
          "minAge": {
            "title": "Min Age",
            "type": "integer",
            "description": "Filter players younger than this age."
          },
          "contractExpiryBefore": {
            "title": "Contract Expiry Before",
            "type": "string",
            "description": "ISO 8601 date. Return only players whose contract expires before this date. Useful for free agent tracking."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Max concurrent page requests. Keep low (2-5) to avoid rate limiting.",
            "default": 1
          },
          "requestDelay": {
            "title": "Request Delay (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between requests in milliseconds. Transfermarkt is rate-sensitive.",
            "default": 1500
          },
          "maxPlayersPerClub": {
            "title": "Max Players Per Club",
            "type": "integer",
            "description": "Limit players extracted per club (for league mode). Leave empty for all."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for requests.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}