API Documentation

REST & WebSocket reference

Authenticate with your API key and start pulling data. Every endpoint, parameter and response documented.

Authentication

All requests require an API key sent in the X-API-Key header. Keep your key secret and rotate it from the dashboard.

Base URLhttps://api.sportfast.io
curl -X GET "https://api.sportfast.io/v1/livescore?lang=en" \
  -H "X-API-Key: YOUR_API_KEY"

Endpoints

GET/v1/livescoreLive ScoresTry in Playground
GET/v1/fixturesFixturesTry in Playground
GET/v1/leaguesLeaguesTry in Playground
GET/v1/standingsStandingsTry in Playground
GET/v1/h2hHead-to-HeadTry in Playground
GET/v1/oddsOddsTry in Playground
GET/v1/lineupsLineupsTry in Playground
GET/v1/teamsTeamsTry in Playground
GET/v1/playersPlayersTry in Playground

Parameters

ParameterTypeRequiredDescription
langstringResponse language: en or zh. Default en.
league_idintegerFilter by league ID.
datestringFilter by date (YYYY-MM-DD).
pageintegerPage number for pagination.

WebSocket

Persistent WebSocket connections deliver data in milliseconds — no polling, no lag. Goals, substitutions and cards sync in real time.

import WebSocket from "ws";

const ws = new WebSocket("wss://stream.sportfast.io/v1/live", {
  headers: { "X-API-Key": "YOUR_API_KEY" },
});

ws.on("message", (msg) => {
  const event = JSON.parse(msg);
  console.log(event.type, event.data);
});

Error Codes

401Invalid or missing API key
403Plan quota exceeded
429Rate limit exceeded
404Resource not found
500Internal server error
Heads up

You're on the trial version, which provides static test data only — real-time data is not included. To unlock real-time data, contact our support team anytime to get it activated and enjoy dedicated one-on-one after-sales support. We'll respond right away!

Contact Support Now