Match Events
Get real-time events for a match
Match Events
Get real-time events for a match
Endpoint
GET /api/v1/data/matches/{matchId}/eventsAuthentication
Required. Use x-api-key header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
matchId | string | Yes | Match identifier |
Example Request
curl -X GET "https://api.altsportsdata.com/api/v1/data/matches/match-001/events" \
-H "x-api-key: YOUR_API_KEY"import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
response = requests.get(
'https://api.altsportsdata.com/api/v1/data/matches/match-001/events',
headers=headers
)
data = response.json()
print(data)const response = await fetch('https://api.altsportsdata.com/api/v1/data/matches/match-001/events', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);const response = await fetch('https://api.altsportsdata.com/api/v1/data/matches/match-001/events', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const data: any = await response.json();
console.log(data);require 'net/http'
require 'json'
uri = URI('https://api.altsportsdata.com/api/v1/data/matches/match-001/events')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['x-api-key'] = 'YOUR_API_KEY'
response = http.request(request)
data = JSON.parse(response.body)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.altsportsdata.com/api/v1/data/matches/match-001/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}using System;
using System.Net.Http;
using System.Threading.Tasks;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetAsync("https://api.altsportsdata.com/api/v1/data/matches/match-001/events");
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class ApiRequest {
public static void main(String[] args) throws Exception {
String urlString = "https://api.altsportsdata.com/api/v1/data/matches/match-001/events";
URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("x-api-key", "YOUR_API_KEY");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String line;
StringBuilder response = new StringBuilder();
while ((line = in.readLine()) != null) {
response.append(line);
}
in.close();
System.out.println(response.toString());
}
}Example Response
{
"data": [
{"timestamp": "2026-01-15T10:00:00Z", "type": "match_started", "details": {}},
{"timestamp": "2026-01-15T10:05:32Z", "type": "end_completed", "details": {"end": 1, "teamAScore": 1, "teamBScore": 1}},
{"timestamp": "2026-01-15T10:11:45Z", "type": "throw_recorded", "details": {"team": "A", "player": "Player 1", "accuracy": 0.95}}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
timestamp | string | Event timestamp (ISO 8601) |
type | string | Event type |
details | object | Event-specific details |