Skip to main content

Matches

This endpoint allows you to retrieve the matches. You can use id from the seasons, tournaments, rounds, arenas, referees and teams endpoint to get the matches. Matches status codes:

typedescription
canceledAbandoned
canceledCanceled
delayedStart delayed
finishedWalkover
finishedRemoved
finishedRetired
finishedAET
finishedEnded
finishedCoverage canceled
interruptedInterrupted
notplayedNot played
postponedPostponed
upcomingNot started
live1st quarter
live2nd quarter
live4th quarter
live1st extra
live2nd extra

For scores we have fields for covering that: current, display, period1, period2, period3, period4, period5, period6, period7, normaltime, overtime, point, series, extra1, extra2, team.

For time extras or injuries we have fields for covering that: current, period1, period2, period3, period4, overtime, current_period_start_timestamp.

Multi-language: This feature allows the user to manually change the language of the API response by adding value to the lang attribute. Example: lang=en.

Pagination: The endpoint uses an offset and limit system. Specify the offset and limit parameters to fetch the desired range of results. The maximum and default number of results per request is 50.

Update Period: The endpoint is updated every 10 seconds.
Recommended Calls: Limit calls to 1 every 10 seconds.

Use Cases

Get matches
https://basketball.sportdevs.com/matches

Get match based on the id
https://basketball.sportdevs.com/matches?id=eq.{id}

Get matches based on the start_timestamp (gte = greater than or equal to, lt = lower than)
https://basketball.sportdevs.com/matches?start_timestamp=gte.2023-04-27&start_timestamp=lt.2023-04-28

Get matches based on the status_type
https://basketball.sportdevs.com/matches?status_type=eq.{status_type}

Get matches based on the season_id
https://basketball.sportdevs.com/matches?season_id=eq.{season_id}

Get matches based on the tournament_id
https://basketball.sportdevs.com/matches?tournament_id=eq.{tournament_id}

Get matches based on the round_id
https://basketball.sportdevs.com/matches?round_id=eq.{round_id}

Get matches based on the arena_id
https://basketball.sportdevs.com/matches?arena_id=eq.{arena_id}

Get matches based on the referee_id
https://basketball.sportdevs.com/matches?referee_id=eq.{referee_id}

H2H - Get head to head matches with teams ex.(home_team_id, away_team_id)
https://basketball.sportdevs.com/matches?or=(home_team_id.eq.{home_team_id}, away_team_id.eq.{home_team_id}, home_team_id.eq.{away_team_id}, away_team_id.eq.{away_team_id})

Get home team matches based on the home_team_id
https://basketball.sportdevs.com/matches?home_team_id=eq.{home_team_id}

Get away team matches based on the away_team_id
https://basketball.sportdevs.com/matches?away_team_id=eq.{away_team_id}

Query Parameters
  • id integer

    Default value: eq.6

    The id of the match

  • tournament_id integer

    Default value: eq.12971

    The id of the tournament

  • season_id integer

    Default value: eq.36

    The id of the season

  • arena_id integer

    Default value: eq.2962

    The id of the arena

  • referee_id integer

    Default value: eq.123

    The id of the referee

  • home_team_id integer

    Default value: eq.7231

    The id of the home team

  • away_team_id integer

    Default value: eq.7362

    The id of the away team

  • offset string

    Default value: 0

    Limiting and Pagination

  • limit string

    Default value: 50

    Limiting and Pagination

  • lang string

    Default value: en

    Multi-language

Responses

OK


Schema array
  • id integer

    The id of the match

    Note: This is a Primary Key.

  • name character varying

    Home team name vs away team name

  • tournament_id integer

    The id of the tournament

    Note: This is a Foreign Key to seasons-by-tournament.tournament_id.

  • tournament_name text

    The name of the tournament

  • tournament_importance integer

    The importance of the tournament

  • season_id integer

    The id of the season

    Note: This is a Foreign Key to seasons.id.

  • season_name text

    The name of the season

  • rounds jsonb

    The rounds

  • status jsonb

    The status of the match

  • status_type text

    The type of the match

  • attendance integer

    The number of people watching the match at the arena

  • arena_id integer

    The id of the arena

    Note: This is a Foreign Key to arenas.id.

  • arena_name text

    The name of the arena

  • arena_hash_image character varying

    Possible values: <= 64 characters

    The name image of the arena

  • referee_id integer

    The id of the referee

    Note: This is a Foreign Key to referees.id.

  • referee_name text

    The name of the referee

  • referee_hash_image character varying

    Possible values: <= 64 characters

    The name image of the referee

  • home_team_id integer

    The id of the home team

    Note: This is a Foreign Key to teams.id.

  • home_team_name text

    The name of the home team

  • home_team_hash_image character varying

    Possible values: <= 64 characters

    The name image of the home team

  • away_team_id integer

    The id of the away team

    Note: This is a Foreign Key to teams.id.

  • away_team_name text

    The name of the away team

  • away_team_hash_image character varying

    Possible values: <= 64 characters

    The name image of the away team

  • home_team_score jsonb

    The score of the home team

  • away_team_score jsonb

    The score of the away team

  • times jsonb

    The time of the match

  • coaches jsonb

    The coaches

  • specific_start_time timestamp with time zone

    The real start time of the match

  • start_time timestamp with time zone

    The official start time of the match

  • end_time timestamp with time zone

    The end of the match

  • last_period text

    The last period of the match

  • season_statistics_type text

    The type of the season's statistics

  • lineups_id integer

    The id of the lineup

  • graphs_id integer

    The id of the graph

  • coaches_id integer

    The id of the coaches

  • class_id integer

    The id of the class

  • class_name text

    The name of the class

  • class_hash_image character varying

    Possible values: <= 64 characters

    The name of the class image

  • league_id integer

    The id of the league

  • league_name text

    The name of the league

  • league_hash_image character varying

    Possible values: <= 64 characters

    The name of the league image

  • previous_leg_match_id integer

    The id of the previous leg match

  • weather_id integer

    The id of the weather

  • weather_main text

    The main weather

  • weather_icon text

    The name icon of the weather

Loading...