Skip to contents

One row per finished game: period and clock state, both teams' names, codes and scores, officials.

Endpoint: GET https://fibalivestats.dcd.shared.geniussports.com/data/{match_id}/data.json

team1 is the team listed first. referee1 ... commissioner read officials.<role> (current feeds) or the flat officials_refereeN strings (older feeds); NA when absent.

Usage

genius_game(match_id, return_parsed = TRUE)

Arguments

match_id

Genius match id (match_id of genius_schedule(), genius_widget_games() or genius_competition_games()), e.g. 2902690.

return_parsed

Parse into a tibble (default TRUE); FALSE returns the parsed body or page record (a list): data.json as served plus _request (the ids asked for), or the record parsed from an HTML page.

Value

A hoopR_data tibble with one row per finished game. Its columns are listed in return_columns (subset(return_columns, fn == "genius_game")) and in the searchable return columns article.

Details

Access. The Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set options(hoopR.proxy = ...) or the GENIUS_PROXY environment variable to an http(s) proxy URL (never printed or logged). Requests are spaced at least one second apart per host; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Unofficial use of a public source.

Org and season. Every competition is an ORG code plus a competition id (comp_id): genius_competitions() lists an org's competitions with the sdv END-year season (a START-year org lists 2025-26 as season 2026), genius_match_competition() maps a game to its competition, and data.json itself names no date, competition or season. The hosted ORG can differ from the LiveStats ORG of /u/ (NZNBL vs NZN). Match ids are one global sequence across every Genius customer. data.json carries no global team or player id: tno (1 or 2) and pno are in-game numbers; only finished games are read.

Errors (classed conditions, all inheriting hoopR_error): hoopR_no_data when Genius has nothing for the request (HTTP 404, the S3 AccessDenied 403, an empty 200 from the hosted host, an empty recent-games window, a schedule or widget with no matches); hoopR_bad_request for HTTP 400 / 422 or a URL that is not a Genius route (e.g. a non-numeric id); hoopR_asset_fetch when the answer is unknown: the CloudFront "Request blocked" 403, a rate limit or 5xx, the intermittent HTTP 500 "A website error has occurred" page (transient = TRUE: retry later), a dead connection, an error envelope, a cut-off page, an unfinished game, or a body for another match, competition or ORG.

Examples

# \donttest{
  try(genius_game(match_id = 2902690))
#> ── Genius LiveStats game ──────────────────────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-11-13 21:13:46 UTC
#> # A tibble: 1 × 21
#>   match_id period period_type in_ot clock periods_max period_length_regular
#>      <int>  <int> <chr>       <int> <chr>       <int>                 <int>
#> 1  2902690      1 OVERTIME        1 00:00           4                    10
#> # ℹ 14 more variables: period_length_overtime <int>, attendance <int>,
#> #   disable_match <int>, total_time_added <int>, team1_name <chr>,
#> #   team1_code <chr>, team1_score <int>, team2_name <chr>, team2_code <chr>,
#> #   team2_score <int>, referee1 <chr>, referee2 <chr>, referee3 <chr>,
#> #   commissioner <chr>
# }