{
  "openapi": "3.0.1",
  "info": {
    "title": "FotMob Football Data Scraper",
    "description": "Fetch FotMob match schedules, live scores, results, league catalogs, standings, historical seasons, fixtures, and top players from public JSON endpoints. Outputs clean match, league, and league-season dataset records.",
    "version": "0.1",
    "x-build-id": "quBiQ95KP4kX5Hca3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~fotmob-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-fotmob-data-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/fetchfinch~fotmob-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-fotmob-data-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/fetchfinch~fotmob-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-fotmob-data-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": {
          "operation": {
            "title": "Data to fetch",
            "enum": [
              "matches",
              "leagues",
              "leagueSeasons",
              "both"
            ],
            "type": "string",
            "description": "Matches are returned as one row per match. Leagues are returned as one row per league. League seasons include standings, fixtures, results, top players, and available seasons. Both combines matches and the league catalog.",
            "default": "matches"
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "First date to fetch in the selected timezone. Defaults to today."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last date to fetch, inclusive. Leave empty to fetch only Start date."
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA timezone used by FotMob for the match date and local kickoff time.",
            "default": "Europe/Prague"
          },
          "countryCode": {
            "title": "Country / locale code",
            "enum": [
              "INT",
              "ALB",
              "ALG",
              "ARG",
              "ARM",
              "AUS",
              "AUT",
              "AZE",
              "BAN",
              "BLR",
              "BEL",
              "BOL",
              "BIH",
              "BRA",
              "BUL",
              "CAN",
              "CHI",
              "CHN",
              "COL",
              "CRC",
              "CRO",
              "CYP",
              "CZE",
              "DEN",
              "ECU",
              "EGY",
              "SLV",
              "ENG",
              "EST",
              "FRO",
              "FIN",
              "FRA",
              "GEO",
              "GER",
              "GHA",
              "GRE",
              "GUA",
              "HON",
              "HUN",
              "ISL",
              "IND",
              "IDN",
              "IRN",
              "IRQ",
              "IRL",
              "ISR",
              "ITA",
              "JPN",
              "KAZ",
              "KUW",
              "LVA",
              "LTU",
              "LUX",
              "MKD",
              "MAS",
              "MEX",
              "MDA",
              "MNE",
              "MAR",
              "NED",
              "NZL",
              "NGA",
              "NIR",
              "NOR",
              "PAN",
              "PAR",
              "PER",
              "POL",
              "POR",
              "QAT",
              "ROU",
              "RUS",
              "KSA",
              "SCO",
              "SRB",
              "SIN",
              "SVK",
              "SVN",
              "RSA",
              "KOR",
              "ESP",
              "SWE",
              "SUI",
              "TAN",
              "THA",
              "TUN",
              "TUR",
              "UKR",
              "UAE",
              "USA",
              "URU",
              "UZB",
              "VEN",
              "VIE",
              "WAL"
            ],
            "type": "string",
            "description": "Three-letter country or region code sent as FotMob's ccode3/country parameter. It controls localization; use League country codes to filter results.",
            "default": "INT"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Locale sent to the league catalog endpoint.",
            "default": "en"
          },
          "includeNextDayLateNight": {
            "title": "Include late-night matches",
            "type": "boolean",
            "description": "Include matches that FotMob groups with the selected date even when they start after midnight local time.",
            "default": true
          },
          "leagueIds": {
            "title": "League IDs",
            "type": "array",
            "description": "For Matches/Leagues: optional IDs to keep. For League seasons: IDs to scrape; if empty, Premier League (47) is used.",
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "League seasons to fetch, for example [\"2025/2026\"]. Leave empty to fetch the most recent seasons.",
            "items": {
              "type": "string",
              "pattern": "^\\d{4}[-/]\\d{4}$"
            }
          },
          "maxSeasons": {
            "title": "Maximum seasons per league",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Used when Seasons is empty. Fetches the most recent N seasons, up to 10.",
            "default": 1
          },
          "includeStandings": {
            "title": "Include standings",
            "type": "boolean",
            "description": "Include the season table.",
            "default": true
          },
          "includeFixtures": {
            "title": "Include fixtures and results",
            "type": "boolean",
            "description": "Include every fixture/result and a flat matchIds list.",
            "default": true
          },
          "includeTopPlayers": {
            "title": "Include top players",
            "type": "boolean",
            "description": "Include FotMob's top players by rating, goals, and assists.",
            "default": true
          },
          "includeStats": {
            "title": "Include statistic categories",
            "type": "boolean",
            "description": "Include FotMob's player/team stat categories and top-three entries. This can increase record size.",
            "default": false
          },
          "leagueCountryCodes": {
            "title": "Filter by league country codes",
            "type": "array",
            "description": "Optional output filter, for example [\"ENG\"] or [\"ENG\", \"ESP\"].",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            }
          },
          "matchStatus": {
            "title": "Match status",
            "enum": [
              "all",
              "live",
              "upcoming",
              "finished",
              "cancelled"
            ],
            "type": "string",
            "description": "Filter match rows after fetching.",
            "default": "all"
          },
          "maxItems": {
            "title": "Maximum output records",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows written across the entire run. Set to 0 for unlimited.",
            "default": 0
          },
          "maxDays": {
            "title": "Maximum date range",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Safety limit for multi-day match runs.",
            "default": 31
          },
          "includeRaw": {
            "title": "Include raw source item",
            "type": "boolean",
            "description": "Add the original FotMob match or league object under rawData. This increases dataset size.",
            "default": false
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Politeness delay before each FotMob request.",
            "default": 250
          },
          "maxRetries": {
            "title": "Maximum retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for temporary network errors, HTTP 429, and HTTP 5xx responses.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Direct requests work for normal runs; a proxy can help with larger jobs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}