AltSportsData
API ReferenceData API (Sports Data)Matches

Match Details

Get detailed information about a specific match

Match Details

Get detailed information about a specific match

Endpoint

GET /api/v1/data/matches/{matchId}

Authentication

Required. Use x-api-key header.

Path Parameters

ParameterTypeRequiredDescription
matchIdstringYesMatch identifier

Query Parameters

ParameterTypeRequiredDescription
show_statsbooleanNoInclude season stats for teams/players (default: false)

Example Request

curl -X GET "https://api.altsportsdata.com/api/v1/data/matches/match-001?show_stats=true" \
  -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?show_stats=true',
    headers=headers
)

data = response.json()
print(data)
const response = await fetch('https://api.altsportsdata.com/api/v1/data/matches/match-001?show_stats=true', {
  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?show_stats=true', {
  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?show_stats=true')

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?show_stats=true"
    
    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?show_stats=true");
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?show_stats=true";
        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": {
    "id": "match-001",
    "competitionId": "comp-001",
    "round": 1,
    "teamA": {"name": "Team 1", "score": 8, "players": [...]},
    "teamB": {"name": "Team 2", "score": 5, "players": [...]},
    "status": "completed",
    "endScores": [1, 1, 2, 1, 1, 0, 1, 1],
    "duration": "45:23"
  }
}

Response Fields

FieldTypeDescription
idstringMatch identifier
competitionIdstringParent competition ID
roundintegerRound number
teamAobjectTeam A details
teamBobjectTeam B details
statusstringMatch status
endScoresarrayEnd-by-end scores
durationstringMatch duration

Authentication: Requires both x-api-key header AND Bearer token

On this page