API Documentation
Discover StreamCenter’s public sports catalog, find matches, resolve an advertised stream group, and render immutable local images. All documented endpoints are anonymous and support cross-origin reads.
Base URL: https://streamcenter.st
Quick start
- List sports or begin with a known sport ID.
- Retrieve matches and choose a match with at least one source.
- Use the returned
sourceandidto request the provider’s stream array. - Select the intended stream, then use badge or poster assets where your interface needs imagery.
Shell
curl --fail-with-body --silent --show-error \
"https://streamcenter.st/api/sports"JavaScript
const origin = "https://streamcenter.st";
async function loadFootballStreams() {
const matchesResponse = await fetch(`${origin}/api/matches/football`);
if (!matchesResponse.ok) {
throw new Error(`Matches request failed: ${matchesResponse.status}`);
}
const matches = await matchesResponse.json();
if (!Array.isArray(matches) || matches.length === 0) {
console.info("No football matches are currently public.");
return;
}
const match = matches[0];
const group = match.sources[0];
const streamResponse = await fetch(
`${origin}/api/stream/${encodeURIComponent(group.source)}/${encodeURIComponent(group.id)}`
);
if (!streamResponse.ok) {
throw new Error(`Stream request failed: ${streamResponse.status}`);
}
const streams = await streamResponse.json();
console.log(streams);
}
loadFootballStreams().catch((error) => {
console.error("StreamCenter request failed", error);
});Common responses
| Status | Meaning | Client action |
|---|---|---|
200 | Representation returned. | Read X-Request-ID and cache headers. |
204 | CORS policy returned. | No response body. |
304 | ETag still matches. | Reuse the cached representation. |
404 | Resource unavailable. | Check the returned catalog reference. |
405 | Method unsupported. | Use the Allow header. |
429 | Rate bucket exhausted. | Wait for Retry-After seconds. |
5xx | Correlated server failure. | Retry with a bound; retain X-Request-ID. |
API guidelines
- Catalog and stream responses are JSON. Image endpoints return WebP bytes.
- Match dates are Unix epoch milliseconds and can be passed directly to
new Date(match.date). - Sports and match catalogs support ETags and conditional requests. Stream resolution is always
no-store. - Stream resolution allows 60 requests per minute per client IP. Images allow 300 requests per minute.
- A
429response includesRetry-After. Respect it and use bounded retry behavior. - Every response includes
X-Request-ID. Error envelopes repeat that value aserror.requestIdfor support and log correlation.
Available endpoints
| Resource | Endpoint | Purpose |
|---|---|---|
| Matches | /api/matches/{selector} | Browse the canonical public match catalog. |
| Streams | /api/stream/{source}/{matchId} | Resolve a provider group advertised by a match. |
| Sports | /api/sports | Discover valid sport selectors. |
| Images | /api/images/badge/{assetId}.webp | Use immutable local badges and posters. |
Prefer a machine-readable contract? Read the OpenAPI 3.1 document.