Skip to contents

Get details for a show's seasons, e.g. how many seasons there are and how many epsiodes each season has. With episodes == TRUE and extended == "full", this function is also suitable to retrieve all episode data for all seasons of a show with just a single API call.

Usage

seasons_summary(
  id,
  episodes = FALSE,
  drop_specials = TRUE,
  drop_unaired = TRUE,
  extended = "min"
)

Source

seasons_summary() wraps endpoint /shows/:id/seasons/:season.

Arguments

id

character(1): The ID of the item requested. Preferably the trakt ID (e.g. 1429). Other options are the trakt.tv slug (e.g. "the-wire") or imdb ID (e.g. "tt0306414"). Can also be of length greater than 1, in which case the function is called on all id values separately and the result is combined. See vignette("tRakt") for more details.

episodes

logical(1) [FALSE]: If TRUE, all episodes for each season are appended as a list-column, with the amount of variables depending on extended.

drop_specials

logical(1) [TRUE]: Special episodes (season 0) are dropped

drop_unaired

logical(1) [TRUE]: Seasons without aired episodes are dropped. Only works if extended is "full".

extended

character: Level of detail for the API response.

  • "min" (default): Minimal info (title, year, IDs). Omits the extended query param.

  • "full": Complete info including overview, ratings, runtime, etc.

  • "images": Minimal info plus image URLs (returned as a list-column).

  • "full,images": Complete info plus images.

  • "metadata": Collection endpoints only; adds video/audio metadata.

Multiple values can be combined as a comma-separated string (e.g. "full,images") or a character vector (e.g. c("full", "images")).

Value

A tibble(). If the function has a limit parameter (defaulting to 10), this will be the (maximum) number of rows of the tibble. If there are no results (or the API is unreachable), an empty tibble() is returned.

Examples

# Get just the season numbers and their IDs
seasons_summary("breaking-bad", extended = "min")
#> # A tibble: 5 × 15
#>   title    votes season rating network overview              updated_at         
#>   <chr>    <int>  <int>  <dbl> <lgl>   <chr>                 <dttm>             
#> 1 Season 1  4302      1   8.44 NA      "High school chemist… 2026-03-02 23:32:48
#> 2 Season 2  3573      2   8.63 NA      "Walt must deal with… 2026-03-03 00:45:17
#> 3 Season 3  3365      3   8.82 NA      "Walt continues to b… 2026-03-03 00:00:11
#> 4 Season 4  3206      4   9.15 NA      "Walt and Jesse must… 2026-03-02 23:32:48
#> 5 Season 5  2868      5   9.31 NA      "Walt is faced with … 2026-03-03 00:08:14
#> # ℹ 8 more variables: first_aired <dttm>, episode_count <int>,
#> #   aired_episodes <int>, original_title <chr>, tmdb <chr>, tvdb <chr>,
#> #   trakt <chr>, plex_guid <chr>
if (FALSE) { # \dontrun{
# Get season numbers, ratings, votes, titles and other metadata as well as
# a list-column containing all episode data
seasons_summary("utopia", extended = "full", episodes = TRUE)
} # }