Sports Data API Platform

Access real-time football statistics, betting odds, and match data through our unified API platform.

API Services

FotMob API Checking...
http://localhost:8000

Football statistics, league standings, fixtures, player data, and match information from FotMob.

Hard Rock Bet API Checking...
http://localhost:8002

Real-time betting odds, markets, and live match data from Hard Rock Sportsbook.

Kalshi API Checking...
https://api.elections.kalshi.com

Prediction markets, event contracts, and real-time pricing from Kalshi exchange.

Quick Stats

Total Endpoints
20+
Data Sources
3
Real-time Updates
WebSocket

API Explorer

FotMob API
GET /health
GET /api/v1/countries
GET /api/v1/countries/{name}
GET /popular/leagues
GET /api/v1/leagues/all
GET /api/v1/leagues/{id}
GET /leagues/{id}/standings
GET /leagues/{id}/fixtures
Hard Rock Bet API
GET /health
GET /sports
GET /competitions
GET /competitions/{id}/events
WS /ws/events
Kalshi API
GET /events
GET /events/{ticker}
GET /markets
GET /markets/{ticker}
GET /markets/{ticker}/orderbook
GET /series/{ticker}
Select an endpoint

Select an endpoint from the list to configure and send a request.

Overview

Datarium provides a unified API platform for accessing sports data from multiple sources. Our APIs offer real-time football statistics, betting odds, and match information.

Base URLs

FotMob API:     /api/fotmob
Hard Rock API: /api/hardrock
Kalshi API:    /api/kalshi

Response Format

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

{
  "success": true,
  "data": { ... },
  "metadata": {
    "cache_hit": true,
    "cache_age_seconds": 120
  }
}

Authentication

FotMob API

FotMob API requires an API key passed in the header:

X-API-Key: your_api_key_here

Hard Rock Bet API

Hard Rock Bet API does not require authentication for read operations.

Rate Limits

Rate limits are enforced per API key:

Tier Requests/Minute Burst
Free 60 10
Premium 300 20
Partner 1000 50

FotMob: Countries

GET /api/v1/countries

Get all countries with their leagues. Recommended starting point for discovery.

Response

{
  "success": true,
  "data": {
    "popular_leagues": [
      { "id": 47, "name": "Premier League", "country": "England" }
    ],
    "countries": [
      { "name": "England", "leagues": [...] }
    ]
  }
}
GET /api/v1/countries/{country_name}

Get all leagues for a specific country.

Parameters

NameTypeDescription
country_namerequired string Country name (e.g., "England", "Spain")
GET /api/v1/countries/popular/leagues

Get top 20 popular leagues worldwide.

GET /api/v1/countries/search

Search for countries by name.

Query Parameters

NameTypeDescription
qrequired string Search query

FotMob: Leagues

GET /api/v1/leagues/all

Get all available leagues.

Cache: 7 days

GET /api/v1/leagues/{league_id}

Get detailed league information.

Parameters

NameTypeDescription
league_idrequired integer League ID (e.g., 47 for Premier League)
taboptional string Tab to fetch: overview, table, matches, stats, transfers

Common League IDs

LeagueID
Premier League47
La Liga87
Serie A55
Bundesliga54
Ligue 153
Champions League42
GET /api/v1/leagues/{league_id}/standings

Get league standings/table.

Cache: 30 minutes

Response

{
  "data": {
    "tables": [{
      "table": [{
        "name": "Arsenal",
        "played": 38,
        "wins": 28,
        "points": 91
      }]
    }]
  }
}
GET /api/v1/leagues/{league_id}/fixtures

Get league fixtures/schedule.

Cache: 1 hour

FotMob: Matches

GET /api/v1/matches/{match_id}

Get complete match details including lineups, statistics, and events.

Parameters

NameTypeDescription
match_idrequired integer Match ID

Hard Rock Bet: Sports

GET /sports

Get all available sports (filtered to soccer).

Response

{
  "sports": [{
    "id": "28",
    "code": "SOCCER",
    "name": "Soccer",
    "numEvents": 1209,
    "numEventsInplay": 38
  }]
}

Hard Rock Bet: Competitions

GET /competitions

Get all competitions for a sport.

Query Parameters

NameTypeDescription
sportoptional string Sport code (default: "SOCCER")

Response

{
  "sport": "SOCCER",
  "competitions": [{
    "id": "8214517063054262534",
    "name": "EPL",
    "numEvents": 21,
    "categoryName": "England",
    "playerPropsAvailable": true
  }]
}

Hard Rock Bet: Events

GET /competitions/{competition_id}/events

Get all events (matches) for a specific competition.

Parameters

NameTypeDescription
competition_idrequired string Competition ID from /competitions endpoint
include_outrightsoptional boolean Include outright markets (default: false)

Response

{
  "events": [{
    "id": "2438727459822895355",
    "name": "Arsenal vs Chelsea",
    "eventTime": 1760796000000,
    "inplay": false,
    "numMarkets": 56
  }]
}

Hard Rock Bet: WebSocket

WS /ws/events?event_ids={id1,id2,id3}

Subscribe to real-time event data including odds, markets, and live match state.

Query Parameters

NameTypeDescription
event_idsrequired string Comma-separated list of event IDs

Python Example

import asyncio
import websockets
import json

async def subscribe():
    event_ids = "2438727459822895355"
    uri = f"ws://datarium.top:8002/ws/events?event_ids={event_ids}"

    async with websockets.connect(uri) as ws:
        while True:
            message = await ws.recv()
            data = json.loads(message)
            print(data)

asyncio.run(subscribe())

WebSocket Message Format

{
  "SubscriptionUpdate": {
    "EventId": "2438727459822895355",
    "EventUpdates": [{
      "name": "Arsenal vs Chelsea",
      "markets": [{
        "type": "SOCCER:FT:AXB",
        "name": "Match Result (FT)",
        "selections": [{
          "name": "Arsenal",
          "odds": 2.50
        }]
      }],
      "simpleMatchState": {
        "homeGoals": 0,
        "awayGoals": 0,
        "period": "NOT_STARTED"
      }
    }]
  }
}

Market Types

TypeDescription
SOCCER:FT:AXBMatch Result (Full Time)
SOCCER:FT:OUOver/Under Goals
SOCCER:FT:BTSBoth Teams To Score
SOCCER:FT:DCDouble Chance
SOCCER:FT:CSCorrect Score
SOCCER:FT:HT_AXBHalf Time Result

Kalshi: Events

Kalshi is a regulated prediction market exchange. Events group related markets together (e.g., "2024 Presidential Election").

GET /events

Get all events with optional filtering. Returns events with their nested markets.

Query Parameters

NameTypeDescription
limitoptional integer Max results (default: 100, max: 1000)
statusoptional string Filter by status: open, closed, settled
series_tickeroptional string Filter by series ticker
with_nested_marketsoptional boolean Include markets in response

Response

{
  "events": [{
    "event_ticker": "PRES-2024",
    "title": "2024 Presidential Election",
    "category": "Politics",
    "markets": [...]
  }],
  "cursor": "abc123"
}
GET /events/{event_ticker}

Get a specific event by ticker.

Parameters

NameTypeDescription
event_tickerrequired string Event ticker (e.g., "PRES-2024")

Kalshi: Markets

Markets are individual binary contracts within an event. Each market has Yes/No outcomes with prices in cents (0-100).

GET /markets

Get all markets with optional filtering.

Query Parameters

NameTypeDescription
limitoptional integer Max results (default: 100)
event_tickeroptional string Filter by event
statusoptional string open, closed, settled

Response

{
  "markets": [{
    "ticker": "PRES-2024-DEM",
    "title": "Democratic candidate wins?",
    "yes_bid": 52,
    "yes_ask": 54,
    "no_bid": 46,
    "no_ask": 48,
    "last_price": 53,
    "volume": 125000,
    "open_interest": 50000
  }]
}

Price Interpretation

Prices are in cents. A yes_bid of 52 means you can sell Yes at $0.52 per contract. The implied probability is approximately 52%.

GET /markets/{ticker}

Get a specific market by ticker.

Parameters

NameTypeDescription
tickerrequired string Market ticker

Kalshi: Orderbook

GET /markets/{ticker}/orderbook

Get the full orderbook for a market showing all resting orders at each price level.

Parameters

NameTypeDescription
tickerrequired string Market ticker
depthoptional integer Number of price levels

Response

{
  "orderbook": {
    "yes": [
      [52, 1500],  // [price, quantity]
      [51, 3200]
    ],
    "no": [
      [48, 2100],
      [47, 1800]
    ]
  }
}

Kalshi: Series

Series group related events together (e.g., all Presidential elections).

GET /series/{series_ticker}

Get details about a series including all its events.

Parameters

NameTypeDescription
series_tickerrequired string Series ticker (e.g., "KXPRES")

Popular Series

SeriesDescription
KXPRESPresidential Elections
KXFEDFederal Reserve Decisions
KXINFLATIONInflation Data
KXECONEconomic Indicators