curl --request GET \
--url https://tako.com/api/v1/sports/games \
--header 'X-API-Key: <api-key>'import requests
url = "https://tako.com/api/v1/sports/games"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://tako.com/api/v1/sports/games', 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://tako.com/api/v1/sports/games",
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-API-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://tako.com/api/v1/sports/games"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-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://tako.com/api/v1/sports/games")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tako.com/api/v1/sports/games")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"league": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "scheduled",
"title": "<string>",
"home": {
"id": "<string>",
"name": "<string>"
},
"away": {
"id": "<string>",
"name": "<string>"
},
"odds_available": true,
"source": "live_event"
}
],
"generated_at": "2023-11-07T05:31:56Z",
"next_cursor": "<string>"
}{
"error_message": "<string>",
"error_type": "BAD_REQUEST"
}{
"error_message": "<string>",
"error_type": "BAD_REQUEST"
}{
"detail": "<string>"
}List sports games
Find the game and team ids that sports monitors take as subjects
curl --request GET \
--url https://tako.com/api/v1/sports/games \
--header 'X-API-Key: <api-key>'import requests
url = "https://tako.com/api/v1/sports/games"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://tako.com/api/v1/sports/games', 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://tako.com/api/v1/sports/games",
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-API-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://tako.com/api/v1/sports/games"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-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://tako.com/api/v1/sports/games")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tako.com/api/v1/sports/games")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"league": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "scheduled",
"title": "<string>",
"home": {
"id": "<string>",
"name": "<string>"
},
"away": {
"id": "<string>",
"name": "<string>"
},
"odds_available": true,
"source": "live_event"
}
],
"generated_at": "2023-11-07T05:31:56Z",
"next_cursor": "<string>"
}{
"error_message": "<string>",
"error_type": "BAD_REQUEST"
}{
"error_message": "<string>",
"error_type": "BAD_REQUEST"
}{
"detail": "<string>"
}Notes
- To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
- This endpoint is the subject lookup for sports monitors. Find the game or the team here, then pass its id to Create a monitor.
- Games come back soonest first.
limitdefaults to 100 and maxes at 500. To get the next page, pass a response’snext_cursorback ascursor. - Filter with
league, a league id such asNBAorEPL, which is case-insensitive, and withteam, a team id, which matches games where the team plays on either side. - Rate limits are 60 requests a minute and 5,000 a day, per user.
homeandawayarenullfor events without teams, such as F1 and NASCAR.titleis the only label those rows carry.
Which id goes where
| Field | Pass it as | To |
|---|---|---|
id | game_id | Any sports monitor. sports.odds_crosses requires it. |
home.id, away.id | team_id | Any sports monitor. sports.odds_crosses requires it. |
sports.game_start, sports.game_result, and sports.score_event take either id, or both: game_id alone watches the whole game, team_id alone follows that team’s games, and both together watch that team’s side of that one game. For the full rule, see Naming a subject.
live_event row’s id works as a game_id. A row whose source is schedule_table is an FBS or FCS football game that only the football schedule table records. Its id belongs to that table, no live document exists for it, and no monitor accepts it. Only live_event rows can carry odds.Setting the window
from and to are ISO 8601, and Tako reads a naive value as UTC. They default to one day back and seven days ahead, which is the whole range the schedule covers. A window outside that range returns 400.
status defaults to scheduled,live, because you can’t monitor a finished game. To include the games that finished inside the one-day tail, pass final.
Reading odds_available
odds_available is true when the game document already holds a market. Prematch odds arrive inside a per-sport window, so a game further out reports false until that window opens. You can create a monitor either way, so a false here is no reason to wait.Authorizations
Query Parameters
A league id, such as NBA or EPL. Case-insensitive.
A team id. Matches games where the team plays on either side.
Window start, ISO 8601. Defaults to one day ago, which is the earliest the schedule covers. A naive value reads as UTC.
Window end, ISO 8601. Defaults to seven days ahead, which is the furthest the schedule covers. A window outside that range returns 400.
Keep only games in these states, comma-separated. Defaults to scheduled,live, because you can't monitor a finished game. To include the games that finished inside the one-day lookback, pass final.
"scheduled,live"
"final"
Games per page. Defaults to 100, maximum 500.
1 <= x <= 500The next_cursor from the previous page. Opaque; pass it back unchanged.