Skip to content

iRacing Data Client

Access the complete iRacing Data API with TypeScript support, OAuth2 authentication, and comprehensive error handling

Fully Typed

Complete TypeScript types for all API endpoints with IntelliSense support and compile-time safety.

Auto-Generated

SDK automatically generated from the official iRacing API documentation for always up-to-date methods.

Smart Caching

Response caching with automatic expiration based on API response headers. (Coming soon)

Error Handling

Comprehensive error handling with specific error types for maintenance mode, rate limiting, and authentication.

import { IRacingDataClient } from 'iracing-data-client';
// Initialize the Data Client
const iracing = new IRacingDataClient({
auth: {
type: 'password-limited',
clientId: process.env.IRACING_CLIENT_ID,
clientSecret: process.env.IRACING_CLIENT_SECRET,
username: process.env.IRACING_USERNAME,
password: process.env.IRACING_PASSWORD,
},
});
// Get all tracks
const tracks = await iracing.track.get();
console.log(`Found ${tracks.length} tracks`);
// Get member data
const member = await iracing.member.get({ custIds: [123456] });

The SDK provides access to all iRacing Data API endpoints through organized service classes:

  • Car & Track Data - Vehicle and circuit information, assets, and configurations
  • Member Services - Profile data, awards, statistics, and participation credits
  • Competition Data - Race results, lap data, season standings, and world records
  • League Management - League rosters, seasons, standings, and sessions
  • Hosted Sessions - Information about hosted and official sessions
  • Statistics - Career stats, division standings, and performance metrics
  • Node.js 18+ or modern browser environment
  • iRacing account with active subscription
  • TypeScript 5.0+ (for TypeScript projects)

Installation

Learn how to install and configure the Data Client in your project. Get Started →

Authentication

Set up authentication with your iRacing credentials. Learn More →

API Reference

Explore the complete API documentation for all services. Browse API →