curl --request GET \
--url https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}', 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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}",
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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}"
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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}")
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{
"data": {
"id": "<string>",
"canonical_id": "<string>",
"external_ids": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"season": 123,
"season_label": "<string>",
"week": 123,
"game_type": "<string>",
"status": "<string>",
"status_text": "<string>",
"schedule_date": "<string>",
"scheduled_start_utc": "<string>",
"home_team_id": "<string>",
"away_team_id": "<string>",
"venue_id": "<string>",
"neutral_site": true,
"game_code": "<string>",
"regulation_periods": 123,
"linescore": {
"home_score": 123,
"away_score": 123,
"period": 123,
"game_clock": "<string>",
"periods": [
{
"period": 123,
"home_score": 123,
"away_score": 123
}
]
},
"weather": {
"condition": "<string>",
"temperature_f": 123,
"wind_mph": 123,
"wind_direction": "<string>",
"observed_at": "<string>"
},
"attendance": 123,
"postseason_round": "<string>",
"is_division_game": true,
"is_conference_game": true
},
"_meta": {
"request_id": "<string>",
"served_from": "live",
"cache_ttl_seconds": 123,
"provenance": {},
"availability": {}
}
}Game by external ID
Resolves one canonical game through a source-owned external_ids
key/value pair. Exposed for baseball (mlb, kbo, npb),
football (nfl), and hockey (nhl). Basketball and soccer return
404 endpoint_not_for_sport (soccer has its own
/matches/by-external-id path).
Requires the odds entitlement (a paid plan). See Responses & Errors for the success envelope and availability rules.
curl --request GET \
--url https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}', 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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}",
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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}"
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.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportquanta.com/v1/{league}/games/by-external-id/{source}/{externalId}")
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{
"data": {
"id": "<string>",
"canonical_id": "<string>",
"external_ids": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"season": 123,
"season_label": "<string>",
"week": 123,
"game_type": "<string>",
"status": "<string>",
"status_text": "<string>",
"schedule_date": "<string>",
"scheduled_start_utc": "<string>",
"home_team_id": "<string>",
"away_team_id": "<string>",
"venue_id": "<string>",
"neutral_site": true,
"game_code": "<string>",
"regulation_periods": 123,
"linescore": {
"home_score": 123,
"away_score": 123,
"period": 123,
"game_clock": "<string>",
"periods": [
{
"period": 123,
"home_score": 123,
"away_score": 123
}
]
},
"weather": {
"condition": "<string>",
"temperature_f": 123,
"wind_mph": 123,
"wind_direction": "<string>",
"observed_at": "<string>"
},
"attendance": 123,
"postseason_round": "<string>",
"is_division_game": true,
"is_conference_game": true
},
"_meta": {
"request_id": "<string>",
"served_from": "live",
"cache_ttl_seconds": 123,
"provenance": {},
"availability": {}
}
}Authorizations
Send a workspace API token in the Authorization: Bearer <token> header.
Path Parameters
League for this reference section: nfl.
nfl Query Parameters
Opt in to per-field provenance on supported single game, match, team, player, and venue reads. Lists and composites accept the flag but generally omit provenance. It is returned under _meta.provenance only when source metadata exists.
Response
Game document.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
live, cache Response cache TTL; independent of source freshness. Omitted when zero.
Endpoint-specific availability context, including soccer roster coverage.