{
  "openapi": "3.0.1",
  "info": {
    "title": "ESPNCricinfo StatsGuru Scraper: Cricket Stats and Records",
    "description": "Export any ESPNCricinfo StatsGuru cricket statistics query to a structured dataset. Covers batting, bowling, fielding, all formats including Test, ODI, T20I, First Class, and women's cricket.",
    "version": "0.1",
    "x-build-id": "rBojPojT9uZDcNduE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~espncricinfo-statsguru-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-espncricinfo-statsguru-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/getascraper~espncricinfo-statsguru-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-espncricinfo-statsguru-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/getascraper~espncricinfo-statsguru-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-espncricinfo-statsguru-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",
        "required": [
          "format",
          "statType",
          "view"
        ],
        "properties": {
          "format": {
            "title": "Cricket Format",
            "enum": [
              "test",
              "odi",
              "t20i",
              "first_class",
              "list_a",
              "t20",
              "women_test",
              "women_odi",
              "women_t20i",
              "all_international"
            ],
            "type": "string",
            "description": "The cricket format to query. Use all_international to combine Test, ODI, and T20I in one dataset.",
            "default": "test"
          },
          "statType": {
            "title": "Stat Dimension",
            "enum": [
              "batting",
              "bowling",
              "fielding",
              "allround",
              "team",
              "fow"
            ],
            "type": "string",
            "description": "The type of statistic to extract: batting, bowling, fielding, all-round, team totals, or fall of wickets.",
            "default": "batting"
          },
          "view": {
            "title": "Aggregation View",
            "enum": [
              "innings",
              "overall",
              "match",
              "series",
              "ground",
              "host",
              "opposition",
              "year",
              "season"
            ],
            "type": "string",
            "description": "How to aggregate the results. Innings by Innings is the most granular: one row per individual performance.",
            "default": "innings"
          },
          "team": {
            "title": "Team",
            "type": "string",
            "description": "Filter by team name, e.g. India, Australia, England. Leave blank for all teams.",
            "default": ""
          },
          "opposition": {
            "title": "Opposition",
            "type": "string",
            "description": "Filter by opposition team name. Leave blank for all opponents.",
            "default": ""
          },
          "ground": {
            "title": "Ground",
            "type": "string",
            "description": "Filter by ground or venue name, e.g. Lords, MCG, Eden Gardens. Leave blank for all grounds.",
            "default": ""
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Only include matches on or after this date. Format: YYYY-MM-DD. Leave blank for no lower bound.",
            "default": ""
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Only include matches on or before this date. Format: YYYY-MM-DD. Leave blank for no upper bound.",
            "default": ""
          },
          "homeOrAway": {
            "title": "Home / Away",
            "enum": [
              "",
              "home",
              "away",
              "neutral"
            ],
            "type": "string",
            "description": "Filter by match location relative to the selected team. Choose Any to include all locations.",
            "default": ""
          },
          "result": {
            "title": "Match Result",
            "enum": [
              "",
              "won",
              "lost",
              "tied",
              "drawn"
            ],
            "type": "string",
            "description": "Filter by match result. Choose Any to include all outcomes.",
            "default": ""
          },
          "maxItems": {
            "title": "Max Records",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of records to extract. Set to 0 for all available records. Each StatsGuru page returns 50 records.",
            "default": 1000
          },
          "orderBy": {
            "title": "Sort By",
            "type": "string",
            "description": "Column to sort results by. Common values: runs, ave, wkts, econ, start. Defaults to runs.",
            "default": "runs"
          },
          "orderDirection": {
            "title": "Sort Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction for the chosen column.",
            "default": "desc"
          },
          "minQualification": {
            "title": "Minimum Qualification",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum innings or matches to qualify. Useful when using Overall or Career views to exclude low-sample players. Leave at 0 for no minimum.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "StatsGuru has no anti-bot protection. Proxies are not required for standard use.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}