Games API Documentation
Description
This endpoint returns all the detailed game data for every sports league, including home & away teams, filterable before or after a specific date.
You'll need a license key to use OpticOdds' API. You can get one by contacting us at www.opticodds.com.
API Endpoint
https://api.opticodds.com/api/v2/games
Parameters
key
(required)
Your OpticOdds API license key.
id
The game id you want to recieve information for.
sport
You can pass in multiple of this parameter.
The sport you want to receive games for. We support the following:
football
basketball
baseball
mma
boxing
hockey
soccer
tennis
golf
motorsports
esports
wrestling
aussie-rules
rugby
lacrosse
cricket
volleyball
politics
league
You can pass in multiple of this parameter.
The league you want to receive games for (e.g. NCAA
)
is_live
Flag to filter for odds for live games (supports values true
, yes
, t
, 1
)
start_date_before
Specify this value if you want to receive all games before a specific date. Please pass in an ISO 8601 date for the best results.
start_date_after
Specify this value if you want to receive all games after a specific date. Please pass in an ISO 8601 date for the best results.
include_team_info
Specify this parameter if you want the home and away team information to be included as part of the response.
include_statsperform_ids
Specify this parameter if you want the StatsPerform IDs to be included as part of the response.
include_rotation_numbers
Specify this parameter if you want home_rotation_number
and away_rotation_number
to be included.
Example Response
{
"data": [
{
"id": "11591-58151-2022-02-13",
"sport": "football",
"league": "NFL",
"start_date": "2022-02-13T13:00:00-05:00",
"home_team": "NFC Team",
"away_team": "Championship Game 56 - AFC Team",
"is_live": false,
"tournament": null,
},
{
"id": "39341-78014-2022-01-17",
"sport": "football",
"league": "NFL",
"start_date": "2022-01-17T15:15:00-05:00",
"home_team": "Los Angeles Rams",
"away_team": "Arizona Cardinals",
"is_live": false,
"tournament": null,
},
{
"id": "13602-82789-2022-01-16",
"sport": "football",
"league": "NFL",
"start_date": "2022-01-16T15:15:00-05:00",
"home_team": "Kansas City Chiefs",
"away_team": "Pittsburgh Steelers",
"is_live": false,
"tournament": null,
},
{
"id": "10459-41811-2022-01-16",
"sport": "basketball",
"league": "NBA",
"start_date": "2022-01-16T15:10:00-05:00",
"home_team": "Minnesota Timberwolves",
"away_team": "Golden State Warriors",
"is_live": false,
"tournament": null,
},
{
"id": "23669-33682-2022-39",
"sport": "tennis",
"league": "ATP",
"start_date": "2022-09-26T23:00:00-04:00",
"home_team": "Chun-hsin Tseng",
"away_team": "Christopher O'Connell",
"is_live": false,
"tournament": "ATP Seoul"
},
...
]
}
Example Response with include_team_info
{
"data": [
{
"id": "35321-64238-2023-08-27",
"start_date": "2023-08-27T11:30:00-04:00",
"home_team": "FC Bayern Munich",
"away_team": "FC Augsburg",
"is_live": false,
"is_popular": false,
"tournament": null,
"status": "unplayed",
"sport": "soccer",
"league": "Germany - Bundesliga",
"home_team_info": null,
"away_team_info": {
"id": "9D1B7EE2CED3",
"team_name": "FC Augsburg",
"team_city": "FC Augsburg",
"team_mascot": null,
"team_abbreviation": "FCA",
"sport": "soccer",
"league": "Germany - Bundesliga"
}
},
{
"id": "40503-42237-2023-08-27",
"start_date": "2023-08-27T09:30:00-04:00",
"home_team": "1. FSV Mainz 05",
"away_team": "Eintracht Frankfurt",
"is_live": false,
"is_popular": false,
"tournament": null,
"status": "unplayed",
"sport": "soccer",
"league": "Germany - Bundesliga",
"home_team_info": null,
"away_team_info": {
"id": "D7168C264383",
"team_name": "Eintracht Frankfurt",
"team_city": "Eintracht Frankfurt",
"team_mascot": null,
"team_abbreviation": "SGE",
"sport": "soccer",
"league": "Germany - Bundesliga"
}
},
{
"id": "11928-31465-2023-08-26",
"start_date": "2023-08-26T12:30:00-04:00",
"home_team": "Borussia Monchengladbach",
"away_team": "Bayer 04 Leverkusen",
"is_live": false,
"is_popular": false,
"tournament": null,
"status": "unplayed",
"sport": "soccer",
"league": "Germany - Bundesliga",
"home_team_info": null,
"away_team_info": null
},
{
"id": "16901-42816-2023-08-26",
"start_date": "2023-08-26T09:30:00-04:00",
"home_team": "TSG 1899 Hoffenheim",
"away_team": "Heidenheim",
"is_live": false,
"is_popular": false,
"tournament": null,
"status": "unplayed",
"sport": "soccer",
"league": "Germany - Bundesliga",
"home_team_info": {
"id": "D8A25E2727D3",
"team_name": "TSG 1899 Hoffenheim",
"team_city": "TSG 1899 Hoffenheim",
"team_mascot": null,
"team_abbreviation": "TSG",
"sport": "soccer",
"league": "Germany - Bundesliga"
},
"away_team_info": {
"id": "14B348E60C45",
"team_name": "Heidenheim",
"team_city": "Heidenheim",
"team_mascot": null,
"team_abbreviation": "HDH",
"sport": "soccer",
"league": "Germany - Bundesliga"
}
},
...
]
}