All endpoints are available as properties on the IGDBClient instance. Each exposes a .query() method returning a fully-typed QueryBuilder, plus a handful of convenience methods.
client.games
client.genres
client.platforms
client.companies
Model: Game
interface Game {
id: number;
name: string;
slug: string;
summary: string;
storyline: string;
rating: number;
rating_count: number;
aggregated_rating: number;
aggregated_rating_count: number;
first_release_date: number; // Unix timestamp
cover: Cover;
genres: Genre[];
platforms: Platform[];
involved_companies: InvolvedCompany[];
similar_games: Game[];
url: string;
status: number;
category: number;
}query() — returns a base QueryBuilder<Game> with no filters applied.
findMany() — shorthand for query().limit(50).
findById(id: number) — fetches a single game by ID. Throws IGDBNotFoundError if not found.
const game = await client.games.findById(1942); // Hadessearch(term: string) — shorthand for query().search(term).limit(50).
const results = await client.games.search("hollow knight");The
gamesendpoint also supports.count()on itsQueryBuilder.
Model: Genre
interface Genre {
id: number;
name: string;
slug: string;
}query(), findMany() — same as games.
const genres = await client.genres.findMany().execute();Model: Platform
interface Platform {
id: number;
name: string;
slug: string;
abbreviation: string;
}query(), findMany()
const ps5 = await client.platforms
.query()
.where((p) => p.slug.eq("ps5"))
.first();Model: Company
interface Company {
id: number;
name: string;
description: string;
country: number;
slug: string;
}query(), findMany(), search(term)
const fromJapan = await client.companies
.query()
.where((c) => c.country.eq(392)) // ISO 3166-1 numeric
.limit(20)
.execute();interface Cover {
id: number;
image_id: string;
width: number;
height: number;
}
interface InvolvedCompany {
id: number;
company: Company;
developer: boolean;
publisher: boolean;
}