Docs Introduction
Official API v2 Stable

Access 1xBet Data
via API

Get real-time odds, live scores, match results, league data, and in-play events through a single, well-documented RESTful API. Built for developers, by developers.

99.9%
Uptime
<50ms
Latency
150+
Sports
50K+
Daily Matches

What You Get

Live Odds

Real-time pre-match and in-play odds across all sports with sub-second updates.

Live Scores

Track live scores, match timelines, and game events as they happen in real time.

Markets & Periods

Access all betting markets, periods, and outcomes for any match or league.

Leagues & Sports

Browse 150+ sports and thousands of leagues with full hierarchy and metadata.

Match Results

Historical and current match results with detailed event breakdowns per league.

In-Play Events

Get live game events like goals, cards, substitutions — perfect for live dashboards.

Quick Start

Make your first API request in under a minute. Here's an example fetching live odds:

api-request.js
const response = await fetch('https://api.xbetapi.com/v2/odds', {
  method: 'GET',
  headers: {
    'X-API-Key': 'your_api_key_here',
    'Sport': 'football'
  }
});

const data = await response.json();
console.log(data);
Copied to clipboard

Base URL

Production
https://api.xbetapi.com/v2

Authentication

All requests require an API key passed via the X-API-Key header.

Read full authentication guide

Response Format

All API responses are returned in JSON format with consistent structure:

Response Example
{
  "success": true,
  "data": {
    "sport_id": 1,
    "sport_name": "Football",
    "leagues": [
      {
        "id": 1234,
        "name": "Premier League",
        "country": "England",
        "matches_count": 380
      }
    ]
  },
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total": 250
  }
}

Error Codes

Code
Type
Description
200
Success
Request was successful
401
Unauthorized
Missing or invalid API key
403
Forbidden
Your plan does not have access to this endpoint
404
Not Found
The requested resource does not exist
429
Rate Limited
Too many requests — slow down and retry
500
Server Error
Something went wrong on our end — please retry

Ready to get started?

Sign up for a free trial and get 1,000 requests per day — no credit card required.