{
  "openapi": "3.0.1",
  "info": {
    "title": "Cricket Sabermetrics API — Jenko Analytics",
    "description": "Modern cricket analytics beyond batting average. 9 analysis modes covering Tests, ODIs, T20Is, IPL, BBL, SA20 and more — with head-to-head, venue masters, pressure situations, era comparison and JTM match prediction.",
    "version": "1.0",
    "x-build-id": "uXSuotJPapJClLIXz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jenko_systems~cricket-sabermetrics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jenko_systems-cricket-sabermetrics",
        "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/jenko_systems~cricket-sabermetrics/runs": {
      "post": {
        "operationId": "runs-sync-jenko_systems-cricket-sabermetrics",
        "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/jenko_systems~cricket-sabermetrics/run-sync": {
      "post": {
        "operationId": "run-sync-jenko_systems-cricket-sabermetrics",
        "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": "Analysis Mode",
            "enum": [
              "player_jenko_profile",
              "player_h2h_jenko",
              "match_jenko_breakdown",
              "team_jenko_strength",
              "era_compare",
              "tournament_analytics",
              "pressure_situations_analysis",
              "conditions_specialist_finder",
              "match_predictor"
            ],
            "type": "string",
            "description": "Which analysis to run. Each mode has its own required fields below.",
            "default": "player_jenko_profile"
          },
          "tournament": {
            "title": "Tournament / Competition",
            "enum": [
              "ipl",
              "wpl",
              "bbl",
              "wbbl",
              "sa20",
              "csa_t20",
              "t20_blast",
              "the_hundred",
              "cpl",
              "psl",
              "bpl",
              "lpl",
              "ilt",
              "mlc",
              "wcpl",
              "tests",
              "tests_women",
              "odis",
              "odis_women",
              "t20is",
              "t20is_women",
              "all"
            ],
            "type": "string",
            "description": "Which competition to load. Specifying a single one is much faster than 'all'.",
            "default": "ipl"
          },
          "format": {
            "title": "Format Filter (when tournament=all)",
            "enum": [
              "all",
              "test",
              "odi",
              "t20",
              "t20_franchise"
            ],
            "type": "string",
            "description": "Optional: restrict to a format when tournament='all'.",
            "default": "all"
          },
          "player_name": {
            "title": "Player Name",
            "type": "string",
            "description": "Used by player_jenko_profile and player_h2h_jenko. Cricsheet uses initial+surname format (e.g., 'V Kohli', 'SR Tendulkar'). Fuzzy match supported."
          },
          "player_name_b": {
            "title": "Second Player Name (for H2H)",
            "type": "string",
            "description": "Used by player_h2h_jenko mode only."
          },
          "team_name": {
            "title": "Team Name",
            "type": "string",
            "description": "Used by team_jenko_strength and match_predictor. Examples: 'India', 'Mumbai Indians', 'Chennai Super Kings'."
          },
          "team_name_b": {
            "title": "Second Team Name (for match prediction)",
            "type": "string",
            "description": "Used by match_predictor mode only."
          },
          "venue": {
            "title": "Venue",
            "type": "string",
            "description": "Used by conditions_specialist_finder and match_predictor. Partial match accepted (e.g., 'Wankhede', 'Chinnaswamy')."
          },
          "match_id": {
            "title": "Cricsheet Match ID",
            "type": "string",
            "description": "Used by match_jenko_breakdown. Example: '335982' (first IPL match ever)."
          },
          "min_innings": {
            "title": "Minimum Innings (filter)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Used by leaderboard-style modes to filter out small samples. Default varies by mode.",
            "default": 10
          },
          "date_from": {
            "title": "Date From (optional)",
            "type": "string",
            "description": "Used by tournament_analytics to restrict to a date range. ISO format: YYYY-MM-DD."
          },
          "date_to": {
            "title": "Date To (optional)",
            "type": "string",
            "description": "Used by tournament_analytics to restrict to a date range. ISO format: YYYY-MM-DD."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}