Developer resources

StreamCenter API

Sports API

Discover enabled sports in the operator’s configured order. A sport’s id is the slug accepted by the Matches API.

Base URL: https://streamcenter.st

Sport structure

TypeScript
interface APISport {
  id: string;
  name: string;
}
Public sport fields
FieldTypeDescription
idstringSport slug used as a Matches selector.
namestringHuman-readable sport name.

Endpoint

GET /api/sports

Returns one bounded array. Responses support ETag validation, HEAD, and cross-origin GET requests.

Build a sport selector

Shell
curl --fail-with-body --silent --show-error \
  "https://streamcenter.st/api/sports"
HTML
<label for="sport">Sport</label>
<select id="sport"></select>
JavaScript
const sportsResponse = await fetch("https://streamcenter.st/api/sports");
if (!sportsResponse.ok) throw new Error("Could not load sports");
const sports = await sportsResponse.json();

const select = document.querySelector("#sport");
for (const sport of sports) {
  const option = document.createElement("option");
  option.value = sport.id;
  option.textContent = sport.name;
  select.append(option);
}

select.addEventListener("change", async () => {
  const id = encodeURIComponent(select.value);
  const response = await fetch(`https://streamcenter.st/api/matches/${id}`);
  if (!response.ok) throw new Error("Could not load sport matches");
  console.log(await response.json());
});

Example response

JSON
[
  {
    "id": "football",
    "name": "Football"
  }
]

Common uses include site navigation, match filtering, grouped schedule views, and API capability discovery.

Use the selected ID with the Matches API.