🎾 Live Score Scraper β€” Help & Data Reference

This guide explains the API, fields, and includes an in-browser explorer.

β¬… Back to Dashboard

πŸ›  API Reference

Examples:

curl -s http://localhost:5000/api/v1/scores | jq '.match_count, .last_updated'
curl -s http://localhost:5000/api/v1/scores/court/3 | jq '.matches[] | {matchid, court, matchstatus}'
curl -s http://localhost:5000/api/v1/match/12345 | jq
curl -X POST http://localhost:5000/api/v1/tourid/7140 | jq

Notes: all endpoints return JSON; errors include an error field; timestamps are Unix seconds in the match objects and a formatted string in last_updated.

⚑ API Explorer (in-browser)

Run a request against this server directly from your browser.

Response will appear here…

πŸ“‘ API Output Fields

Top-level (GET /api/v1/scores)

Match object (common fields)

Set fields

Single-match endpoint

Tournament switch

🎬 Selecting a Match for Scoreboard/Bug

Overlays pick a match in this order:

Examples:

Scoreboard: /caspar/scoreboard/?matchid=12345
Bug:        /caspar/bug/?matchid=12345

# Quick links from dashboard cards:
# - Bug button: adds matchid automatically
# - Scoreboard button: adds matchid automatically

Tip: Use the dashboard card buttons (β€œBug” or β€œScoreboard”) to open the overlay with matchid pre-filled.

πŸŽ› vMix Serve Script Guide

The vMix script in this repo (file: vmix/scripting) automatically toggles serve indicators in your scoreboard title based on live API data.

What you need in vMix first

How to install and run in vMix

  1. Open vMix and go to Settings β†’ Scripting.
  2. Create a new script and paste the contents of vmix/scripting.
  3. Set SCOREBOARD to your title input name if different from default.
  4. Set API_BASE_URL to your server, for example https://scores.nkpa.co.uk/api/v1/match or your local endpoint.
  5. Save and click Start for the script.
  6. Update MATCHID.Text on the scoreboard input to the match you want to track.

What the script is doing

Troubleshooting

Quick copy: vMix script

Use this when you need to paste directly into Settings -> Scripting in vMix.

🧾 Example Match JSON

{
  "matchid": "56789",
  "matchname": "Centre Court QF",
  "court": "1",
  "matchstatus": "IN PROGRESS",
  "timestamp": 1712505600,
  "is_plan": 0,
  "schedtime": "2025-12-13 14:00",
  "winner": null,
  "winner_name": null,
  "player1": "Alex Morton",
  "player2": "Diego Alvarez",
  "player1_country": "GBR",
  "player2_country": "ESP",
  "player1_surname": "Morton",
  "player2_surname": "Alvarez",
  "sets_played_count": 2,
  "game1": "30",
  "game2": "15",
  "player2serve": "2",
  "set1_p1": 6,
  "set1_p2": 4,
  "set2_p1": 3,
  "set2_p2": 6,
  "set2_tb": "0",
  "set3_p1": null,
  "set3_p2": null,
  "tournid": "7140",
  "eventid": "E123",
  "extmid": "EXT-56789",
  "cam": null,
  "cameraurl": null,
  "camerarooturl": null,
  "stats_general": 1,
  "stats_match": 1
}