# Cricket Match Stats and Ball-by-Ball Scraper (`parselab/cricket-match-stats-scraper`) Actor

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.

- **URL**: https://apify.com/parselab/cricket-match-stats-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Sports, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $21.75 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cricket Match Stats Scraper: IPL, BBL, Tests, ODIs and T20 Ball-by-Ball Data

This cricket scraper turns the open Cricsheet archive into clean rows you can sort, filter and export. Pick a competition such as the IPL, Big Bash, PSL, The Hundred, Tests or ODIs, and get match results, batting and bowling scorecards, every delivery, player career totals, team records, venue statistics and batter against bowler matchups. Matches go back to 2001 for internationals and the archive is updated within days of each game.

The main difference from other cricket scrapers is that the work is already done for you. Raw ball-by-ball files give you deliveries and nothing else. This actor builds the numbers analysts actually ask for: strike rate, economy, dot ball percentage, boundary percentage, fall of wicket details, powerplay and death over splits, required run rate on every ball of a chase, career averages, winning percentage after winning the toss and more. Every player row also carries the Cricinfo and Cricbuzz player ids so you can join it with other sources.

Fantasy cricket players, betting analysts, journalists, club coaches and data science students use it to build models, dashboards and match previews.

### What cricket data can you get?

- **Matches and results**: one row per match with date, venue, city, competition, stage, toss, winner, margin in runs or wickets, Duckworth-Lewis flag, player of the match, umpires, referee, and the score of every innings with run rate, extras, fours, sixes and dot ball percentage.
- **Batting scorecards**: one row per batter and innings with runs, balls, fours, sixes, strike rate, boundary percentage, how they were out, the bowler and fielders involved, batting position and fall of wicket score.
- **Bowling scorecards**: one row per bowler and innings with overs, maidens, runs, wickets, economy, average, strike rate, dot balls, wides, no balls and boundaries conceded.
- **Ball-by-ball deliveries**: one row per delivery with batter, bowler, runs, extras, wicket details, phase of the innings, team score after the ball, and for second innings the runs required, balls remaining and required run rate.
- **Player career totals**: matches, runs, average, strike rate, fifties, hundreds, wickets, best bowling, catches, stumpings and player of the match awards. Group by player, season, format or competition.
- **Team records**: win percentage, win percentage when batting first or chasing, toss record, average first innings score, highest and lowest totals.
- **Venue statistics**: average first and second innings scores, batting first win percentage, boundaries per match, average powerplay and death over runs.
- **Batter vs bowler matchups**: balls faced, runs, dismissals, strike rate and dot ball percentage for any pairing.

### How to scrape IPL, BBL and international cricket stats

1. Choose what to collect, for example **Batting scorecards**.
2. Choose a competition such as the IPL, or leave the competition empty and enter years.
3. Add filters: teams, players, venue, dates, men or women, match formats.
4. Set the maximum number of items and run.

The newest matches come first, so a small run gives you the latest results.

### Input example

```
{
    "mode": "batting",
    "competition": "ipl",
    "years": ["2024"],
    "playerNames": ["V Kohli"],
    "maxItems": 100
}
```

Names follow the Cricsheet style of initials plus surname, such as V Kohli or JJ Bumrah. Partial names work. A collection code for countries, teams and leagues (india, england, mumbai_indians, msl) can be typed in the other collection field.

### Output example

A batting scorecard row from the IPL final of 2026:

```
{
    "matchId": 1535465,
    "date": "2026-05-31",
    "competition": "Indian Premier League",
    "venue": "Narendra Modi Stadium, Ahmedabad",
    "innings": 2,
    "team": "Royal Challengers Bengaluru",
    "opposition": "Gujarat Titans",
    "player": "V Kohli",
    "battingPosition": 2,
    "runs": 75,
    "balls": 42,
    "fours": 9,
    "sixes": 3,
    "strikeRate": 178.57,
    "boundaryPct": 72,
    "dotBallPct": 23.81,
    "notOut": true,
    "dismissal": "not out",
    "target": 156,
    "teamResult": "won",
    "playerOfMatch": true,
    "playerCricinfoId": 253802
}
```

A career row for Jasprit Bumrah in the IPL shows 158 matches, 187 wickets, an economy of 7.34, a bowling average of 23.75 and a best bowling of 5/10. Numbers are real numbers, not text, so they sort and chart without cleaning.

### Why use this cricket data scraper?

- **Eight views of the same data** instead of one flat delivery dump.
- **Derived statistics included**: averages, rates, percentages, phase splits and chase pressure, so you do not need to write your own aggregation code.
- **Player ids** for Cricinfo, Cricbuzz and Cricsheet on every player row.
- **Men's and women's cricket**, internationals, franchise leagues and domestic cups.
- **Clean field names** in camelCase, with empty values left empty instead of filled with text.
- **Super overs left out of statistics** by default, with an option to include them.

### Who uses cricket match data?

- Fantasy cricket players who want recent form, venue trends and bowler matchups.
- Betting analysts who build pricing models from toss, venue and phase data.
- Writers and broadcasters who need quick facts for previews and recaps.
- Coaches and analysts comparing batters against pace or spin bowlers.
- Students who need a clean cricket dataset for projects.

### Frequently asked questions

**How far back does the data go?**
International matches start in the early 2000s and many leagues start with their first season. Older Test matches are available for some series.

**How fresh is it?**
The source adds matches shortly after they finish. The "added in the last 30 days" option gives only new matches.

**Why do I see only 10 rows on the free plan?**
Free runs are a preview limited to 10 results. Paid plans return up to one million rows.

**Which formats are covered?**
Tests, ODIs, T20 internationals, domestic one day, multi-day domestic and over 100 leagues and cups.

**Can I get one row per player for a whole season?**
Yes. Use player career totals and group by player and season.

**What if a player name returns nothing?**
Check the spelling the way Cricsheet writes it, for example RG Sharma or MS Dhoni. Try a shorter part of the name.

### Data source and limits

Match data comes from Cricsheet (cricsheet.org), published under the Open Data Commons Attribution License. Please credit Cricsheet when you publish results built with this data. Statistics are calculated by this actor from ball-by-ball records, so figures can differ slightly from official records when a governing body corrects a match after publication. Fielding credit is based on the fielders named in the dismissal. Data for matches without ball-by-ball coverage is not included.

# Actor input Schema

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `mode` (type: `string`):

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.

## `competition` (type: `string`):

Which set of matches to read. Leave empty to read by years instead, or to get the matches added in the last 30 days.

## `customCollection` (type: `string`):

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` (type: `array`):

Seasons to keep, for example 2023 and 2024. When no competition is chosen these years select the matches played in any competition.

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

Keep matches on or after this date, format YYYY-MM-DD.

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

Keep matches on or before this date, format YYYY-MM-DD.

## `gender` (type: `string`):

Limit to men's or women's matches.

## `matchTypes` (type: `array`):

Keep only these formats, for example T20, ODI, Test, IT20, ODM, MDM.

## `teams` (type: `array`):

Keep matches that involve one of these teams. Partial names work, for example Mumbai or India.

## `venue` (type: `string`):

Keep matches at a ground or city that contains this text, for example Wankhede or Melbourne.

## `playerNames` (type: `array`):

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.

## `opponentNames` (type: `array`):

In head to head and deliveries mode these are the bowlers. In batting and bowling mode they are the opposition teams.

## `groupBy` (type: `string`):

Player career totals can be one row per player, or one row per player and season, format or competition.

## `minInnings` (type: `integer`):

Career totals only: skip players with fewer batting or bowling innings than this.

## `minBalls` (type: `integer`):

Head to head only: skip matchups with fewer legal balls than this.

## `includeSuperOvers` (type: `boolean`):

Super over innings are left out of statistics by default.

## `maxMatches` (type: `integer`):

Optional cap on the matches read, useful to test a big selection. Leave empty to read all.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "matches",
  "competition": "ipl",
  "gender": "all",
  "groupBy": "player",
  "minInnings": 1,
  "minBalls": 6,
  "includeSuperOvers": false
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/cricket-match-stats-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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/cricket-match-stats-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parselab/cricket-match-stats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/cricket-match-stats-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rcuMsJ5euI655gerC/builds/3wBcphH4tEFbCJJWd/openapi.json
