{
  "openapi": "3.0.1",
  "info": {
    "title": "Cricket Data API: ESPNcricinfo StatsGuru Export",
    "description": "Export public ESPNcricinfo StatsGuru cricket statistics as structured dataset rows. Query batting, bowling, fielding, and records across international, domestic, and women’s formats. A cricket data API for analysts and research workflows. From $0.62 per 1,000 raw records.",
    "version": "0.2",
    "x-build-id": "CbnlHg1Ch7q8SocEE"
  },
  "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",
        "properties": {
          "analysisMode": {
            "title": "Output Mode",
            "enum": [
              "records",
              "form_matchup"
            ],
            "type": "string",
            "description": "Choose Raw Stats Export for the original table rows, or Form & Matchup Analysis for one recent-form summary per player. Form & Matchup Analysis always uses innings records sorted by date.",
            "default": "records"
          },
          "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 Raw Stats Export results. Form & Matchup Analysis always uses innings records so it can calculate recent form.",
            "default": "innings"
          },
          "team": {
            "title": "Team",
            "type": "string",
            "description": "Filter by team name, e.g. India, Australia, England. Common international team names work directly. Leave blank for all teams.",
            "default": ""
          },
          "opposition": {
            "title": "Opposition",
            "type": "string",
            "description": "Filter by opposition team name, e.g. Australia or India. Common international team names work directly. Leave blank for all opponents.",
            "default": ""
          },
          "groundId": {
            "title": "Ground ID",
            "type": "string",
            "description": "Filter by a positive numeric StatsGuru ground ID. You can use Ground URL instead if you do not know the ID.",
            "default": ""
          },
          "groundUrl": {
            "title": "StatsGuru URL with Ground Filter",
            "type": "string",
            "description": "A StatsGuru results URL containing ground=<ID>. The Actor reads the actual StatsGuru filter locally. Modern ESPNcricinfo ground profile IDs are different and are intentionally rejected. If Ground ID is also supplied, both must identify the same filter.",
            "default": ""
          },
          "playerId": {
            "title": "Player ID",
            "type": "string",
            "description": "Filter by one positive numeric ESPNcricinfo player ID. You can use Player URL instead if you do not know the ID.",
            "default": ""
          },
          "playerUrl": {
            "title": "Player URL",
            "type": "string",
            "description": "One ESPNcricinfo player profile URL. The Actor extracts the verified numeric player ID locally. If Player ID is also supplied, both must identify the same player.",
            "default": ""
          },
          "playerIds": {
            "title": "Player IDs for Comparison",
            "maxItems": 20,
            "type": "array",
            "description": "Run the same StatsGuru query for several positive numeric player IDs. Duplicate IDs are removed. Up to 20 unique players are accepted across all player fields.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "playerUrls": {
            "title": "Player URLs for Comparison",
            "maxItems": 20,
            "type": "array",
            "description": "Run the same query for several ESPNcricinfo player profile URLs. IDs are resolved locally, duplicates are removed, and the global Max Records budget is distributed across the complete fan-out.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Only include matches on or after this date. Leave blank for no lower bound.",
            "default": ""
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Only include matches on or before this date. 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 source records to process across the entire run, including every player in a multi-player comparison. Set to 0 for all available Raw Stats Export records. Form & Matchup Analysis requires a finite limit.",
            "default": 1000
          },
          "formWindow": {
            "title": "Recent Innings per Player",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "For Form & Matchup Analysis only: calculate each player summary from this many most-recent innings. Use the Opposition filter to make the summary a specific matchup.",
            "default": 10
          },
          "orderBy": {
            "title": "Sort By",
            "type": "string",
            "description": "Verified StatsGuru order field. Common values: runs, batted_score, wickets, economy_rate, start. Unknown fields are rejected.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}