Endpoints

Heroes

Access hero data

Heroes Endpoints

Access data for all Overwatch heroes available in the mode.

List Heroes

GET/api/heroes

Retrieve a list of all heroes.

Query Parameters

role
string
Filter by role (tank, damage, support).

Example Request

curl https://overwatch-hero-api.pages.dev/api/heroes?role=tank

Response Structure

Returns an array of Hero objects.

[
  {
    "id": "ana",
    "name": "Ana",
    "role": "support",
    "image_url": "...",
    "base_stats": { ... },
    "item_ids": ["...", "..."],
    "power_ids": ["...", "..."]
  }
  // ...
]

Get Hero Details

GET/api/heroes/:id

Retrieve detailed information for a specific hero.

Path Parameters

id
string required
The hero's unique identifier (lowercase, e.g., ana).

Query Parameters

expand
string
Comma-separated list of related resources to embed. Options: items, powers.

Example Request

curl https://overwatch-hero-api.pages.dev/api/heroes/ana?expand=powers

Response

Returns a single Hero object. If expanded, items and powers arrays will contain full objects instead of just IDs.

{
  "id": "ana",
  "name": "Ana",
  "role": "support",
  "powers": [
    {
      "id": "nano_boost",
      "name": "Nano Boost",
      // ...
    }
  ]
  // ...
}