WicketByte API Reference
Welcome to the official developer documentation for the WicketByte Real-Time Cricket Data Platform. Connect your fantasy app, sports news site, or analytics engine to ultra-low latency cricket feeds.
Authentication
All REST endpoints require an active API Key. You can generate a free 5,000-request developer key from your Client Dashboard.
Pass your API Key via Query Parameter or HTTP Header:
GET https://api.wicketbyte.in/api/matches?status=live&api_key=YOUR_API_KEY
curl -H "X-API-Key: YOUR_API_KEY" https://api.wicketbyte.in/api/matches?status=live
Rate Limits & Quota Errors
Every account has an allocated request quota (e.g. Free Starter: 5,000 requests; Developer Pro: 250,000 requests). When your quota runs out, the API returns an explicit HTTP 429 error response:
{
"success": false,
"code": 429,
"error": "Your API request limit is finished! You have used all (5000 / 5000) allocated API requests. Please upgrade or recharge your key at https://wicketbyte.in/user-dashboard",
"limit_finished": true,
"quota_used": 5000,
"quota_limit": 5000,
"dashboard_url": "https://wicketbyte.in/user-dashboard"
}
GET Live & Upcoming Matches
Returns the list of active live matches, upcoming fixtures, and recent results along with scores and run rates.
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by: live, upcoming, completed, or all. (Default: live) |
| limit | integer | Number of records to return (1-50). Default: 20. |
| api_key | string | Your active WicketByte API Key (Required). |
{
"success": true,
"total": 1,
"data": [
{
"id": "14HO",
"title": "Chitwan Rhinos vs Karnali Yaks",
"team1": "Chitwan Rhinos",
"team1_short": "CWR",
"team2": "Karnali Yaks",
"team2_short": "KNY",
"status": "live",
"active_team_score": "55/3 (7.1)",
"current_overs": "7.1",
"crr": "7.67",
"series_name": "Nepal Premier League 2026"
}
]
}
GET Single Match Detailed Scorecard
Returns deep live score details: currently active striker and non-striker batters, bowler figures, partnership details, over summaries, and live win probability.
| Parameter | Type | Description |
|---|---|---|
| id | string | Match ID (e.g. 14HO). Required. |
| api_key | string | Your active WicketByte API Key. Required. |
GET Ball-by-Ball Commentary & AI Feeds
Retrieves chronological ball-by-ball commentary, runs, wicket indicators, and AI live narrative enhancements.
{
"success": true,
"match_id": "14HO",
"count": 2,
"data": [
{
"over_num": "6.5",
"runs": "6",
"title": "Usama Mir to Pawan Sarraf",
"commentary_text": "SIX! Clean strike right over the long-on boundary for a maximum!",
"ai_commentary": "Pawan Sarraf skips down the track and unleashes a thunderous lofted drive into the crowd!",
"is_wicket": 0,
"is_boundary": 1
}
]
}
GET Gemini AI Ball-by-Ball Commentary Engine GEMINI 2.5 / 3 PRO
Generates context-aware, stadium-grade synthetic ball-by-ball commentary dynamically via Google Gemini AI models. Commentary unlocks tiered uniqueness and custom style prompts based on your subscribed plan.
- Free Tier: Shared baseline AI commentary across standard public matches.
- Basic Tier: 100% Unique per-subscriber AI commentary cache. Every ball yields distinct phrasing exclusively tied to your API Key.
- Advance Plan: Full AI Studio unlocked — choose from 6 commentator personalities, 8 broadcast languages, or inject custom brand persona and sponsor mentions (e.g. "Powered by YourBrand").
| Parameter | Type | Plan | Description |
|---|---|---|---|
| id | string | All | Match ID (e.g. 14HO, 13XD). Required. |
| tone | string | Advance | Commentary style: broadcast (Harsha Bhogle style), hype (High-octane stadium energy), analytical (Tactical & strike rates), humor (Witty banter), radio (Vintage radio storytelling), gully (Desi gully cricket swag). Default: broadcast. |
| lang | string | Advance | Broadcast language: en (English), hi (Hindi), hg (Hinglish), ta (Tamil), te (Telugu), bn (Bengali), mr (Marathi), ur (Urdu). Default: en. |
| limit | integer | All | Number of recent balls to retrieve (1 to 100). Default: 30. |
| custom_instructions | string | Advance | Custom prompt rules, sponsor mentions, or commentary persona (e.g. "Always mention 'Dream11 Super Six' on boundaries and keep lines under 20 words"). |
| api_key | string | All | Your active WicketByte API Key. Required via query param or X-API-Key header. |
{
"success": true,
"match_id": "14zw",
"commentary_tier": "advance",
"mode": "advance_custom",
"tone": "hype",
"language": "hi",
"count": 30,
"ai_generated": 1,
"model": "wicketbyte-ai-v3",
"data": [
{
"id": 104,
"match_id": "14zw",
"over_num": "19.4",
"runs": "6",
"title": "Usama Mir to Pawan Sarraf",
"commentary_text": "SIX! Clean strike right over the long-on boundary for a maximum!",
"ai_commentary": "गज़ब का सिक्स! पावन सर्राफ ने गेंद को सीधे स्टेडियम के पार पहुंचा दिया! दर्शकों में जबरदस्त रोमांच!",
"ai_status": "custom_generated",
"is_wicket": 0,
"is_boundary": 1
}
]
}
GET Legal Procedural Vector Avatars
Dynamically renders a 100% legal, copyright-free SVG athlete avatar with deterministic sports gradients, initials, and role badges ( Batsman, 🔴 Bowler, 🧤 Wicketkeeper).
WS Real-Time WebSocket Protocol
For sub-second live scoreboards (<100ms push), establish a persistent WebSocket connection directly with our cluster.
const ws = new WebSocket('wss://api.wicketbyte.in/ws');
ws.onopen = () => {
console.log('Connected to WicketByte Stream');
// Subscribe to a specific match
ws.send(JSON.stringify({ type: 'GET_MATCH', match_id: '14HO' }));
};
ws.onmessage = (event) => {
const payload = JSON.parse(event.data);
if (payload.type === 'LIVE_UPDATE') {
console.log('⚡ Scoreboard Updated:', payload.live);
}
};
// Keep-alive ping every 30 seconds
setInterval(() => ws.send(JSON.stringify({ type: 'PING' })), 30000);