📊 AlyBet API Documentation

Real-time sports betting odds from multiple bookmakers

⏳ Loading capabilities...
← Integration Guide 🔌 Test API Connection Admin Panel Live Odds

🚀 Quick Start

✅ Base URL https://alybet.io

1. Check Available Endpoints

Always start by checking what endpoints are available:

curl https://alybet.io/api/capabilities

2. Fetch Odds Data (v2 - Recommended)

curl https://alybet.io/api/v2/odds

3. Filter by Bookmaker

curl "https://alybet.io/api/v2/odds?bookmaker=winner"

⚠️ Important Notes

Capabilities-First Architecture Always call /api/capabilities first to discover supported endpoints and filters. Do not hardcode endpoint lists - they may change.
Rate Limiting Please implement reasonable polling intervals (recommended: 5-30 seconds). Excessive requests may be throttled.

📡 API Endpoints

Loading endpoints from server...

🔧 Error Handling

Status Code Meaning Action
200 Success Process response data
400 Bad Request Check parameters (e.g., invalid bookmaker name)
404 Not Found Endpoint not supported - check /api/capabilities
500 Server Error Retry with exponential backoff
503 Service Unavailable Backend temporarily unavailable, retry later

📋 Response Format

v2 Recommended Use /api/v2/odds for new integrations. It provides cleaner data with sport field, structured odds, null handling, and filtered empty entries.

/api/v2/odds (Recommended)

{
  "version": 8,
  "matches": [
    {
      "id": "superbet_11521552",
      "sport": "football",
      "bookmaker": "Superbet",
      "home": "Lech Poznan",
      "away": "Gornik Zabrze",
      "league": "Ekstraklasa",
      "odds": {"1": 2.10, "X": 3.40, "2": 3.20},
      "start_time": 1772722800,
      "updated": 1770477003
    }
  ],
  "matches_count": 150
}
FieldTypeDescription
idstringUnique match identifier (bookmaker_id format)
sportstringSport type (currently "football")
bookmakerstringSource bookmaker name
home / awaystringTeam names (entries with empty names are excluded)
leaguestringLeague name ("Unknown" if not available)
oddsobjectOdds map: {"1": home, "X": draw, "2": away}
start_timenumber|nullUnix timestamp, or null if unknown
updatednumberUnix timestamp of last update

/api/odds (v1 - Legacy)

{
  "version": 8,
  "matches": [
    {
      "id": "superbet_11521552",
      "bookmaker": "Superbet",
      "home": "Lech Poznan",
      "away": "Gornik Zabrze",
      "league": "",
      "odds": [2.10, 3.40, 3.20],
      "start_time": 0,
      "updated": 1770477003
    }
  ],
  "matches_count": 150
}
v1 Differences No sport field. Odds as array [home, draw, away] instead of map. Empty league as "" instead of "Unknown". Unknown start_time as 0 instead of null. Entries with empty team names are included.

Capabilities Endpoint Response

{
  "endpoints": [
    "/api/odds",
    "/api/v2/odds",
    "/api/stats",
    "/health",
    "/monitor"
  ],
  "filters": {
    "/api/odds": ["bookmaker"],
    "/api/v2/odds": ["bookmaker"]
  },
  "supported_bookmakers": [
    "betika",
    "superbet",
    "winner"
  ],
  "version": "1.0"
}

💻 Code Examples

Fetch All Odds (v2)

curl -X GET "https://alybet.io/api/v2/odds" \
  -H "Accept: application/json"
const res = await fetch('https://alybet.io/api/v2/odds');
const data = await res.json();

console.log(`Found ${data.matches_count} matches`);
data.matches.forEach(match => {
  console.log(`${match.home} vs ${match.away} (${match.sport})`);
  console.log(`  Odds: 1=${match.odds["1"]} X=${match.odds["X"]} 2=${match.odds["2"]}`);
});
import requests

response = requests.get('https://alybet.io/api/v2/odds')
data = response.json()

print(f"Found {data['matches_count']} matches")
for match in data['matches']:
    odds = match['odds']
    print(f"{match['home']} vs {match['away']} ({match['league']})")
    print(f"  1={odds['1']}  X={odds['X']}  2={odds['2']}")

Filter by Bookmaker

curl -X GET "https://alybet.io/api/v2/odds?bookmaker=winner" \
  -H "Accept: application/json"
const bookmaker = 'winner';
const res = await fetch(`https://alybet.io/api/v2/odds?bookmaker=${bookmaker}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(`${bookmaker}: ${data.matches_count} matches`);
import requests

params = {'bookmaker': 'winner'}
response = requests.get('https://alybet.io/api/v2/odds', params=params)

if response.status_code == 200:
    data = response.json()
    print(f"Winner odds: {data['matches_count']} matches")
else:
    print(f"Error: HTTP {response.status_code}")

⚡ Performance Tips

💬 Support & Updates

Need Help? For technical support, questions, or to report issues, please contact the AlyBet technical team.
API Updates Check /api/capabilities regularly for new endpoints and features. The version field indicates the current API version.