Cricwix
← Back to blog
Guide·6 min read·June 18, 2026

ICC Rankings API: How to Fetch and Display Live Cricket Rankings

A practical guide to integrating ICC Test, ODI, and T20I rankings into your cricket app using the Cricwix Rankings API endpoint.

By Cricwix Team

ICC rankings are one of the most-searched pieces of cricket data. Fans check them after every series, analysts reference them in previews, and prediction models use them as a baseline input. This guide shows you how to integrate live ICC rankings into any app in minutes.

The Rankings Endpoint

Cricwix exposes rankings via a single endpoint with a format parameter:

bash
# Test rankings
GET https://api.cricwix.com/ext/v1/rankings?format=test&type=team

# T20I player rankings
GET https://api.cricwix.com/ext/v1/rankings?format=t20i&type=player&category=batting

Available Parameters

  • format: test | odi | t20i
  • type: team | player
  • category (player only): batting | bowling | allrounder
  • limit: number of results (default 10, max 100)

Sample Response

json
{
  "format": "t20i",
  "type": "player",
  "category": "batting",
  "updated_at": "2026-06-18T08:00:00Z",
  "data": [
    {
      "rank": 1,
      "player_id": "p_001",
      "name": "Suryakumar Yadav",
      "country": "India",
      "rating": 890,
      "change": 0
    }
  ]
}

Building a Rankings Table in React

tsx
async function getRankings(format: string, category: string) {
  const res = await fetch(
    `https://api.cricwix.com/ext/v1/rankings?format=${format}&type=player&category=${category}`,
    {
      headers: { 'x-api-key': process.env.CRICWIX_API_KEY! },
      next: { revalidate: 3600 }, // rankings update daily
    }
  );
  return res.json();
}

export default async function RankingsPage() {
  const { data } = await getRankings('t20i', 'batting');
  return (
    <table>
      <thead>
        <tr><th>Rank</th><th>Player</th><th>Country</th><th>Rating</th></tr>
      </thead>
      <tbody>
        {data.map((p: any) => (
          <tr key={p.player_id}>
            <td>#{p.rank}</td>
            <td>{p.name}</td>
            <td>{p.country}</td>
            <td>{p.rating}</td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}

Caching Strategy

ICC rankings update once per week after major series results, but the update time is not guaranteed. We recommend revalidating every hour — you will always show current data and your call count stays low.

Showing Rating Changes

The change field tells you how many positions a team or player moved since the last update. Positive means they moved up, negative means they dropped. Use this to show trend arrows in your UI:

tsx
function RankChange({ change }: { change: number }) {
  if (change > 0) return <span className="text-green-500">▲ {change}</span>;
  if (change < 0) return <span className="text-red-500">▼ {Math.abs(change)}</span>;
  return <span className="text-gray-400">—</span>;
}

Use Cases Beyond the Obvious

  • Pre-match context cards: show both teams' current rankings before a series preview
  • Fantasy cricket: use ratings as a tiebreaker when two players have similar recent form
  • Prediction models: include ICC rating as a feature input for win probability models
  • Content generation: auto-generate "Top 10 batters in T20Is right now" posts

ICC rankings are clean, structured, and updated regularly — the kind of data that is easy to consume and adds real context to any cricket product. With Cricwix, fetching them is a single API call.

// ready to build?

Start free today

100 free API calls per day. No credit card required.

Get your API key →