{
  "openapi": "3.0.1",
  "info": {
    "title": "Football Contract Expiry Radar - Transfermarkt",
    "description": "Football players whose contracts end soon, per league and expiry window, with market value, trend, agent and extension options from Transfermarkt end-of-contract lists.",
    "version": "0.4",
    "x-build-id": "OFuhPn3LlzSGC7c8Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~football-contract-expiry-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-football-contract-expiry-radar",
        "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/datagrit~football-contract-expiry-radar/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-football-contract-expiry-radar",
        "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/datagrit~football-contract-expiry-radar/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-football-contract-expiry-radar",
        "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": {
          "competitions": {
            "title": "Competitions",
            "type": "array",
            "description": "Competition codes to read, for example GB1 (Premier League), ES1 (LaLiga), IT1 (Serie A), L1 (Bundesliga), FR1 (Ligue 1), NL1, PO1, TR1, SA1, GB2. Supported leagues: GB1 Premier League England; GB2 Championship England; ES1 LaLiga Spain; ES2 LaLiga2 Spain; IT1 Serie A Italy; IT2 Serie B Italy; L1 Bundesliga Germany; L2 2. Bundesliga Germany; FR1 Ligue 1 France; FR2 Ligue 2 France; NL1 Eredivisie Netherlands; PO1 Liga Portugal Portugal; TR1 Super Lig Turkiye; BE1 Jupiler Pro League Belgium; SC1 Scottish Premiership Scotland; RU1 Premier Liga Russia; UKR1 Premier Liga Ukraine; GR1 Super League 1 Greece; DK1 Superliga Denmark; A1 Bundesliga Austria; C1 Super League Switzerland; TS1 Chance Liga Czechia; PL1 Ekstraklasa Poland; RO1 SuperLiga Romania; KR1 HNL Croatia; SER1 Super liga Srbije Serbia; BU1 efbet Liga Bulgaria; UNG1 Nemzeti Bajnoksag Hungary; SLO1 Nike Liga Slovakia; ZYP1 Cyprus League Cyprus; SA1 Saudi Pro League Saudi Arabia; QSL Qatar Stars League Qatar; UAE1 UAE Pro League United Arab Emirates; EGY1 Egyptian Premier League Egypt; JAP1 J1 League Japan; AUS1 A-League Men Australia; ISR1 Ligat ha'Al Israel. Each league and calendar year in the expiry window costs about 3 to 7 page requests. Enter ALL to read every league in the list; with a long window this takes many minutes, so raise Maximum run time. For a league that is not in the list, put its Transfermarkt code in \"Other competition codes\".",
            "items": {
              "type": "string"
            },
            "default": [
              "GB1",
              "ES1",
              "IT1",
              "L1",
              "FR1"
            ]
          },
          "customCompetitionCodes": {
            "title": "Other competition codes",
            "type": "array",
            "description": "Optional. Extra Transfermarkt competition codes, for example BRA1 for the Brazilian Serie A or MLS1 for Major League Soccer. The code is the last part of the competition page URL (transfermarkt.com/premier-league/startseite/wettbewerb/GB1 means GB1). Codes Transfermarkt does not recognise are skipped and listed in the run status.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "expiringWithinMonths": {
            "title": "Contract ends within (months from today)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Expiry window counted from today: 6 lists players whose contract ends in the next six months, 12 within a year. Used for the end of the window when \"Contract ends until\" is empty.",
            "default": 12
          },
          "expiresFrom": {
            "title": "Contract ends from (date)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. Earliest contract end date, YYYY-MM-DD. Replaces the start of the window (today). A date in the past returns players whose end date has already passed. When set in the future without \"Contract ends until\", the window runs the months value from that date.",
            "default": ""
          },
          "expiresTo": {
            "title": "Contract ends until (date)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. Latest contract end date, YYYY-MM-DD. Replaces the end of the window.",
            "default": ""
          },
          "includePastDates": {
            "title": "Include end dates already passed this year",
            "type": "boolean",
            "description": "Transfermarkt keeps players on the list after their end date until the club updates the profile. Turn on to include them from 1 January of this year (marked endDateInPast=true); off starts the window today.",
            "default": false
          },
          "positionGroups": {
            "title": "Position groups",
            "type": "array",
            "description": "Optional. Keep only these groups: Goalkeeper, Defender, Midfielder, Attacker (case-insensitive; any other value fails the run). Players whose detailed position does not map to a group are dropped when any group is chosen.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "nationalities": {
            "title": "Nationalities",
            "type": "array",
            "description": "Optional. English country names as Transfermarkt writes them, for example Spain or Brazil. A player passes when any of their listed nationalities matches (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minMarketValueEur": {
            "title": "Minimum market value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip players with a market value below this amount. Players without a listed market value are skipped as soon as a minimum above 0 is set. 0 keeps everyone.",
            "default": 0
          },
          "minAge": {
            "title": "Minimum age",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Age today in whole years. 0 means no lower limit.",
            "default": 0
          },
          "maxAge": {
            "title": "Maximum age",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Age today in whole years, for example 23 for young talents. 0 means no upper limit.",
            "default": 0
          },
          "extensionOption": {
            "title": "Extension option",
            "enum": [
              "any",
              "withOption",
              "withoutOption"
            ],
            "type": "string",
            "description": "any keeps all players; withOption keeps players whose contract lists an extension option (a club can extend, so the contract may not really end); withoutOption keeps players with no option listed.",
            "default": "any"
          },
          "onlyNewSinceLastRun": {
            "title": "Only players not delivered before",
            "type": "boolean",
            "description": "Skip players delivered by an earlier run with the same competitions, window and filters (Maximum results, sort order and run time do not count as filters). A player comes back when the end date on Transfermarkt changes. Only players you actually received are remembered.",
            "default": false
          },
          "sortBy": {
            "title": "Sort and cut by",
            "enum": [
              "expiryDate",
              "marketValue"
            ],
            "type": "string",
            "description": "expiryDate returns the nearest end dates first, marketValue the most valuable players first. Maximum results cuts the sorted list, so the order decides which players you keep.",
            "default": "expiryDate"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many players in total. Each player is one billed result.",
            "default": 100
          },
          "maxRunSeconds": {
            "title": "Maximum run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Hard time budget for reading Transfermarkt (about 0.7 seconds per page request). When reached, the Actor keeps everything read so far and says how many lists it covered in the run status. 0 removes the limit.",
            "default": 600
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Leave disabled unless Transfermarkt blocks datacenter traffic from your run; residential proxy raises the platform cost of the run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}