# Cricket Data API: ESPNcricinfo StatsGuru Export (`getascraper/espncricinfo-statsguru-scraper`) Actor

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.

- **URL**: https://apify.com/getascraper/espncricinfo-statsguru-scraper.md
- **Developed by:** [GetAScraper](https://apify.com/getascraper) (community)
- **Categories:** Developer tools, Other, News
- **Stats:** 5 total users, 2 monthly users, 99.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.47 / 1,000 stat rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Cricket Data API: ESPNcricinfo StatsGuru Export

**Export public ESPNcricinfo StatsGuru data as a clean cricket dataset without manually copying result tables.** This cricket data API exports batting, bowling, fielding, and record queries as structured rows for analysts, researchers, writers, and spreadsheet workflows. Use Raw Stats Export for source rows, or Form & Matchup Analysis for one recent batting or bowling summary per player in your selected context.

<table width="100%">
<tr>
<td style="padding:24px 28px;background:transparent;border:1px solid #3B5B9A;border-top:4px solid #1B3E8C;border-radius:12px">
<span style="font-size:23px;font-weight:800;line-height:1.3">Find recent form before the next fixture.</span><br>
<span style="font-size:15px;line-height:1.6">Filter by format, team, opposition, venue, result, and date. Get one useful summary per player instead of calculating it manually.</span>
</td>
</tr>
</table>

<table width="100%">
<tr>
<td style="padding:14px 12px;width:25%;background:transparent;border:1px solid #3B5B9A;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:15px;font-weight:800">📈 Recent form</span><br>
<span style="font-size:12px">See runs, averages, strike rate, wickets, and economy together.</span>
</td>
<td style="padding:14px 12px;width:25%;background:transparent;border:1px solid #3B5B9A;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800">🎯 Matchup context</span><br>
<span style="font-size:12px">Focus the result on the opponent and venue you are researching.</span>
</td>
<td style="padding:14px 12px;width:25%;background:transparent;border:1px solid #3B5B9A;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800">🏏 Any format</span><br>
<span style="font-size:12px">Use Tests, ODIs, T20s, domestic cricket, and women’s cricket.</span>
</td>
<td style="padding:14px 12px;width:25%;background:transparent;border:1px solid #3B5B9A;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:15px;font-weight:800">📥 Ready to use</span><br>
<span style="font-size:12px">Download clean JSON, CSV, or Excel results after the run.</span>
</td>
</tr>
</table>

### Cricket data API and ESPNcricinfo dataset exports

Use this StatsGuru scraper to turn a public StatsGuru query into a structured ESPNcricinfo dataset. It supports historical and current data across Tests, ODIs, T20Is, domestic competitions, and women's cricket. Download the resulting cricket data as JSON, CSV, or Excel after a run.

### What can you do with this StatsGuru scraper?

- **Fantasy and sports analysts:** Compare recent player output before a fixture without building a spreadsheet from innings rows.
- **Cricket writers:** Check a player’s form against an opponent or at a venue before publishing a preview.
- **Researchers:** Export historical batting, bowling, fielding, and team records for a model or report.
- **Scouting teams:** Build a focused record set using format, team, date, venue, and result filters.

### How the cricket data export works

<table width="100%">
<tr>
<td style="padding:16px 14px;width:33%;background:transparent;border:1px solid #3B5B9A;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:12px;font-weight:800;letter-spacing:1px">STEP 1</span><br>
<span style="font-size:14px;font-weight:700">Pick a result</span><br>
<span style="font-size:12px">Choose Raw Stats Export or Form & Matchup Analysis.</span>
</td>
<td style="padding:16px 14px;width:33%;background:transparent;border:1px solid #3B5B9A;border-left:none;vertical-align:top">
<span style="font-size:12px;font-weight:800;letter-spacing:1px">STEP 2</span><br>
<span style="font-size:14px;font-weight:700">Set the context</span><br>
<span style="font-size:12px">Add format, stat type, and any useful opponent, venue, or date filters.</span>
</td>
<td style="padding:16px 14px;width:33%;background:transparent;border:1px solid #3B5B9A;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:12px;font-weight:800;letter-spacing:1px">STEP 3</span><br>
<span style="font-size:14px;font-weight:700">Use the results</span><br>
<span style="font-size:12px">Open the matching Output tab, then download the records.</span>
</td>
</tr>
</table>

For a matchup, choose **Form & Matchup Analysis**, select **Batting** or **Bowling**, then enter an opponent in **Opposition**. The Actor combines each player’s most recent selected innings.

For a player comparison, paste up to 20 player IDs or ESPNcricinfo player profile URLs. The Actor resolves URL IDs locally, runs the same validated query for each unique player, and fairly distributes the global `maxItems` budget so every requested player can contribute results.

### Input for ESPNcricinfo StatsGuru queries

| Field | Type | Required | Description |
|---|---|---|---|
| `analysisMode` | enum | No | Choose raw table rows or one recent-form summary per player. |
| `format` | enum | No | Cricket format, including Test, ODI, T20I, domestic T20, and women’s formats. |
| `statType` | enum | No | Batting, bowling, fielding, all-round, team, or fall of wickets. Form analysis supports batting and bowling. |
| `view` | enum | No | Raw Stats Export aggregation: innings, career, match, series, venue, opponent, year, or season. |
| `team` | text | No | Limit results to a team. |
| `opposition` | text | No | Limit results to an opponent. Use this to analyse a matchup. |
| `groundId` / `groundUrl` | text | No | Filter by a numeric StatsGuru ground ID or a StatsGuru results URL containing `ground=<ID>`. Modern ground profile IDs are not the same and are rejected. |
| `playerId` / `playerUrl` | text | No | Filter by one numeric player ID or ESPNcricinfo player profile URL. |
| `playerIds` / `playerUrls` | list | No | Compare up to 20 unique players with the same StatsGuru query. |
| `dateFrom` / `dateTo` | date | No | Restrict the historical period. |
| `homeOrAway` | enum | No | Limit results to home, away, or neutral matches. |
| `result` | enum | No | Limit results by match result. |
| `maxItems` | integer | No | Global maximum source records across every player query. Form analysis requires a finite number and applies each player’s `formWindow` only within this bounded source set. |
| `formWindow` | integer | No | Number of most-recent innings per player for Form & Matchup Analysis. |
| `orderBy` / `orderDirection` | text / enum | No | Sort Raw Stats Export results. Form analysis sorts its source innings by date. |
| `minQualification` | integer | No | Minimum qualification for selected career-style raw views. |

### Cricket dataset output

#### 📈 Form & Matchup Analysis

| Field | Type | Description |
|---|---|---|
| `player_name` | string | Player represented by this recent-form summary. |
| `form_window_records` | number | Number of recent innings included for this player. |
| `latest_match_date` | string | Latest match date included in the summary. |
| `form_runs` | number | Total runs in the selected recent batting innings. |
| `form_average` | number | Batting average across selected recent innings, when the player was dismissed. |
| `form_strike_rate` | number | Runs per 100 balls faced across selected recent innings. |
| `form_wickets` | number | Wickets taken across selected recent bowling innings. |
| `form_overs` | number | Overs bowled across selected recent bowling innings. |
| `form_economy` | number | Runs conceded per over across selected recent bowling innings. |
| `source_record_count` | number | Matching innings available for this player before the form window is applied. |
| `source_query_url` | string | Exact StatsGuru page-one query used to produce the summary. |
| `team_filter` / `opposition_filter` / `ground_filter` / `player_filter` | string | Resolved StatsGuru IDs applied to the source query, when present. |
| `player_filter_name` | string | Player name read from the StatsGuru breadcrumb for a player-specific query. |
| `ground_filter_url` / `player_filter_url` | string | Normalized ESPNcricinfo URL supplied for the corresponding filter, when present. |
| `date_from` / `date_to` | string | Requested source date bounds, when present. |

#### Raw ESPNcricinfo StatsGuru export

Raw export returns the StatsGuru columns available for your selected report. Depending on the view, this can include player, runs, balls faced, strike rate, wickets, economy, opponent, ground, date, career span, and season.

### Useful cricket data API queries

- **Recent T20 batting form:** Choose Form & Matchup Analysis, T20I, Batting, and a recent date range.
- **Player form against an opponent:** Add an Opposition value, choose a recent-innings window, and use the Form & Matchup Analysis tab.
- **Compare several players:** Add their ESPNcricinfo profile URLs to Player URLs for Comparison, then choose one shared format, report, and context.
- **Venue-specific bowling form:** Choose Bowling, paste a StatsGuru Ground ID or a StatsGuru results URL that already contains the ground filter, then use the form summary fields for wickets and economy.
- **Historical research:** Choose Raw Stats Export and select the aggregation view that matches your question.

### Pricing

This Actor uses pay-per-event pricing. You pay only for useful results saved to your dataset. Empty runs cost nothing, and there are no subscriptions.

The optional `form-summary` event is currently held behind a publisher-only rollout guard. It will activate only after its exact event is configured in Apify Console and the required price-notice period has elapsed. Once live, the Actor applies exactly one custom charge to each emitted form summary and stops at the run billing limit. Raw Stats Export never calls this custom event.

### ⭐ Enjoying ESPNCricinfo StatsGuru Scraper?

<table width="100%">
<tr>
<td style="padding:20px 24px 14px;background:transparent;border:1px solid #3B5B9A;border-left:5px solid #1B3E8C;border-radius:10px 10px 0 0">
<span style="font-size:20px;letter-spacing:4px">⭐ ⭐ ⭐ ⭐ ⭐</span><br>
<span style="font-size:17px;font-weight:800">Did this save you from manually calculating recent cricket form?</span><br>
<span style="font-size:14px">A 5-star rating takes 10 seconds and helps other cricket analysts find the Actor. Your feedback also tells us what to build next.</span>
</td>
</tr>
<tr>
<td style="padding:0;background:#1B3E8C;border:1px solid #3B5B9A;border-top:none;border-radius:0 0 10px 10px;text-align:center">
<a href="https://apify.com/getascraper/espncricinfo-statsguru-scraper/reviews" style="display:block;padding:13px 16px;color:#FFFFFF;text-decoration:none;font-weight:800;font-size:15px;letter-spacing:0.3px">★&nbsp;&nbsp;Rate this Actor on Apify</a>
</td>
</tr>
</table>

### FAQ

##### Is this a cricket data API?

It is an Apify Actor that turns public ESPNcricinfo StatsGuru queries into structured dataset rows. Configure a query in the input form, run it, then retrieve the resulting cricket data through the Apify dataset interface or download it as JSON, CSV, or Excel.

##### What ESPNcricinfo dataset can I export?

You can export the public StatsGuru table for your selected stat type and view. Available output varies by report and can include player, runs, balls faced, strike rate, wickets, economy, opponent, ground, date, career span, and season.

##### What does Form & Matchup Analysis return?

It returns one summary per player from the selected recent innings. Batting summaries include runs, average, and strike rate. Bowling summaries include wickets, overs, and economy.

##### How do I analyse a player against a specific opponent?

Choose Form & Matchup Analysis, select Batting or Bowling, then set the Opposition filter. You can also narrow the results by team, venue, date, and result.

##### Can I compare several players in one run?

Yes. Add up to 20 player IDs or ESPNcricinfo player profile URLs. Duplicate players are removed, every query keeps its resolved `player_filter` provenance, and the global `maxItems` budget is distributed across the requested players.

##### Can I still download every original StatsGuru row?

Yes. Choose Raw Stats Export to keep the original report style, including innings, career, season, venue, and opponent views.

##### Is a login required?

No. The Actor uses publicly accessible StatsGuru statistics pages and does not require your ESPNCricinfo login.

### 🔗 Other actors

- [SofaScore Scraper: Live scores, stats and fixtures](https://apify.com/getascraper/sofascore-live-events-scraper) ↗: Extract live sports scores, stats, and fixtures.
- [Equibase Horse Racing Scraper: Odds & Payouts](https://apify.com/getascraper/equibase-us-horse-racing-scraper) ↗: Extract race entries, results, and payouts.
- [Twitch Scraper: Channels, live streams, clips and games](https://apify.com/getascraper/twitch-scraper) ↗: Extract Twitch channel, stream, and clip data.
- [Kick.com Scraper: Streams, clips and channel data](https://apify.com/getascraper/kick-scraper) ↗: Extract Kick streaming channel and clip data.

# Actor input Schema

## `analysisMode` (type: `string`):

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.

## `format` (type: `string`):

The cricket format to query. Use all\_international to combine Test, ODI, and T20I in one dataset.

## `statType` (type: `string`):

The type of statistic to extract: batting, bowling, fielding, all-round, team totals, or fall of wickets.

## `view` (type: `string`):

How to aggregate Raw Stats Export results. Form & Matchup Analysis always uses innings records so it can calculate recent form.

## `team` (type: `string`):

Filter by team name, e.g. India, Australia, England. Common international team names work directly. Leave blank for all teams.

## `opposition` (type: `string`):

Filter by opposition team name, e.g. Australia or India. Common international team names work directly. Leave blank for all opponents.

## `groundId` (type: `string`):

Filter by a positive numeric StatsGuru ground ID. You can use Ground URL instead if you do not know the ID.

## `groundUrl` (type: `string`):

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.

## `playerId` (type: `string`):

Filter by one positive numeric ESPNcricinfo player ID. You can use Player URL instead if you do not know the ID.

## `playerUrl` (type: `string`):

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.

## `playerIds` (type: `array`):

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.

## `playerUrls` (type: `array`):

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.

## `dateFrom` (type: `string`):

Only include matches on or after this date. Leave blank for no lower bound.

## `dateTo` (type: `string`):

Only include matches on or before this date. Leave blank for no upper bound.

## `homeOrAway` (type: `string`):

Filter by match location relative to the selected team. Choose Any to include all locations.

## `result` (type: `string`):

Filter by match result. Choose Any to include all outcomes.

## `maxItems` (type: `integer`):

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.

## `formWindow` (type: `integer`):

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.

## `orderBy` (type: `string`):

Verified StatsGuru order field. Common values: runs, batted\_score, wickets, economy\_rate, start. Unknown fields are rejected.

## `orderDirection` (type: `string`):

Sort direction for the chosen column.

## `minQualification` (type: `integer`):

Minimum innings or matches to qualify. Useful when using Overall or Career views to exclude low-sample players. Leave at 0 for no minimum.

## `proxyConfiguration` (type: `object`):

StatsGuru has no anti-bot protection. Proxies are not required for standard use.

## Actor input object example

```json
{
  "analysisMode": "form_matchup",
  "format": "t20i",
  "statType": "batting",
  "view": "innings",
  "team": "India",
  "opposition": "Australia",
  "groundId": "",
  "groundUrl": "",
  "playerId": "",
  "playerUrl": "",
  "playerIds": [],
  "playerUrls": [],
  "dateFrom": "",
  "dateTo": "",
  "homeOrAway": "",
  "result": "",
  "maxItems": 50,
  "formWindow": 5,
  "orderBy": "runs",
  "orderDirection": "desc",
  "minQualification": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `formSummaries` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "analysisMode": "form_matchup",
    "format": "t20i",
    "statType": "batting",
    "view": "innings",
    "team": "India",
    "opposition": "Australia",
    "groundId": "",
    "groundUrl": "",
    "playerId": "",
    "playerUrl": "",
    "playerIds": [],
    "playerUrls": [],
    "dateFrom": "",
    "dateTo": "",
    "homeOrAway": "",
    "result": "",
    "maxItems": 50,
    "formWindow": 5,
    "orderBy": "runs",
    "orderDirection": "desc",
    "minQualification": 0,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/espncricinfo-statsguru-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "analysisMode": "form_matchup",
    "format": "t20i",
    "statType": "batting",
    "view": "innings",
    "team": "India",
    "opposition": "Australia",
    "groundId": "",
    "groundUrl": "",
    "playerId": "",
    "playerUrl": "",
    "playerIds": [],
    "playerUrls": [],
    "dateFrom": "",
    "dateTo": "",
    "homeOrAway": "",
    "result": "",
    "maxItems": 50,
    "formWindow": 5,
    "orderBy": "runs",
    "orderDirection": "desc",
    "minQualification": 0,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/espncricinfo-statsguru-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "analysisMode": "form_matchup",
  "format": "t20i",
  "statType": "batting",
  "view": "innings",
  "team": "India",
  "opposition": "Australia",
  "groundId": "",
  "groundUrl": "",
  "playerId": "",
  "playerUrl": "",
  "playerIds": [],
  "playerUrls": [],
  "dateFrom": "",
  "dateTo": "",
  "homeOrAway": "",
  "result": "",
  "maxItems": 50,
  "formWindow": 5,
  "orderBy": "runs",
  "orderDirection": "desc",
  "minQualification": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call getascraper/espncricinfo-statsguru-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=getascraper/espncricinfo-statsguru-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pCGfEHUnaUnbUdRD0/builds/CbnlHg1Ch7q8SocEE/openapi.json
