List Game Events
curl --request GET \
--url https://api.uplift.ai/v1/games/{game_id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.uplift.ai/v1/games/{game_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.uplift.ai/v1/games/{game_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uplift.ai/v1/games/{game_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.uplift.ai/v1/games/{game_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uplift.ai/v1/games/{game_id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplift.ai/v1/games/{game_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"game_id": "6b1e0c2a-7d8f-4a51-9b0e-2f3c1d4e5a6b",
"run_id": "f2a91c3e-0b47-4d6a-8e15-7c9d2b3a4e5f",
"event_count": 3412,
"events": [
{
"event_id": "pass-01842-p07",
"event_type": "pass",
"event_subtype": "ground",
"period": 1,
"time_start_s": 61.4,
"time_end_s": 62.37,
"frame_start": 1842,
"frame_end": 1871,
"player_id": "p07",
"team_id": "t-0451",
"team_side": "home",
"attacking_side": "left_to_right",
"x_start": -12.3,
"y_start": 8.1,
"x_end": 9.6,
"y_end": -4.2,
"phase": "create",
"team_possession_id": "tpos-0088",
"player_possession_id": "pos-0213",
"confidence": 0.82,
"confidence_tier": "high",
"layer": "ball",
"players": [
{
"player_id": "p07",
"role": "actor"
},
{
"player_id": "p10",
"role": "receiver"
}
],
"attributes": {
"receiver_player_id": "p10",
"outcome": "complete",
"progressive": true,
"cross": false,
"length_m": 25.4,
"pass_range": "medium",
"progression_m": 21.9,
"into_box": false,
"ball_speed_kmh": 48.2,
"bypassed_opponents": 3,
"bypassed_defenders": 1
}
}
]
}{
"error": "BadRequest",
"message": "The request parameters are invalid. Please review the request and try again."
}{
"error": "Unauthorized",
"message": "Bearer token is missing or invalid."
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource."
}{
"error": "NotFound",
"message": "The specified game_id was not found."
}{
"error": "TooManyRequests",
"message": "The rate limit has been exceeded. Please wait and try again later."
}{
"error": "InternalServerError",
"message": "An unexpected error occurred on the server. Please try again later."
}Match Data
List Game Events
Returns every event in the game in one response, typically 3,000 to 4,000 for a full match. Optional filters narrow the result.
GET
/
games
/
{game_id}
/
events
List Game Events
curl --request GET \
--url https://api.uplift.ai/v1/games/{game_id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.uplift.ai/v1/games/{game_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.uplift.ai/v1/games/{game_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uplift.ai/v1/games/{game_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.uplift.ai/v1/games/{game_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uplift.ai/v1/games/{game_id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplift.ai/v1/games/{game_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"game_id": "6b1e0c2a-7d8f-4a51-9b0e-2f3c1d4e5a6b",
"run_id": "f2a91c3e-0b47-4d6a-8e15-7c9d2b3a4e5f",
"event_count": 3412,
"events": [
{
"event_id": "pass-01842-p07",
"event_type": "pass",
"event_subtype": "ground",
"period": 1,
"time_start_s": 61.4,
"time_end_s": 62.37,
"frame_start": 1842,
"frame_end": 1871,
"player_id": "p07",
"team_id": "t-0451",
"team_side": "home",
"attacking_side": "left_to_right",
"x_start": -12.3,
"y_start": 8.1,
"x_end": 9.6,
"y_end": -4.2,
"phase": "create",
"team_possession_id": "tpos-0088",
"player_possession_id": "pos-0213",
"confidence": 0.82,
"confidence_tier": "high",
"layer": "ball",
"players": [
{
"player_id": "p07",
"role": "actor"
},
{
"player_id": "p10",
"role": "receiver"
}
],
"attributes": {
"receiver_player_id": "p10",
"outcome": "complete",
"progressive": true,
"cross": false,
"length_m": 25.4,
"pass_range": "medium",
"progression_m": 21.9,
"into_box": false,
"ball_speed_kmh": 48.2,
"bypassed_opponents": 3,
"bypassed_defenders": 1
}
}
]
}{
"error": "BadRequest",
"message": "The request parameters are invalid. Please review the request and try again."
}{
"error": "Unauthorized",
"message": "Bearer token is missing or invalid."
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource."
}{
"error": "NotFound",
"message": "The specified game_id was not found."
}{
"error": "TooManyRequests",
"message": "The rate limit has been exceeded. Please wait and try again later."
}{
"error": "InternalServerError",
"message": "An unexpected error occurred on the server. Please try again later."
}The Game Data API is in preview. Endpoints, fields and limits may change before release, and it is not yet available to call.
attributes are listed in the event catalogue.