IPL Data API

Base URL: https://apipl.onrender.com/api

Comprehensive cricket statistics from the Indian Premier League

API Overview

This API provides comprehensive statistics and data from the Indian Premier League (IPL) cricket tournament.

Note: When using query parameters, enter team names in UPPERCASE short forms (e.g., CSK, RCB) and ensure player names exactly match those listed in the Players section.

Features

  • Match statistics and details
  • Team performance metrics
  • Player comparisons and form
  • Fantasy points calculations
  • Live match simulations
  • AI-generated match summaries

Quick Start

  1. Explore endpoints below
  2. Copy the sample requests
  3. Modify parameters as needed
  4. Use in your applications

Sample Request

GET /api/teams
fetch('https://apipl.onrender.com/api/teams')
  .then(response => response.json())
  .then(data => console.log(data));

Sample Response

{
  "teams": [
    "Chennai Super Kings",
    "Delhi Capitals",
    "Gujarat Titans",
    "Kolkata Knight Riders",
    "Lucknow Super Giants",
    "Mumbai Indians",
    "Punjab Kings",
    "Rajasthan Royals",
    "Royal Challengers Bangalore",
    "Sunrisers Hyderabad"
  ]
}

All API Endpoints

Match Data Endpoints

GET /api/match_details

Get comprehensive details about a specific IPL match

GET
Parameters
  • match_id (required) - The ID of the match

GET /api/fantasy_points

Calculate fantasy points for players in a specific match

GET
Parameters
  • match_id (required) - The ID of the match

GET /api/live_simulation

Get simulated live match data up to a specific ball

GET
Parameters
  • match_id (required) - The ID of the match
  • upto_ball (optional) - The ball number to simulate up to (e.g., 12.3)

GET /api/match_progress

Get match progress up to a specific over

GET
Parameters
  • match_id (required) - The ID of the match
  • upto_over (required) - The over number to get progress up to

GET /api/notifications

Get milestone notifications for a match

GET
Parameters
  • match_id (required) - The ID of the match

GET /api/ai_summary

Get an AI-generated summary of a match

GET
Parameters
  • match_id (required) - The ID of the match

GET /api/runs_by_season

Get runs scored by season (optionally filtered by team)

GET
Parameters
  • season (optional) - Filter by specific season year
  • team (optional) - Filter by team name

Team Data Endpoints

GET /api/teams

Get list of all IPL teams

GET
Parameters

No parameters required

GET /api/team_runs_by_match

Get runs scored by a team in each match

GET
Parameters
  • team (required) - Team name
  • season (optional) - Filter by season year

GET /api/team_runrate_by_match

Get run rate by a team in each match

GET
Parameters
  • team (required) - Team name
  • season (optional) - Filter by season year

GET /api/team_wickets_by_match

Get wickets lost by a team in each match

GET
Parameters
  • team (required) - Team name
  • season (optional) - Filter by season year

GET /api/team_run_rate_trend

Get run rate trends by match phase (powerplay, middle, death)

GET
Parameters
  • team (required) - Team name
  • season (optional) - Filter by season year

GET /api/team_insights

Get performance insights for a specific team

GET
Parameters
  • team (required) - Team name

Player Data Endpoints

GET /api/player_form

Get recent form for a specific player

GET
Parameters
  • player (required) - Player name

GET /api/compare_players

Compare statistics between two players

GET
Parameters
  • player1 (required) - First player name
  • player2 (required) - Second player name

GET /api/head_to_head_player

Get head-to-head stats between a batter and bowler

GET
Parameters
  • batter (required) - Batsman name
  • bowler (required) - Bowler name

Statistical Endpoints

GET /api/hard_hitters

Get players with high strike rates and sixes

GET
Parameters
  • min_strike_rate (optional, default: 140) - Minimum strike rate
  • min_sixes (optional, default: 10) - Minimum number of sixes

GET /api/clutch_performers_teamwise

Get players who perform well in high-pressure situations

GET
Parameters

No parameters required

GET /api/consistent_performers_teamwise

Get players with consistent performance across matches

GET
Parameters

No parameters required

GET /api/leaderboards

Get various leaderboards (most sixes, best economy, etc.)

GET
Parameters

No parameters required

GET /api/top_players

Get top batsmen and bowlers

GET
Parameters
  • season (optional) - Filter by season year
  • limit (optional, default: 5) - Number of players to return

GET /api/summary

Get summary statistics (matches, runs, wickets)

GET
Parameters
  • season (optional) - Filter by season year
  • team (optional) - Filter by team name

IPL Teams

Chennai Super Kings (CSK)

Captain: MS Dhoni

Mumbai Indians (MI)

Captain: Rohit

Royal Challengers Bangalore (RCB)

Captain: Faf du Plessis

Kolkata Knight Riders (KKR)

Captain: Shreyas Iyer

Rajasthan Royals (RR)

Captain: Sanju Samson

Delhi Capitals (DC)

Captain: Rishabh Pant

Punjab Kings (PK)

Captain: Shikhar Dhawan

Sunrisers Hyderabad (SRH)

Captain: Aiden Markram

Gujarat Titans (GT)

Captain: Hardik Pandya

Lucknow Super Giants (LSG)

Captain: KL Rahul

Get All Teams via API

GET /api/teams
fetch('https://apipl.onrender.com/api/teams')
  .then(response => response.json())
  .then(data => console.log(data));

Featured Players

Top Batsmen

Kohli

RCB | Right-handed batsman

Rohit

MI | Right-handed batsman

David Warner

DC | Left-handed batsman

KL Rahul

LSG | Right-handed batsman

Top Bowlers

Bumrah

MI | Right-arm fast

Rashid Khan

GT | Right-arm legbreak

Yuzvendra Chahal

RR | Right-arm legbreak

Mohammed Shami

GT | Right-arm fast-medium

All-rounders

Hardik Pandya

GT | Right-handed batsman, Right-arm medium-fast

Ravindra Jadeja

CSK | Left-handed batsman, Left-arm orthodox

Andre Russell

KKR | Right-handed batsman, Right-arm fast

Glenn Maxwell

RCB | Right-handed batsman, Right-arm offbreak

Get Player Data via API

GET /api/player_form?player=Kohli
fetch('https://apipl.onrender.com/api/player_form?player=Kohli')
  .then(response => response.json())
  .then(data => console.log(data));

API Visual Examples

Match Progress Overview

Match Progress Screenshot

This shows how the match unfolded ball by ball, with scoring breakdown, innings flow, and timeline-based visualization.

Match Details API

Match Details Screenshot

Fetch match metadata like teams, scores, venue, toss, date & time, and match result.

Fantasy Points Summary

Fantasy Points Screenshot

Fantasy point calculation based on wickets, runs, economy, and boundaries. Ideal for fantasy team planning.

Team Performance Insights

Team Insights Screenshot

Phase-wise run rate and trends for each team across matches: Powerplay, Middle, and Death overs.

AI-Generated Match Summary

AI Summary Screenshot

Gemini/OpenAI-generated text summary highlighting clutch moments, standout performers, and match turning points.

Download Data

Download raw data files in CSV format for offline analysis.

Matches Data

Contains details of all IPL matches including teams, scores, venues, dates, and results.

Download matches.csv

Deliveries Data

Ball-by-ball data including runs, wickets, batsmen, bowlers, and match information.

Download deliveries.csv

Orange Cap (Top Batsmen)

Season-wise top run scorers in the IPL (Orange Cap winners).

Download orange_cap.csv

Purple Cap (Top Bowlers)

Season-wise top wicket takers in the IPL (Purple Cap winners).

Download purple_cap.csv