{
  "openapi": "3.0.1",
  "info": {
    "title": "Premier League Injuries & Availability Tracker",
    "description": "Every Premier League player who is injured, doubtful or suspended, with the official status note, the chance of playing the next round and when it was posted. Reads the league's own feed - no API key, no club pages to scrape. Monitor mode reports only what changed since the last run.",
    "version": "0.1",
    "x-build-id": "bge2yITbsxCO0nuhu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gganbukim~premier-league-injury-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gganbukim-premier-league-injury-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/gganbukim~premier-league-injury-scraper/runs": {
      "post": {
        "operationId": "runs-sync-gganbukim-premier-league-injury-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/gganbukim~premier-league-injury-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-gganbukim-premier-league-injury-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": {
          "teams": {
            "title": "Clubs",
            "type": "array",
            "description": "Club names or three-letter codes — Arsenal, MCI, Newcastle. Leave empty for all 20.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Statuses to include",
            "type": "array",
            "description": "Leave empty for every player who is not fully available. Availability is the league's own status code, not our judgement.",
            "items": {
              "type": "string",
              "enum": [
                "i",
                "d",
                "s",
                "u",
                "n",
                "a"
              ],
              "enumTitles": [
                "Injured",
                "Doubtful",
                "Suspended",
                "Unavailable",
                "Not in squad",
                "Available"
              ]
            },
            "default": []
          },
          "kinds": {
            "title": "Kind of absence",
            "type": "array",
            "description": "The league files a sold player and a torn hamstring under the same status. Pick 'Injury' to leave transfers out.",
            "items": {
              "type": "string",
              "enum": [
                "injury",
                "suspension",
                "transfer",
                "personal",
                "unknown"
              ],
              "enumTitles": [
                "Injury",
                "Suspension",
                "Transfer or loan",
                "Personal",
                "Unclassified"
              ]
            },
            "default": []
          },
          "includeAvailable": {
            "title": "Include fully fit players too",
            "type": "boolean",
            "description": "Off by default: a run returns only players with something to report. Turn on to get all ~600 as a squad snapshot.",
            "default": false
          },
          "minChanceOfPlaying": {
            "title": "Minimum chance of playing (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Players whose chance the league has not published are excluded when this is set — an unknown chance is not a pass."
          },
          "maxChanceOfPlaying": {
            "title": "Maximum chance of playing (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Use with the minimum to isolate the genuinely doubtful, e.g. 25 to 75."
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 0,
            "type": "integer",
            "description": "0 means no cap. A whole-league run is around 100-150 rows.",
            "default": 0
          },
          "onlyChanges": {
            "title": "Monitor mode — only what changed",
            "type": "boolean",
            "description": "Compares against the previous run and returns only movement: a new absence, a return, a changed chance of playing, a rewritten note. The first run records a baseline and charges nothing.",
            "default": false
          },
          "changeTypes": {
            "title": "Changes to report",
            "type": "array",
            "description": "Monitor mode only. Empty means all of them.",
            "items": {
              "type": "string",
              "enum": [
                "new_absence",
                "returned",
                "status_changed",
                "chance_changed",
                "news_updated"
              ],
              "enumTitles": [
                "New absence",
                "Returned to availability",
                "Status changed",
                "Chance of playing changed",
                "Note updated"
              ]
            },
            "default": []
          },
          "memoryStoreName": {
            "title": "Monitor memory store",
            "type": "string",
            "description": "Named key-value store holding the last snapshot. Use different names to watch different filters independently.",
            "default": "pl-availability-state"
          },
          "resetMemory": {
            "title": "Reset the monitor memory",
            "type": "boolean",
            "description": "Discards the stored snapshot so the next run starts a fresh baseline.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave the default. The run goes direct first, which costs nothing, and only changes route if the league refuses that address.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}