Skip to content

Season Service

The Season service provides access to season schedules, race guides, and spectator session information.

const seasonService = iracing.season;

Get a list of seasons for a given year and quarter.

Returns: Promise<SeasonListResponse>

Parameters:

  • seasonYear: number (required) - The season year
  • seasonQuarter: number (required) - The season quarter (1-4)

Description: Returns all seasons for the specified year and quarter.


Get the race guide showing upcoming sessions.

Returns: Promise<SeasonRaceGuideResponse>

Parameters:

  • from?: string - Start time (ISO format)
  • includeEndAfterFrom?: boolean - Include sessions that end after the from time

Description: Returns the race guide with upcoming race sessions and their schedules.


Get subsession IDs available for spectating.

Returns: Promise<SeasonSpectatorSubsessionidsResponse>

Parameters:

  • eventTypes?: number[] - Filter by event types

Description: Returns subsession IDs that are currently available for spectating.


Get detailed spectator subsession information.

Returns: Promise<SeasonSpectatorSubsessionidsDetailResponse>

Parameters:

  • eventTypes?: number[] - Filter by event types
  • seasonIds?: number[] - Filter by season IDs

Description: Returns detailed information about subsessions available for spectating, including series and track data.

async function findUpcomingRaces(categoryId?: number) {
const guide = await iracing.season.raceGuide({
includeEndAfterFrom: true
});
return guide.sessions.filter(session =>
!categoryId || session.categoryId === categoryId
);
}