01Live score apps
A live score app that keeps pace with the match.
Open on a board of every match in play, let people tap into the one they follow, and keep both screens moving without burning through your quota. Four calls carry the whole app, from first paint to full time.
The play
Four calls. Final whistle: live app.
Each marker is a request. Each run carries its ids to the next.
read it left to right- 1
Paint the live board
One request returns every match in play across all 24 sports, or one sport's board with ?sport=. Each row already carries the score, status and running clock, so the list renders without a second call.
GETLive scores:/v2/livescoresAll plans - 2
Open the match
When someone taps a match, pull its incidents in order: goals with scorers, cards, substitutions, period markers and added-time boards. Lineups sit one sibling call away on the same fixture id.
GETEvents:/v2/fixtures/{id}/eventsAll plans - 3
Fill the stats tab
Possession, shots, passes and the rest, grouped by period and category. Coverage is graded per fixture: a top division gets every group, a lower tier may carry only the basics.
GETStatistics:/v2/fixtures/{id}/statisticsAll plans - 4
Stop polling
On Business, open one WebSocket and subscribe to livescores or sport:football. A match that kicks off arrives whole, then every score, status and clock change lands as a small delta. The SDK merges them and replays what you missed after a reconnect.
WSConnect:wss://api.datasportsapi.com/?ticket={ticket}Business
In code
First paint from REST, then deltas
Render once from the live board, then let the stream keep those same objects current. The SDK mints the single-use stream ticket, reconnects and replays for you.
- Install
npm install datasportsapi- Key
export DATASPORTSAPI_API_KEY=dsa_live_…
import { DataSportsAPI } from 'datasportsapi';
const client = new DataSportsAPI({ apiKey: process.env.DATASPORTSAPI_API_KEY });
// 1. First paint (every plan)
const { data: live } = await client.livescores.list({ sport: 'football' });
renderBoard(live);
// 2. The match someone opened
const { data: events } = await client.fixtures.events(live[0].id);
renderTimeline(events);
// 3. Push instead of polling (Business)
const stream = client.stream(['sport:football']);
stream.on('delta', () => renderBoard(stream.fixtures('sport:football')));Field notes
Worth knowing before launch.
A row drops off the board by itself once it has gone 45 minutes without a change and kicked off longer ago than a match in that sport can run.
On the stream, a match that kicks off arrives as a full fixture frame. Handle it, or new matches never appear.
Decide on error.code alone; treat the message text as human-readable only.
Which plan
Goes live on Business.
The WebSocket behind step four is a Business feature. Until you need push, poll the live board from your own server and serve it from cache: a refresh every 30 seconds is about 86,000 requests a month, comfortably inside Starter.
Free
01$0/ month
1,000 requests / day
Build and test the whole app. Live data is never limited by the history window.
Starter
02$49/ month
250,000 requests / month
Poll the board server-side every 30 seconds and serve every user from one cached copy.
Pro
03$199/ month
1,000,000 requests / month
Match screens on demand, plus play-by-play, shot maps and the win model for richer pages.
- Fits this play
Business
04$999/ month
10,000,000 requests / month
The WebSocket stream with replay: changes pushed as they happen, no polling budget to manage.
Other plays
All 5 side by side- 02ProMedia match centresSchedules, tables, match numbers and AI live text for every sport you cover.
- 03ProFantasy & gamesMatch ratings, season totals, form lines and leaderboards to score with.
- 04BusinessAI & data productsWhole-season exports, a live win model and ids that hold from season to season.
- 05ProWebsite widgetsA score list, a match card or a league table, from one script tag.
Your live board is one request away.
1,000 free requests a day during the beta. No card, no sales call.