A complete list of Dota 2 heroes as of August 2026, with names, primary attributes and image URLs sourced from the Steam CDN.
npm install @jkopsala/dota2-heroesimport heroes from "@jkopsala/dota2-heroes";
// All heroes
console.log(heroes);
// Filter by attribute
const strengthHeroes = heroes.filter((h) => h.primary_attribute === "strength");Each hero object has the shape:
{
id: number;
name: string;
primary_attribute: "strength" | "agility" | "intelligence" | "charisma";
image: string; // Steam CDN URL
}# Print all heroes as JSON
npx @jkopsala/dota2-heroes
# Filter by primary attribute
npx @jkopsala/dota2-heroes --attribute=strength
# Find a hero by name (partial, case-insensitive)
npx @jkopsala/dota2-heroes --name=invoker
# Print names only
npx @jkopsala/dota2-heroes --attribute=agility --list
# Help
npx @jkopsala/dota2-heroes --helpheroes.json— 127 heroes, each withid,name,primary_attribute, andimage.
Requires Node.js 18 or later (uses the built-in node:test runner and fetch).
node --test heroes.test.js