# HowLongToBeat API

> HowLongToBeat returns game play times, release years, platforms, covers, and player submissions as a workflow and API.

Get game length returns HowLongToBeat play times, release year, platforms, cover, and submissions from a game name, link, or ID. An optional platform selects platform-specific play times when listed; otherwise, times cover all platforms.

- Page: https://fous.com/tools/howlongtobeat
- Handle: `@howlongtobeat`
- Category: [Entertainment](https://fous.com/tools/category/entertainment)
- Source website: https://howlongtobeat.com
- Last verified: Sep 30, 2026

## Methods

### Get game length

Operation `get_game_length`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find a game’s play times, release year, platforms, cover and player submissions by name or HowLongToBeat link or ID. When a platform has its own reported times, those replace the overall category times; platform-specific all-play-styles times are not shown.

**Input**

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

**Input schema**

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

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `name` | string | `"Elden Ring"` | Game title. |
| `game_id` | integer | `68151` | HowLongToBeat game ID. |
| `platforms` | array |  | Platforms listed for the game. |
| `release_year` | integer or null | `2022` | Year the game was released. |
| `cover_image_url` | string or null | `"https://howlongtobeat.com/games/68151_Elden_Ring.jpg"` | Game cover image link. |
| `main_story_hours` | number or null | `60.1` | Main story hours. |
| `howlongtobeat_url` | string | `"https://howlongtobeat.com/game/68151"` | Game page link. |
| `main_story_minutes` | number or null | `3606.2` | Main story minutes. |
| `player_submissions` | integer or null | `21526` | Number of reported player completions for the selected platform when available, otherwise overall. |
| `completionist_hours` | number or null | `136.2` | Completionist hours. |
| `all_play_styles_hours` | number or null | `105.6` | All play styles hours; unavailable for individual platforms. |
| `completionist_minutes` | number or null | `8172.7` | Completionist minutes. |
| `all_play_styles_minutes` | number or null | `6334.8` | All play styles minutes. |
| `main_story_plus_extras_hours` | number or null | `101.3` | Main story and extras hours. |
| `main_story_plus_extras_minutes` | number or null | `6078.1` | Main story plus extras minutes. |

**Example input**

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

**Example 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": 3606.2,
  "player_submissions": 21526,
  "completionist_hours": 136.2,
  "all_play_styles_hours": 105.6,
  "completionist_minutes": 8172.7,
  "all_play_styles_minutes": 6334.8,
  "main_story_plus_extras_hours": 101.3,
  "main_story_plus_extras_minutes": 6078.1
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@howlongtobeat",
  "visibility": "public",
  "operation": "get_game_length",
  "version": 1,
  "input": {
    "game": "Elden Ring"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@howlongtobeat\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_game_length\",\n  \"version\": 1,\n  \"input\": {\n    \"game\": \"Elden Ring\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@howlongtobeat",
  "visibility": "public",
  "operation": "get_game_length",
  "version": 1,
  "input": {
    "game": "Elden Ring"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/howlongtobeat`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_game_length`: Get game length. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-howlongtobeat https://api.fous.com/mcp/tools/howlongtobeat --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare main story and completionist times before choosing a game.
- Estimate play time with story extras.
- Check a game's release year and listed platforms.
- Review player submission counts for a selected platform.

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this HowLongToBeat tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a HowLongToBeat account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from howlongtobeat.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 30, 2026.

### How long does it take to finish a game?

Get game length returns main story, main story plus extras, and completionist play times in hours and minutes.

### How long does a game take across all play styles?

Get game length returns all-play-styles times when available; this category is unavailable for individual platforms.

### What platforms and release year are listed for a game?

Get game length returns the listed platforms and release year.

## Related

- [Steam API](https://fous.com/tools/steam.md): Steam returns game details, country-specific prices, reviews, and current and historical player counts, plus player rankings and sales lists; some details or prices may be unavailable, and review totals span languages and verdicts.
- [Xbox API](https://fous.com/tools/xbox.md): Xbox provides game details, country-specific prices and Game Pass availability, catalog-ordered listings, and current country sales; prices may be unavailable and some dates unpublished.
- [PlayStation Store API](https://fous.com/tools/playstation-store.md): Find PlayStation Store game editions, prices, ratings, and release information, plus current game sales and their end dates where available.
- [Epic Games Store API](https://fous.com/tools/epic-games-store.md): Epic Games Store provides current and upcoming free games, plus game details including country-specific prices and sales; free-game availability varies by country.
- [Roblox API](https://fous.com/tools/roblox.md): Explore and play community-created Roblox experiences, find experiences by name or link, and browse current Charts rankings with player counts and other details.
- [Metacritic API](https://fous.com/tools/metacritic.md): Metacritic provides critic and user scores for games, movies, TV shows, and albums, plus reviews and title details; some albums may match another release, and rankings may omit user scores or dates.
- [SongBPM API](https://fous.com/tools/songbpm.md): Song tempo and key information for music listeners, performers and DJs.
- [IsThereAnyDeal API](https://fous.com/tools/isthereanydeal.md): Compare PC game prices at authorized stores.
- [All Entertainment tools](https://fous.com/tools/category/entertainment)
