{
  "openapi": "3.0.1",
  "info": {
    "title": "Premier League API - Football Stats",
    "description": "Access Premier League football statistics, fixtures, standings, player data & match results. Historical data & real-time updates for sports analytics.",
    "version": "1.5",
    "x-build-id": "gjd62Y3uqefEAhaOR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~premier-league-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-premier-league-api",
        "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/alizarin_refrigerator-owner~premier-league-api/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-premier-league-api",
        "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/alizarin_refrigerator-owner~premier-league-api/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-premier-league-api",
        "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": [
          "task"
        ],
        "properties": {
          "task": {
            "title": "Task",
            "enum": [
              "standings",
              "fixtures",
              "teams",
              "team_details",
              "scorers",
              "match",
              "matches",
              "head_to_head",
              "injury_report"
            ],
            "type": "string",
            "description": "What data to fetch. injury_report is not available from any free source and returns an explanatory error row without a task charge.",
            "default": "standings"
          },
          "team": {
            "title": "Team name",
            "type": "string",
            "description": "Club name or abbreviation, e.g. \"Arsenal\", \"Man City\", \"LIV\". Used by team_details, head_to_head and to filter fixtures, matches and scorers."
          },
          "teamId": {
            "title": "Team ID",
            "type": "integer",
            "description": "ESPN club id, e.g. 359 Arsenal, 364 Liverpool, 382 Manchester City (the teams task lists all ids). If you supply a Football-Data.org apiKey, use Football-Data.org ids instead (57 Arsenal, 64 Liverpool)."
          },
          "opponent": {
            "title": "Opponent name",
            "type": "string",
            "description": "Second club for head_to_head when no matchId is given, e.g. \"Chelsea\"."
          },
          "opponentTeamId": {
            "title": "Opponent team ID",
            "type": "integer",
            "description": "ESPN id of the second club for head_to_head (alternative to Opponent name)."
          },
          "matchId": {
            "title": "Match ID",
            "type": "integer",
            "description": "ESPN match id (from the fixtures or matches task), used by match and head_to_head."
          },
          "season": {
            "title": "Season",
            "minimum": 2000,
            "maximum": 2100,
            "type": "integer",
            "description": "Season start year, e.g. 2026 for 2026/27 or 2025 for 2025/26. Leave empty for the current season."
          },
          "matchday": {
            "title": "Matchday",
            "minimum": 1,
            "maximum": 38,
            "type": "integer",
            "description": "Matchday number (1-38) for fixtures or matches. ESPN does not publish matchday numbers, so this is each club's Nth league match of the season."
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Start date for fixtures or matches (YYYY-MM-DD)"
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "End date for fixtures or matches (YYYY-MM-DD)"
          },
          "status": {
            "title": "Match Status",
            "enum": [
              "SCHEDULED",
              "LIVE",
              "IN_PLAY",
              "PAUSED",
              "FINISHED",
              "POSTPONED",
              "CANCELLED",
              "SUSPENDED"
            ],
            "type": "string",
            "description": "Filter fixtures or matches by status"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 380,
            "type": "integer",
            "description": "Maximum matches (fixtures, matches) or players (scorers) returned.",
            "default": 50
          },
          "apiKey": {
            "title": "Football-Data.org API Key (optional)",
            "type": "string",
            "description": "Optional. Not needed for live data. If set, data comes from Football-Data.org instead of ESPN (official matchday numbers, referees, longer head-to-head history), and teamId/matchId must be Football-Data.org ids."
          },
          "demoMode": {
            "title": "Demo Mode (sample data)",
            "type": "boolean",
            "description": "Return fixed sample data from the 2024/25 season instead of live data. Sample output is labeled isSampleData and is not charged per task.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "URL to receive results via POST request (Zapier, Make, n8n, or custom endpoint)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}