{
  "openapi": "3.0.1",
  "info": {
    "title": "Transfermarkt [Just 💰$0.5] — football market values",
    "description": "💰 $0.5 per 1,000 records. Scrape transfermarkt.com — player market values with full history · transfer records with fees · club squads with staff plus competitions with standings. Incremental mode tracks new and changed records across scheduled runs.",
    "version": "0.1",
    "x-build-id": "PlvurLjahWQgO5zgu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~transfermarkt-market-value-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-transfermarkt-market-value-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/blackfalcondata~transfermarkt-market-value-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-transfermarkt-market-value-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/blackfalcondata~transfermarkt-market-value-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-transfermarkt-market-value-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": {
          "startUrls": {
            "title": "🔗 Transfermarkt URLs",
            "type": "array",
            "description": "Paste Transfermarkt player, club, or competition page URLs — mix entity types freely; each becomes one record.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "🔍 Player search",
            "type": "string",
            "description": "Search Transfermarkt by player name (e.g. \"Haaland\"). JSON array for several names."
          },
          "playerIds": {
            "title": "🧑 Player IDs",
            "type": "array",
            "description": "Numeric player IDs — the number at the end of a profile URL (418560 = Haaland).",
            "items": {
              "type": "string"
            }
          },
          "clubIds": {
            "title": "🏟️ Club IDs",
            "type": "array",
            "description": "Numeric club IDs (281 = Manchester City). Each club is scraped with its squad.",
            "items": {
              "type": "string"
            }
          },
          "competitionCodes": {
            "title": "🏆 Competition codes",
            "type": "array",
            "description": "Competition codes: GB1 (Premier League), ES1 (LaLiga), IT1 (Serie A), L1 (Bundesliga), CL (Champions League).",
            "items": {
              "type": "string"
            }
          },
          "topMarketValue": {
            "title": "💎 Top market-value players",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Scrape the N most valuable players in the world from the market-value ranking (0 = off).",
            "default": 0
          },
          "includeMarketValueHistory": {
            "title": "📈 Full market-value history",
            "type": "boolean",
            "description": "Include every dated market-value data point for each player (the complete value curve, not just the current value).",
            "default": true
          },
          "includeTransfers": {
            "title": "🔁 Transfer history",
            "type": "boolean",
            "description": "Include each player's full transfer history with fees and the market value at the time of each move.",
            "default": true
          },
          "includePerformanceLog": {
            "title": "📊 Per-match performance log",
            "type": "boolean",
            "description": "Include the player's per-match career log (goals, assists, minutes, cards per game) plus career totals. Adds extra data per player.",
            "default": false
          },
          "includeUpcomingMatches": {
            "title": "📅 Upcoming matches",
            "type": "boolean",
            "description": "Include the player's upcoming club and national-team fixtures.",
            "default": false
          },
          "includeSquad": {
            "title": "👥 Club squad",
            "type": "boolean",
            "description": "Include the full squad list for each club (players with shirt number, position, age, nationality and market value).",
            "default": true
          },
          "includeStaff": {
            "title": "🧑‍💼 Coaching staff",
            "type": "boolean",
            "description": "Include the club's coaching and support staff with roles and contract dates.",
            "default": true
          },
          "includeFixtures": {
            "title": "📆 Fixtures & results",
            "type": "boolean",
            "description": "Include the club's recent results and upcoming fixtures with scores.",
            "default": false
          },
          "includeRumors": {
            "title": "🗞️ Transfer rumors",
            "type": "boolean",
            "description": "Include the club's transfer-rumor list with probability and the linked player/club.",
            "default": false
          },
          "expandSquadToPlayers": {
            "title": "🔬 Expand squad to full player records",
            "type": "boolean",
            "description": "Also scrape every squad member of each club as a full player record. Multiplies record count.",
            "default": false
          },
          "includeClubs": {
            "title": "🏛️ Competition clubs",
            "type": "boolean",
            "description": "Include the club table for each competition (squad size, average age, foreigners, total market value per club).",
            "default": true
          },
          "includeStandings": {
            "title": "📋 League standings",
            "type": "boolean",
            "description": "Include the current league table (rank, played, won/drawn/lost, goals, points).",
            "default": true
          },
          "maxResults": {
            "title": "💯 Max records",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of records to return (0 = unlimited). Applies to search / ranking / squad-expansion volume.",
            "default": 50
          },
          "compact": {
            "title": "📦 Compact output",
            "type": "boolean",
            "description": "Return only core identity + market-value fields. Ideal for AI-agent / MCP workflows.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude empty fields",
            "type": "boolean",
            "description": "Drop null, empty-string and empty-array fields from each record. Smaller payloads for agents and dashboards.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental mode (value-change tracking)",
            "type": "boolean",
            "description": "Compare against the previous run and flag records NEW, UPDATED, UNCHANGED or EXPIRED — a scheduled market-value change feed.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State key",
            "type": "string",
            "description": "Optional stable identifier for the tracked set. Leave empty to derive automatically from your selection."
          },
          "emitUnchanged": {
            "title": "➡️ Emit unchanged records",
            "type": "boolean",
            "description": "When incremental mode is on, also return records whose values did not change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "⌛ Emit expired records",
            "type": "boolean",
            "description": "When incremental mode is on, also return records that disappeared from your tracked selection since the last run (flagged EXPIRED).",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID (e.g. \"-100123456789\"). Required when telegramToken is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL. Server Settings → Integrations → Webhooks → New Webhook."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL. api.slack.com/messaging/webhooks."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp Phone Number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"436641234567\"). Recipient must have messaged your business number within last 24h."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends."
          },
          "webhookHeaders": {
            "title": "📋 Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "notificationLimit": {
            "title": "📊 Max records per notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of records included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify only new/updated",
            "type": "boolean",
            "description": "When incremental mode is on, only send notifications for NEW and UPDATED records.",
            "default": false
          },
          "appConnector": {
            "title": "Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. Best-effort across MCP connectors as Apify expands its catalog."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}