{
  "openapi": "3.0.1",
  "info": {
    "title": "Transfermarkt Data: Player Values, Contracts & Transfers",
    "description": "Scrapes Transfermarkt player profiles, club squads, league tables and club transfers into normalised rows: market value as a number, ISO dates, height in cm, split positions, plus optional market value and transfer history and run-over-run change tracking.",
    "version": "0.1",
    "x-build-id": "LS1DDDjgR96d8hkkd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solalab_digital~transfermarkt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solalab_digital-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/solalab_digital~transfermarkt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solalab_digital-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/solalab_digital~transfermarkt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solalab_digital-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": {
          "entityType": {
            "title": "What to scrape",
            "enum": [
              "club",
              "player",
              "league"
            ],
            "type": "string",
            "description": "Decides what a row is. 'club' turns every club you give into its squad (one row per player). 'player' scrapes individual players. 'league' walks a competition: clubs first, then their squads.",
            "default": "club"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Any transfermarkt.com player, club, league, club-transfers or quick-search URL. The slug does not matter, only the numeric ID (or the league code) inside the URL.",
            "default": [
              {
                "url": "https://www.transfermarkt.com/manchester-city/startseite/verein/281"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "ids": {
            "title": "IDs",
            "type": "array",
            "description": "Numeric player or club IDs, or league codes such as GB1, ES1, L1. They are read according to 'What to scrape'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search by name",
            "type": "string",
            "description": "Player name to look up through the site's quick search. Used only when 'What to scrape' is set to player.",
            "default": ""
          },
          "crawlDepth": {
            "title": "Crawl depth",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "1 reads only the listing page: name, position, age, nationality and market value, one request per club. 2 opens every player profile as well, adding date and place of birth, height, foot, agent, contract dates and outfitter - one extra request per player. Player start URLs always open the profile.",
            "default": 1
          },
          "maxClubs": {
            "title": "Max clubs per league",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many clubs of a competition are opened. Only used in league mode.",
            "default": 20
          },
          "maxPlayers": {
            "title": "Max players",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Ceiling on player rows for the whole run, across every club and league.",
            "default": 30
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard ceiling on HTTP requests, retries included. The main guard against a runaway run: when it is hit, everything already collected is still saved.",
            "default": 200
          },
          "includeMarketValueHistory": {
            "title": "Include market value history",
            "type": "boolean",
            "description": "Full valuation history per player (date, value, club, age), plus the peak value and the momentum figures. One extra request per player.",
            "default": false
          },
          "includeTransferHistory": {
            "title": "Include transfer history",
            "type": "boolean",
            "description": "Career transfers per player: date, season, both clubs, fee and market value at the time. One extra request per player.",
            "default": false
          },
          "includeClubRow": {
            "title": "Include club rows",
            "type": "boolean",
            "description": "Also write one row per club with squad size, average age, foreigners and total market value.",
            "default": false
          },
          "positions": {
            "title": "Positions",
            "type": "array",
            "description": "Keep only these position groups. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "Goalkeeper",
                "Defender",
                "Midfield",
                "Attack"
              ],
              "enumTitles": [
                "Goalkeeper",
                "Defender",
                "Midfield",
                "Attack"
              ]
            },
            "default": []
          },
          "minMarketValueEur": {
            "title": "Minimum market value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop players valued below this, e.g. 10000000 for ten million."
          },
          "maxMarketValueEur": {
            "title": "Maximum market value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop players valued above this."
          },
          "minAge": {
            "title": "Minimum age",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Drop players younger than this."
          },
          "maxAge": {
            "title": "Maximum age",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Drop players older than this."
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Load the snapshot saved by the previous run with the same monitor key and mark every player as new, changed or unchanged, with the market value delta. The diff also lands in MONITOR_DIFF.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name of the snapshot slot. Leave empty to derive it from the entity type and the start URLs or IDs."
          },
          "maxRequestsPerSecond": {
            "title": "Max requests per second",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Request rate cap. The default of 2 is deliberately polite; the rate is halved automatically whenever the site answers 429.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel in-flight requests. The rate cap above still applies.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor connects directly by default and that works from Apify's own IPs. Switch on Apify Proxy if the log starts showing 403 or repeated 429.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}