DEV Community

Vishal Swami
Vishal Swami

Posted on

I Built a Free Cricket API — Here's How to Use It (Live Scores, Fantasy Points, Ball-by-Ball)

I've been building cricket apps for a while, and the biggest pain point was always finding a reliable, affordable cricket API. Most options either cost a lot, have poor documentation, or go down during IPL matches (the worst time possible).

So I built CricLive API — a cricket data API with a genuinely free tier (500 calls/day, no credit card, no expiry).

Here's everything you can do with it.

What You Get for Free

  • Live cricket scores — real-time updates for IPL, T20, ODI, Test matches
  • Ball-by-ball commentary — every delivery, every wicket
  • Fantasy cricket points — Dream11-compatible, updated live
  • Player statistics — career stats for 10,000+ players
  • Match schedules — upcoming fixtures, playing XI, toss results
  • ICC Rankings — live rankings for all formats

Getting Started in 2 Minutes

Step 1: Sign up at cricketliveapi.com/register — just email + password, no credit card.

Step 2: Copy your API key from the dashboard.

Step 3: Make your first API call:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://cricketliveapi.com/api/v1/live-scores
Enter fullscreen mode Exit fullscreen mode

You'll get a JSON response like this:

{
  "status": "success",
  "data": [
    {
      "match_id": "12345",
      "teams": "India vs Australia",
      "score": "India 287/4 (48.2 ov)",
      "status": "live",
      "format": "ODI",
      "venue": "Wankhede Stadium, Mumbai"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Python Example — Fetch Live Scores

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://cricketliveapi.com/api/v1"

def get_live_scores():
    response = requests.get(
        f"{BASE_URL}/live-scores",
        headers={"Authorization": f"Bearer {API_KEY}"}
    )
    data = response.json()
    for match in data["data"]:
        print(f"{match['teams']}{match['score']}")

get_live_scores()
Enter fullscreen mode Exit fullscreen mode

JavaScript / Node.js Example

const axios = require('axios');

const API_KEY = 'your_api_key_here';

async function getLiveScores() {
  const { data } = await axios.get(
    'https://cricketliveapi.com/api/v1/live-scores',
    { headers: { Authorization: `Bearer ${API_KEY}` } }
  );
  data.data.forEach(match => {
    console.log(`${match.teams}${match.score}`);
  });
}

getLiveScores();
Enter fullscreen mode Exit fullscreen mode

Fantasy Cricket Points API

If you're building a fantasy cricket app, this is the endpoint you need:

GET /api/v1/fantasy/points/{match_id}
Enter fullscreen mode Exit fullscreen mode

Response includes pre-calculated Dream11-compatible points for every player — updated ball by ball.

{
  "players": [
    {
      "name": "Virat Kohli",
      "team": "RCB",
      "fantasy_points": 87.5,
      "runs": 72,
      "fours": 6,
      "sixes": 3
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Available Endpoints

Endpoint Description
GET /live-scores All live matches
GET /match/{id}/scorecard Full scorecard
GET /match/{id}/commentary Ball-by-ball commentary
GET /fantasy/points/{id} Fantasy points
GET /player/{id}/stats Player career stats
GET /series/{id}/schedule Match schedule
GET /rankings/{format} ICC rankings

Pricing

Plan Calls/Day Price
Free 500 ₹0
Starter 5,000 ₹999/month
Pro 50,000 ₹2,999/month
Enterprise Unlimited Custom

What Can You Build?

  • 🏏 Live score website or widget
  • 📱 Cricket Android/iOS app
  • 🎮 Fantasy cricket platform (Dream11 clone)
  • 📊 Cricket analytics dashboard
  • 🤖 Cricket score Telegram/WhatsApp bot
  • 📰 Sports news site with auto-populated scorecards

Get your free API key: cricketliveapi.com/register

No credit card. No commitment. 500 free calls/day forever.

Happy building! 🏏

Top comments (0)