Heat Scores
Get heat scores and lap times for an event heat
Heat Scores
Get heat scores and lap times for an event heat
Endpoint
GET /api/v1/public/events/{eventId}/heats/{heatId}Authentication
Required. Use X-API-KEY header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
eventId | string | Yes | Unique event identifier |
heatId | string | Yes | Heat/session identifier |
Example Request
curl -X GET "https://api.altsportsdata.com/api/v1/public/events/f1-bahrain-gp-2026/heats/race" \
-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/public/events/f1-bahrain-gp-2026/heats/race',
headers=headers
)
data = response.json()
print(data)const response = await fetch('https://api.altsportsdata.com/api/v1/public/events/f1-bahrain-gp-2026/heats/race', {
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/public/events/f1-bahrain-gp-2026/heats/race', {
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/public/events/f1-bahrain-gp-2026/heats/race')
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/public/events/f1-bahrain-gp-2026/heats/race"
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/public/events/f1-bahrain-gp-2026/heats/race");
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/public/events/f1-bahrain-gp-2026/heats/race";
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": {
"heatId": "race",
"name": "Race",
"results": [
{"position": 1, "participant": "Max Verstappen", "lapTime": "1:32.478", "gap": "0.000s"},
{"position": 2, "participant": "Lewis Hamilton", "lapTime": "1:32.912", "gap": "+5.234s"}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
heatId | string | Heat identifier |
name | string | Heat name |
results | array | Heat results with positions and times |