Get a player by ID
curl --request GET \
--url https://therundown.io/api/v2/players/{playerID} \
--header 'X-TheRundown-Key: <api-key>'import requests
url = "https://therundown.io/api/v2/players/{playerID}"
headers = {"X-TheRundown-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-TheRundown-Key': '<api-key>'}};
fetch('https://therundown.io/api/v2/players/{playerID}', 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://therundown.io/api/v2/players/{playerID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-TheRundown-Key: <api-key>"
],
]);
$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://therundown.io/api/v2/players/{playerID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-TheRundown-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://therundown.io/api/v2/players/{playerID}")
.header("X-TheRundown-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://therundown.io/api/v2/players/{playerID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-TheRundown-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"players": [
{
"id": 16627,
"sport_id": 4,
"team_id": 11,
"first_name": "Trae",
"last_name": "Young",
"display_name": "Trae Young",
"weight": 164,
"height": 73,
"display_weight": "164 lbs",
"display_height": "6' 1\"",
"age": 27,
"date_of_birth": "1998-09-19T07:00Z",
"slug": "trae-young",
"jersey": "11",
"position": "Guard",
"position_abbreviation": "G",
"birth_place_city": "Lubbock",
"birth_place_country": "USA",
"experience_years": 7,
"active": true,
"status": "Active"
}
]
}V2 Players
Get a player by ID
GET
/
api
/
v2
/
players
/
{playerID}
Get a player by ID
curl --request GET \
--url https://therundown.io/api/v2/players/{playerID} \
--header 'X-TheRundown-Key: <api-key>'import requests
url = "https://therundown.io/api/v2/players/{playerID}"
headers = {"X-TheRundown-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-TheRundown-Key': '<api-key>'}};
fetch('https://therundown.io/api/v2/players/{playerID}', 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://therundown.io/api/v2/players/{playerID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-TheRundown-Key: <api-key>"
],
]);
$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://therundown.io/api/v2/players/{playerID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-TheRundown-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://therundown.io/api/v2/players/{playerID}")
.header("X-TheRundown-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://therundown.io/api/v2/players/{playerID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-TheRundown-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"players": [
{
"id": 16627,
"sport_id": 4,
"team_id": 11,
"first_name": "Trae",
"last_name": "Young",
"display_name": "Trae Young",
"weight": 164,
"height": 73,
"display_weight": "164 lbs",
"display_height": "6' 1\"",
"age": 27,
"date_of_birth": "1998-09-19T07:00Z",
"slug": "trae-young",
"jersey": "11",
"position": "Guard",
"position_abbreviation": "G",
"birth_place_city": "Lubbock",
"birth_place_country": "USA",
"experience_years": 7,
"active": true,
"status": "Active"
}
]
}