Games / Scores
getGames
The getGames call will return the games along with odds, teams data.
Required arguments
Must specify a organization_id, division_id and (start_date or a season with a home/away_team_id)
start_date (YYYY-MM-DD)
OR
season AND (home_team_id OR away_team_id)
Request
GET
https://api.srating.io/v1/game/getGames?start_date=2023-04-03&organization_id=f1c37c98-3b4c-11ef-94bc-2a93761010b8&division_id=bf602dc4-3b4a-11ef-94bc-2a93761010b8POST
fetch('https://api.srating.io/v1', {
'method': 'POST',
'headers': {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
},
'body': JSON.stringify({
'class': 'game',
'function': 'getGames',
'arguments': {
'start_date': '2023-04-03',
'organization_id': 'f1c37c98-3b4c-11ef-94bc-2a93761010b8',
'division_id': 'bf602dc4-3b4a-11ef-94bc-2a93761010b8',
}
}),
}).then(response => {
return response.json();
}).then(json => {
console.log(json);
return json;
}).catch(error => {
console.log(error);
});Response
{
"40fd1ac3-5dd9-11ef-9222-9667e47de71a": {
"game_id": "40fd1ac3-5dd9-11ef-9222-9667e47de71a",
"organization_id": "f1c37c98-3b4c-11ef-94bc-2a93761010b8",
"division_id": "bf602dc4-3b4a-11ef-94bc-2a93761010b8",
"season": 2023,
"away_team_id": "885557ec-8549-11ed-bf01-5296e1552828",
"home_team_id": "75a9cb12-8549-11ed-bf01-5296e1552828",
"network": "CBS",
"away_score": 68,
"home_score": 68,
"status": "final",
"current_period": "Final",
"clock": "0:00",
"clock_last_updated_at": "2024-10-18T15:43:45.000Z",
"start_date": "2023-04-03T00:00:00.000Z",
"start_datetime": "2023-04-03T21:20:00.000Z",
"start_timestamp": 1680571200,
"updated_at": "2023-04-03T23:38:01.000Z",
"attendance": 72423,
"neutral_site": 1,
"is_conf_game": 0,
"boxscore": 1,
"guid": "0343dc2d-1021-43cd-956a-6aef5b9ed2d4",
"deleted": 0,
"odds": {
"pre": {
"odds_id": "20b29532-5f70-11ef-9222-9667e47de71a",
"game_id": "40fd1ac3-5dd9-11ef-9222-9667e47de71a",
"money_line_away": 312,
"money_line_home": -329,
"spread_away": 7,
"spread_home": -9,
"over": 119,
"under": 143,
"date_of_entry": "2023-04-03T04:00:00.000Z",
"live": 0,
"current": 0,
"deleted": 0
},
"live": {
"odds_id": "209de407-5f70-11ef-9222-9667e47de71a",
"game_id": "40fd1ac3-5dd9-11ef-9222-9667e47de71a",
"money_line_away": 877,
"money_line_home": -3489,
"spread_away": 11,
"spread_home": -16,
"over": 144.5,
"under": 132.5,
"date_of_entry": "2023-04-03T08:00:00.000Z",
"live": 1,
"current": 1,
"deleted": 0
}
},
"teams": {
"75a9cb12-8549-11ed-bf01-5296e1552828": {
"team_id": "75a9cb12-8549-11ed-bf01-5296e1552828",
"char6": "UCONN",
"code": "Connecticut",
"name": "Connecticut Huskies",
"alt_name": "Connecticut",
"primary_color": "#0C2340",
"secondary_color": null,
"guid": null,
"deleted": 0,
"conference_id": "aa230787-1095-11ef-9686-72fab666226a"
},
"885557ec-8549-11ed-bf01-5296e1552828": {
"team_id": "885557ec-8549-11ed-bf01-5296e1552828",
"char6": "SDSU",
"code": "San Diego State",
"name": "San Diego State Aztecs",
"alt_name": "San Diego St.",
"primary_color": "#A6192E",
"secondary_color": null,
"guid": null,
"deleted": 0,
"conference_id": "ac832348-1095-11ef-9686-72fab666226a"
}
}
}
}