{
  "openapi": "3.0.1",
  "info": {
    "title": "Cricket Match Stats and Ball-by-Ball Scraper",
    "description": "Get cricket match results, batting and bowling scorecards, ball-by-ball deliveries, player career totals, team records, venue stats and batter vs bowler matchups for IPL, BBL, PSL, Tests, ODIs, T20Is and 100+ leagues. Strike rates, economy and phases included.",
    "version": "1.0",
    "x-build-id": "3wBcphH4tEFbCJJWd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~cricket-match-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-cricket-match-stats-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~cricket-match-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-cricket-match-stats-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~cricket-match-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-cricket-match-stats-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": [
              "matches",
              "batting",
              "bowling",
              "deliveries",
              "playerCareer",
              "teamRecords",
              "venues",
              "headToHead"
            ],
            "type": "string",
            "description": "Matches gives one row per match with toss, result, margin, officials and every innings score. Batting and bowling give one scorecard row per player and innings. Deliveries gives one row per ball. Player careers, team records and venues are totals over all selected matches. Head to head gives batter against bowler matchups.",
            "default": "matches"
          },
          "competition": {
            "title": "Competition or format",
            "enum": [
              "none",
              "ipl",
              "bbl",
              "psl",
              "cpl",
              "sat",
              "ilt",
              "mlc",
              "lpl",
              "bpl",
              "hnd",
              "blz",
              "wpl",
              "wbb",
              "tests",
              "odis",
              "it20s",
              "t20s",
              "odms",
              "mdms",
              "icc_mens_t20_world_cup",
              "icc_mens_cricket_world_cup",
              "icc_womens_t20_world_cup",
              "icc_womens_cricket_world_cup",
              "recently_added_30",
              "recently_played_30",
              "all"
            ],
            "type": "string",
            "description": "Which set of matches to read. Leave empty to read by years instead, or to get the matches added in the last 30 days.",
            "default": "ipl"
          },
          "customCollection": {
            "title": "Other collection code",
            "type": "string",
            "description": "Optional. Any other Cricsheet collection code such as a country (india, england), a team (mumbai_indians) or a league code (msl, npl). Overrides the choice above."
          },
          "years": {
            "title": "Years",
            "type": "array",
            "description": "Seasons to keep, for example 2023 and 2024. When no competition is chosen these years select the matches played in any competition.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Played from",
            "type": "string",
            "description": "Keep matches on or after this date, format YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Played until",
            "type": "string",
            "description": "Keep matches on or before this date, format YYYY-MM-DD."
          },
          "gender": {
            "title": "Men or women",
            "enum": [
              "all",
              "male",
              "female"
            ],
            "type": "string",
            "description": "Limit to men's or women's matches.",
            "default": "all"
          },
          "matchTypes": {
            "title": "Match formats",
            "type": "array",
            "description": "Keep only these formats, for example T20, ODI, Test, IT20, ODM, MDM.",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Keep matches that involve one of these teams. Partial names work, for example Mumbai or India.",
            "items": {
              "type": "string"
            }
          },
          "venue": {
            "title": "Venue or city",
            "type": "string",
            "description": "Keep matches at a ground or city that contains this text, for example Wankhede or Melbourne."
          },
          "playerNames": {
            "title": "Players",
            "type": "array",
            "description": "Keep only these players, for example V Kohli, JJ Bumrah. Cricsheet writes names as initials plus surname. Partial names work. In head to head mode these are the batters.",
            "items": {
              "type": "string"
            }
          },
          "opponentNames": {
            "title": "Opponents",
            "type": "array",
            "description": "In head to head and deliveries mode these are the bowlers. In batting and bowling mode they are the opposition teams.",
            "items": {
              "type": "string"
            }
          },
          "groupBy": {
            "title": "Career totals grouped by",
            "enum": [
              "player",
              "playerSeason",
              "playerFormat",
              "playerCompetition"
            ],
            "type": "string",
            "description": "Player career totals can be one row per player, or one row per player and season, format or competition.",
            "default": "player"
          },
          "minInnings": {
            "title": "Minimum innings",
            "minimum": 1,
            "type": "integer",
            "description": "Career totals only: skip players with fewer batting or bowling innings than this.",
            "default": 1
          },
          "minBalls": {
            "title": "Minimum balls (head to head)",
            "minimum": 1,
            "type": "integer",
            "description": "Head to head only: skip matchups with fewer legal balls than this.",
            "default": 6
          },
          "includeSuperOvers": {
            "title": "Include super overs",
            "type": "boolean",
            "description": "Super over innings are left out of statistics by default.",
            "default": false
          },
          "maxMatches": {
            "title": "Max matches to read",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on the matches read, useful to test a big selection. Leave empty to read all."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}