Skip to main content

GET /api/sports

Returns all sports that have bookmaker odds scraped within the last 10 minutes. Use this endpoint at startup to discover which competition codes are active — then use those codes to filter /api/events and /api/odds.

Query Parameters

None.

Response

{
  "data": [
    {
      "name": "Football",
      "competition_codes": ["EPL", "LIG1", "BUND", "SERA", "LIGA", "UCL", "UEL", "EFL", "ERED", "MLS", "LIG2", "GER2", "LIGA2", "BRAS", "ARG"],
      "event_count": 1616
    },
    {
      "name": "Basketball",
      "competition_codes": ["NBA", "EURO"],
      "event_count": 36
    },
    {
      "name": "Tennis",
      "competition_codes": ["TENNIS"],
      "event_count": 88
    },
    {
      "name": "Hockey",
      "competition_codes": ["NHL", "AHL", "KHL", "SHL", "DEL", "SMLIT", "LIIGA"],
      "event_count": 43
    },
    {
      "name": "Baseball",
      "competition_codes": ["MLB"],
      "event_count": 40
    },
    {
      "name": "AmericanFootball",
      "competition_codes": ["NFL"],
      "event_count": 9
    },
    {
      "name": "Rugby",
      "competition_codes": ["RUGBY"],
      "event_count": 37
    }
  ],
  "meta": {
    "rate_limit_remaining": 299
  }
}

Response Fields

FieldTypeDescription
namestringSport name — use this value as the sport filter parameter on other endpoints
competition_codesstring[]All competition codes active for this sport in the last 10 minutes
event_countintegerTotal distinct events with active odds across all codes for this sport

Notes

  • competition_codes is ordered alphabetically.
  • Codes not recognized by the mapping table fall into a catch-all Other sport. This happens for raw bookmaker-specific codes from Vbet/DaznBet (French-language names). They are valid odds rows but their sport couldn’t be resolved.
  • Cache TTL: 60 seconds.

Code Examples

curl "https://api.oddsstream.io/api/sports" \
  -H "X-Api-Key: os_live_YOUR_KEY"
import requests

resp = requests.get(
    "https://api.oddsstream.io/api/sports",
    headers={"X-Api-Key": "os_live_YOUR_KEY"}
)
for sport in resp.json()["data"]:
    print(f"{sport['name']}: {sport['event_count']} events, codes={sport['competition_codes'][:3]}")
const resp = await fetch("https://api.oddsstream.io/api/sports", {
  headers: { "X-Api-Key": "os_live_YOUR_KEY" }
});
const { data: sports } = await resp.json();
// Find EPL competition code
const football = sports.find(s => s.name === "Football");
console.log(football.competition_codes); // ["EPL", "LIG1", ...]