Lookup Service
Lookup Service
Section titled “Lookup Service”The Lookup service provides reference data and search functionality for drivers, countries, licenses, and more.
const lookupService = iracing.lookup;Methods
Section titled “Methods”countries()
Section titled “countries()”Get a list of all countries.
Returns: Promise<LookupCountriesResponse>
Parameters: None
Description: Returns a list of all countries available in the iRacing system.
const countries = await iracing.lookup.countries();
countries.forEach(country => { console.log(`${country.countryName} (${country.countryCode})`);});drivers(params)
Section titled “drivers(params)”Search for drivers by name.
Returns: Promise<LookupDriversResponse>
Parameters:
searchTerm: string(required) - Name or partial name to search forleagueId?: number- Limit search to a specific league
Description: Searches for drivers matching the given term. Optionally restrict results to members of a specific league.
// Search all driversconst drivers = await iracing.lookup.drivers({ searchTerm: 'Max'});
// Search within a leagueconst leagueDrivers = await iracing.lookup.drivers({ searchTerm: 'Max', leagueId: 1234});
drivers.forEach(driver => { console.log(`${driver.displayName} (ID: ${driver.custId})`);});flairs()
Section titled “flairs()”Get available profile flairs.
Returns: Promise<LookupFlairsResponse>
Parameters: None
Description: Returns the list of available flairs that can be displayed on member profiles.
const flairs = await iracing.lookup.flairs();
flairs.forEach(flair => { console.log(`${flair.flairDesc}`);});Get general lookup data.
Returns: Promise<LookupGetResponse>
Parameters: None
Description: Returns general lookup reference data used across the API.
const lookups = await iracing.lookup.get();console.log('Lookup data:', lookups);licenses()
Section titled “licenses()”Get all license levels.
Returns: Promise<LookupLicensesResponse>
Parameters: None
Description: Returns the list of all license levels and groups in the iRacing system.
const licenses = await iracing.lookup.licenses();
licenses.forEach(license => { console.log(`${license.licenseGroupName}`);});See Also
Section titled “See Also”- Constants Service - System-level reference data
- Member Service - Member profiles
- Services Overview - All available services