DocumentationGuides
Volleyball live scores API guide
Live scores
Every match being played this minute, indoor and beach, with the running score of each set. Polled every 12 to 15 seconds while anything is live; each answer says how far behind it is.
What it covers
Every indoor and beach match being played anywhere we follow: the set in play, every set score so far and the match score. While anything is live the scores are read every 12 to 15 seconds, and every answer carries meta.seconds_behind, so you always know how fresh a score is. Live scores are on the Live and Complete plans.
The endpoints
| Endpoint | What it returns |
|---|---|
| GET /v1/matches/live | Every match being played now, with the running set scores |
| GET /v1/matches/{id} | One match: teams, result, every set, duration, venue, spectators and referees |
| GET /v1/matches/{id}/points | Every rally of every set: the score after it, who won it and who served |
How the records link
A live match has the same id it had when it was scheduled and keeps it once finished, so a live widget can link straight to the full match and, as the sets go by, to every rally.
A live scores widget
Ask for everything live, every 15 seconds. Filter by discipline or gender to keep the list short. An empty list is a 200 with meta.count 0, not an error.
# A live scores widget curl "https://api.volleyballapi.com/v1/matches/live?discipline=indoor" \ -H "Authorization: Bearer $VBA_KEY"
$q = http_build_query(['discipline' => 'indoor']); $ch = curl_init('https://api.volleyballapi.com/v1/matches/live?' . $q); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('VBA_KEY')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true); print_r($res['data']);
import os, requests r = requests.get( "https://api.volleyballapi.com/v1/matches/live", params={"discipline": "indoor"}, headers={"Authorization": f"Bearer {os.environ['VBA_KEY']}"}, ) print(r.json()["data"])
const res = await fetch("https://api.volleyballapi.com/v1/matches/live?discipline=indoor", { headers: { "X-API-Key": process.env.VBA_KEY }, }); const { data, meta } = await res.json();
Follow one match
Ask for the match by its id; while it is live, current_set says which set is being played.
# Follow one match curl "https://api.volleyballapi.com/v1/matches/mt_pcbe3hvw" \ -H "Authorization: Bearer $VBA_KEY"
$ch = curl_init('https://api.volleyballapi.com/v1/matches/mt_pcbe3hvw'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('VBA_KEY')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true); print_r($res['data']);
import os, requests r = requests.get( "https://api.volleyballapi.com/v1/matches/mt_pcbe3hvw", headers={"Authorization": f"Bearer {os.environ['VBA_KEY']}"}, ) print(r.json()["data"])
const res = await fetch("https://api.volleyballapi.com/v1/matches/mt_pcbe3hvw", { headers: { "X-API-Key": process.env.VBA_KEY }, }); const { data, meta } = await res.json();
Stuck on something?
Ask support