# HowLongToBeat API: Get game length

> Finds a game by name, HowLongToBeat link or ID and returns its play times, release year, platforms, cover and player submissions. Platform-specific times replace the overall category times when the platform has its own.

Unofficial. Not affiliated with or endorsed by HowLongToBeat.

- Page: https://fous.com/methods/howlongtobeat.com/get-game-length
- Method: `howlongtobeat.com/get_game_length`, version 1
- Website: howlongtobeat.com
- Returns: name, release year, platforms, cover image, HowLongToBeat link, player submissions, play times in hours and minutes
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `game` | string | yes | `"Elden Ring"` | Game name, HowLongToBeat game link or game ID, for example Elden Ring. |
| `platform` | string | no |  | Platform to use for play times when listed, for example PlayStation 5. Defaults to all platforms. Default "". |

## Output

From a run on Oct 23, 2026, shortened. Its input:

```json
{
  "game": "Elden Ring"
}
```

Its output:

```json
{
  "name": "Elden Ring",
  "game_id": 68151,
  "platforms": [
    "Nintendo Switch 2",
    "PC",
    "PlayStation 4"
  ],
  "release_year": 2022,
  "cover_image_url": "https://howlongtobeat.com/games/68151_Elden_Ring.jpg",
  "main_story_hours": 60.1,
  "howlongtobeat_url": "https://howlongtobeat.com/game/68151",
  "main_story_minutes": 3608,
  "player_submissions": 21678,
  "completionist_hours": 136.2,
  "all_play_styles_hours": 105.6,
  "completionist_minutes": 8171.1,
  "all_play_styles_minutes": 6335.3,
  "main_story_plus_extras_hours": 101.4,
  "main_story_plus_extras_minutes": 6081.9
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"howlongtobeat.com/get_game_length","input":{"game":"Elden Ring"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- How long does it take to beat Elden Ring on PlayStation 5?
- What's the average playthrough time for Hades on Switch?
- Look up play times for The Witcher 3 on PC, including release year and platforms.
- Find the main story and completionist hours for Hollow Knight on Xbox One at howlongtobeat.com.
- How many hours do most players spend finishing Baldur's Gate 3 on PC?

## Input schema

```json
{
  "type": "object",
  "required": [
    "game"
  ],
  "properties": {
    "game": {
      "type": "string",
      "description": "Game name, HowLongToBeat game link or game ID, for example Elden Ring."
    },
    "platform": {
      "type": "string",
      "default": "",
      "description": "Platform to use for play times when listed, for example PlayStation 5. Defaults to all platforms."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "name",
    "release_year",
    "platforms",
    "cover_image_url",
    "howlongtobeat_url",
    "player_submissions",
    "main_story_hours",
    "main_story_plus_extras_hours",
    "completionist_hours",
    "all_play_styles_hours",
    "game_id",
    "main_story_minutes",
    "main_story_plus_extras_minutes",
    "completionist_minutes",
    "all_play_styles_minutes"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Game title."
    },
    "game_id": {
      "type": "integer",
      "description": "HowLongToBeat game ID.",
      "x-fous-developer": true
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Platforms listed for the game."
    },
    "release_year": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Year the game was released."
    },
    "cover_image_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Game cover image link."
    },
    "main_story_hours": {
      "type": [
        "number",
        "null"
      ],
      "description": "Main story hours."
    },
    "howlongtobeat_url": {
      "type": "string",
      "description": "Game page link."
    },
    "main_story_minutes": {
      "type": [
        "number",
        "null"
      ],
      "description": "Main story minutes.",
      "x-fous-developer": true
    },
    "player_submissions": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of reported player completions for the selected platform when available, otherwise overall."
    },
    "completionist_hours": {
      "type": [
        "number",
        "null"
      ],
      "description": "Completionist hours."
    },
    "all_play_styles_hours": {
      "type": [
        "number",
        "null"
      ],
      "description": "All play styles hours; unavailable for individual platforms."
    },
    "completionist_minutes": {
      "type": [
        "number",
        "null"
      ],
      "description": "Completionist minutes.",
      "x-fous-developer": true
    },
    "all_play_styles_minutes": {
      "type": [
        "number",
        "null"
      ],
      "description": "All play styles minutes.",
      "x-fous-developer": true
    },
    "main_story_plus_extras_hours": {
      "type": [
        "number",
        "null"
      ],
      "description": "Main story and extras hours."
    },
    "main_story_plus_extras_minutes": {
      "type": [
        "number",
        "null"
      ],
      "description": "Main story plus extras minutes.",
      "x-fous-developer": true
    }
  },
  "additionalProperties": false
}
```

## See more

- [Steam API: Get game details](https://fous.com/methods/store.steampowered.com/get-game.md): Finds a PC game on Steam by name, store link or app ID and returns its store details, country price, reviews, tags and live player count.
- [PlayStation API: Get PlayStation Store game](https://fous.com/methods/store.playstation.com/get-game.md): Looks up a PlayStation Store game by name or product link in a country. Prefers the standard full game; prices and offers vary by country. Game trials are not counted as PlayStation Plus inclusion.
- [Xbox API: Get game](https://fous.com/methods/xbox.com/get-game.md): Finds an Xbox or PC game by name or by xbox.com store link. Returns its store details, prices and Game Pass availability for a country.
- [IsThereAnyDeal API: Get best price](https://fous.com/methods/isthereanydeal.com/get-best-price.md): Finds current official-store prices, the all-time low and live bundles for a PC game in the selected country.
- [Nintendo API: Get a Nintendo Switch game's store details](https://fous.com/methods/nintendo.com/get-game.md): Looks up a Nintendo Switch or Switch 2 game by name or Nintendo link and returns its eShop price, sale, release date, publisher, rating, players, size and genres for the chosen country (US, Canada, UK, Mexico, Brazil, Argentina, Chile, Colombia or Peru).
- [Steam API: Get player count history](https://fous.com/methods/store.steampowered.com/get-player-count-history.md): Gets a Steam game's current players, 24-hour peak, all-time peak and monthly player-count history from SteamCharts. Takes a game name, SteamCharts or Steam store link, or Steam app ID.
- [Roblox API: Get game](https://fous.com/methods/roblox.com/get-game.md): Gets a Roblox experience by name or game link, with players online, visits, likes, creator, dates, maturity rating and icon. For names with several matches, returns the match with the most players.
- [Metacritic API: Get scores](https://fous.com/methods/metacritic.com/get-scores.md): Finds a game, movie or TV show on Metacritic by name and returns critic and user scores with title details.
