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.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Game, required
game Game name, HowLongToBeat game link or game ID, for example Elden Ring.
Elden Ring
- Platform optional
platform Platform to use for play times when listed, for example PlayStation 5. Defaults to all platforms.
(default)
Input as JSON
{ "game": "Elden Ring"}Output
{ "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}Code
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"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "howlongtobeat.com/get_game_length" , "input": { "game": "Elden Ring" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "howlongtobeat.com/get_game_length" , "input": { "game": "Elden Ring" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run howlongtobeat.com/get_game_length# with {"game":"Elden Ring"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "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
{ "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}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
howlongtobeat.com/get_game_length- Returns
- name, release year, platforms, cover image, HowLongToBeat link, player submissions, play times in hours and minutes
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method howlongtobeat.com/get_game_length with the inputs above.
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?
See more
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.
store.steampowered.com/get_gameLooks 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.
store.playstation.com/get_gameFinds 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.
xbox.com/get_gameFinds current official-store prices, the all-time low and live bundles for a PC game in the selected country.
isthereanydeal.com/get_best_priceLooks 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).
nintendo.com/get_gameGets 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.
store.steampowered.com/get_player_count_historyGets 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.
roblox.com/get_gameFinds a game, movie or TV show on Metacritic by name and returns critic and user scores with title details.
metacritic.com/get_scores