Skip to content

Guides

How do I get every IPL match result in Python?

Every match of an IPL season with both scores, the toss, the result and the margin, one row per match.

Code verified November 3, 2026. One call to get_matches, 2 credits.

The call

competition is any key from list_competitions. A year also finds a split season that starts in it.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

resp = requests.post(
    "https://mcp.yorkerapi.com/v1/get_matches",
    headers={"x-api-key": API_KEY},
    json={
        "competition": "ipl",
        "season": "2025",
        "limit": 100,
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

matches = pd.DataFrame(data["matches"])
print(len(matches), "matches")
print(matches["winner_id"].value_counts().head(5))
bat_first_won = matches["win_by_runs"].notna().mean()
print("side batting first won", round(bat_first_won, 3))

Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.

What comes back

The data object of the response, trimmed to the first rows. Every field is real output from the run above.

{
  "matches": [
    {
      "match_id": "1473511",
      "competition": "ipl",
      "event_name": "Indian Premier League",
      "season": "2025",
      "start_date": "2025-06-03",
      "end_date": "2025-06-03",
      "match_type": "T20",
      "format": "t20",
      "gender": "male",
      "event_stage": "Final",
      "event_match_number": null,
      "team1_id": "royal-challengers-bengaluru",
      "team1": "Royal Challengers Bengaluru",
      "team2_id": "punjab-kings",
      "team2": "Punjab Kings",
      "venue": "Narendra Modi Stadium, Ahmedabad",
      "city": "Ahmedabad",
      "toss_winner_id": "punjab-kings",
      "toss_decision": "field",
      "winner_id": "royal-challengers-bengaluru",
      "result": "win",
      "win_by_runs": 6,
      "win_by_wickets": null,
      "win_by_innings": null,
      "method": null,
      "team1_score": "190/9",
      "team2_score": "184/7"
    },
    {
      "match_id": "1473510",
      "competition": "ipl",
      "event_name": "Indian Premier League",
      "season": "2025",
      "start_date": "2025-06-01",
      "end_date": "2025-06-01",
      "match_type": "T20",
      "format": "t20",
      "gender": "male",
      "event_stage": "Qualifier 2",
      "event_match_number": null,
      "team1_id": "mumbai-indians",
      "team1": "Mumbai Indians",
      "team2_id": "punjab-kings",
      "team2": "Punjab Kings",
      "venue": "Narendra Modi Stadium, Ahmedabad",
      "city": "Ahmedabad",
      "toss_winner_id": "punjab-kings",
      "toss_decision": "field",
      "winner_id": "punjab-kings",
      "result": "win",
      "win_by_runs": null,
      "win_by_wickets": 5,
      "win_by_innings": null,
      "method": null,
      "team1_score": "203/6",
      "team2_score": "207/5"
    },
    "...72 more"
  ],
  "count": 74,
  "next_offset": null
}

What to do next

  • get_match (5 credits). One match's batting and bowling cards and every book's price.
  • get_leaders (5 credits). The season's top run scorers and wicket takers.

More guides

Start with 500 free credits every month

No card. REST or MCP.