{
  "openapi": "3.0.1",
  "info": {
    "title": "MLS & North American Soccer Teams, Players & Results",
    "description": "List current teams, search players, or pull season match results across MLS, USL, NWSL, Liga MX, CONCACAF, and the top five European leagues, with club details, player bios, and final scores.",
    "version": "1.0",
    "x-build-id": "oDXiFEe6U4kFMI9b7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~mls-and-north-american-soccer-teams-players/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-mls-and-north-american-soccer-teams-players",
        "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/dataspryva~mls-and-north-american-soccer-teams-players/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-mls-and-north-american-soccer-teams-players",
        "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/dataspryva~mls-and-north-american-soccer-teams-players/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-mls-and-north-american-soccer-teams-players",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "teams",
              "team",
              "players",
              "games",
              "standings",
              "event",
              "leagues"
            ],
            "type": "string",
            "description": "Choose a league roster, a club profile, player profiles, season matches, a league table, one match, or the league directory.",
            "default": "teams"
          },
          "league": {
            "title": "League",
            "enum": [
              "mls",
              "usl",
              "nwsl",
              "liga_mx",
              "concacaf",
              "epl",
              "bundesliga",
              "serie_a",
              "la_liga",
              "ligue_1"
            ],
            "type": "string",
            "description": "Competition used by the teams, games, standings and team-name lookup modes.",
            "default": "mls"
          },
          "searchQueries": {
            "title": "Player names, IDs or profile URLs",
            "type": "array",
            "description": "One or more players for the player search mode. A name, a numeric player ID, or a thesportsdb.com/player/... URL all work.",
            "default": [
              "Lorenzo Insigne"
            ],
            "items": {
              "type": "string"
            }
          },
          "teamQueries": {
            "title": "Team names, IDs or team URLs",
            "type": "array",
            "description": "One or more clubs for the team profile mode. A name, a numeric team ID, or a thesportsdb.com/team/... URL all work.",
            "default": [
              "Inter Miami"
            ],
            "items": {
              "type": "string"
            }
          },
          "eventQueries": {
            "title": "Event IDs or match URLs",
            "type": "array",
            "description": "One or more matches for the match details mode. Use a numeric event ID or a thesportsdb.com/event/... URL.",
            "default": [
              "2627210"
            ],
            "items": {
              "type": "string"
            }
          },
          "season": {
            "title": "Season",
            "type": "string",
            "description": "Season year or range, for example 2025. MLS, USL, NWSL, Liga MX and CONCACAF use a single year; the five European leagues accept a start year (2025 becomes 2025-2026) or a full range.",
            "default": "2026"
          },
          "round": {
            "title": "Round filter",
            "type": "string",
            "description": "Optional round number for season matches, for example 10 or r10. Leave empty for the whole season."
          },
          "teamFilter": {
            "title": "Team filter for matches",
            "type": "string",
            "description": "Optional club name or team ID. Only matches involving that club are returned."
          },
          "eventWindow": {
            "title": "Match window",
            "enum": [
              "all",
              "upcoming",
              "recent"
            ],
            "type": "string",
            "description": "Return the whole season, only future fixtures, or only completed matches.",
            "default": "all"
          },
          "includeSquad": {
            "title": "Include squad",
            "type": "boolean",
            "description": "For team profiles, also return the club's player list.",
            "default": true
          },
          "includeEventDetails": {
            "title": "Include match lineups & stats",
            "type": "boolean",
            "description": "For season matches, also return lineups, statistics and timeline for each returned match. This costs extra requests.",
            "default": false
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on returned records. A high value requests a full season (about 380 matches in a European league); the shared free key can stop a long round walk early, in which case the run returns what it collected.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}