{
  "openapi": "3.0.1",
  "info": {
    "title": "Fantasy Premier League Scraper",
    "description": "Get Fantasy Premier League player stats, prices, form, expected goals, ownership, injury news and the next fixtures with difficulty. Also pull gameweek history, past seasons, live points, fixtures, gameweek summaries, league tables and manager squads. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "W5TRefU4ERj8d1FCx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~fpl-fantasy-premier-league-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-fpl-fantasy-premier-league-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/parselab~fpl-fantasy-premier-league-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-fpl-fantasy-premier-league-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/parselab~fpl-fantasy-premier-league-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-fpl-fantasy-premier-league-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "players",
              "gameweekhistory",
              "pastseasons",
              "fixtures",
              "teams",
              "gameweeks",
              "live",
              "league",
              "managers"
            ],
            "type": "string",
            "description": "Players gives one row per player with current stats, price, form, expected numbers and the next fixtures. Gameweek history gives one row per player per gameweek. Past seasons gives one row per player per earlier season. Fixtures, teams and gameweeks describe the season. Live gives points for a gameweek with a breakdown. League gives a league table. Managers gives team history and squads.",
            "default": "players"
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Premier League teams to keep, by short name or name, for example MCI, ARS or Liverpool.",
            "items": {
              "type": "string"
            }
          },
          "positions": {
            "title": "Positions",
            "type": "array",
            "description": "Positions to keep: GKP, DEF, MID or FWD.",
            "items": {
              "type": "string"
            }
          },
          "playerNames": {
            "title": "Player names",
            "type": "array",
            "description": "Keep only players that match these names, for example Haaland or Salah. Partial names work.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Availability",
            "type": "array",
            "description": "Keep players by availability: available, doubtful, injured, suspended, unavailable or not in squad.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Lowest current price in millions, for example 4.5."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Highest current price in millions, for example 8.0."
          },
          "minMinutes": {
            "title": "Minimum minutes played",
            "minimum": 0,
            "type": "integer",
            "description": "Only players who have played at least this many minutes this season."
          },
          "sortBy": {
            "title": "Sort players by",
            "enum": [
              "totalPoints",
              "form",
              "pointsPerGame",
              "selectedBy",
              "price",
              "expectedGoalInvolvements",
              "ictIndex",
              "transfersInEvent",
              "valueSeason",
              "minutes"
            ],
            "type": "string",
            "description": "Order of the player list, highest first.",
            "default": "totalPoints"
          },
          "nextFixtures": {
            "title": "Number of next fixtures",
            "minimum": 0,
            "maximum": 38,
            "type": "integer",
            "description": "How many upcoming fixtures to attach to each player, with opponent and difficulty.",
            "default": 5
          },
          "gameweeks": {
            "title": "Gameweeks",
            "type": "array",
            "description": "Gameweek numbers to keep, for example 1, 2, 3. For live points and manager squads the current or last finished gameweek is used when empty.",
            "items": {
              "type": "string"
            }
          },
          "leagueId": {
            "title": "League ID",
            "type": "integer",
            "description": "Classic league number for league mode. 314 is the overall league. You can find a league number in the address of its page on the game website.",
            "default": 314
          },
          "entryIds": {
            "title": "Manager team IDs",
            "type": "array",
            "description": "Team numbers for manager mode. You can find a team number in the address of a team page on the game website.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}