openapi: 3.0.3
info:
title: The Odds Events Scores API
description: The Odds API provides sports betting odds from major bookmakers worldwide. Access current and historical odds for head-to-head, spreads, totals, and outrights markets across 100+ sports. Also provides live scores and event listings. Requires an API key for all requests. Quota is consumed per request based on number of regions and markets requested.
version: 4.0.0
contact:
url: https://the-odds-api.com/
termsOfService: https://the-odds-api.com/terms
servers:
- url: https://api.the-odds-api.com
description: Primary API server
- url: https://ipv6-api.the-odds-api.com
description: IPv6 API server
security:
- apiKey: []
tags:
- name: Scores
description: Live and recent game scores.
paths:
/v4/sports/{sport}/scores:
get:
operationId: getSportScores
summary: Get Sport Scores
description: 'Returns live and recent scores for a given sport. Quota: 1 credit for live scores only, 2 credits when using the daysFrom parameter. Live scores refresh approximately every 30 seconds.'
tags:
- Scores
parameters:
- name: sport
in: path
required: true
description: Sport key from /v4/sports.
schema:
type: string
- name: apiKey
in: query
required: true
description: Your API key.
schema:
type: string
- name: daysFrom
in: query
required: false
description: Include completed games from this many days ago (1-3). Adding this increases cost to 2 credits.
schema:
type: integer
minimum: 1
maximum: 3
- name: dateFormat
in: query
required: false
description: 'Date format. Values: iso (default), unix.'
schema:
type: string
enum:
- iso
- unix
default: iso
- name: eventIds
in: query
required: false
description: Comma-separated event IDs to filter results.
schema:
type: string
responses:
'200':
description: List of events with score information.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScoreEvent'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
components:
responses:
RateLimited:
description: Too many requests — quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Unauthorized — invalid or missing API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Score:
type: object
description: Score for one team in a game.
properties:
name:
type: string
description: Team name.
score:
type: string
description: Current score.
ScoreEvent:
type: object
description: An event with live or recent score information.
properties:
id:
type: string
description: Event identifier.
sport_key:
type: string
description: Sport key.
sport_title:
type: string
description: Sport title.
commence_time:
type: string
format: date-time
description: Event start time.
completed:
type: boolean
description: Whether the game has completed.
home_team:
type: string
description: Home team name.
away_team:
type: string
description: Away team name.
scores:
type: array
nullable: true
items:
$ref: '#/components/schemas/Score'
description: Current scores for each team. Null if game hasn't started.
last_update:
type: string
format: date-time
nullable: true
description: When the score was last updated.
Error:
type: object
properties:
message:
type: string
description: Error description.
securitySchemes:
apiKey:
type: apiKey
name: apiKey
in: query