HowLongToBeat Game API
Get HowLongToBeat game durations by ID or URL via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as id, output, and retrieve structured data including main-story sample count, platform grouping, and related game identifier for time-budget browsing, and game catalogue, ready for production pipelines and AI agent automation.
- Selected price
- $0.002 / billing creditPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
HowLongToBeat Game API
Prepare your request, then continue with your agent.
Pricing
$0.002 / billing credit
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
- Provider
- API
- Pricing
On this page
Overview
HowLongToBeat Game API
Select a game using id or url and inspect times for main story, extras, completionist and other available styles. Means, medians, ranges and polled counts describe source submissions rather than a guaranteed finish time.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Choose the lookup or search inputs described below. Optional: include, id, url. JSON output; fresh=1 bypasses cache and raw=0 omits raw source blocks. |
| Selected implementation | apish · HowLongToBeat game API |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Time-budget browsing: Compare main-story and completionist estimates separately.
- Game catalogue: Attach source sample counts to displayed duration estimates.
Returned Data
| Field | Meaning |
|---|---|
times.main_story.average_hours |
Average main-story duration in hours |
times.main_story.median_hours |
Median main-story duration in hours |
times.main_story.polled |
Main-story sample count |
by_platform[].platform |
Platform grouping |
related_games[].id |
Related game identifier |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/game \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
--data-urlencode id=68151 \
--data-urlencode output=json
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published HowLongToBeat Game API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
apishCurrent HowLongToBeat game API · GET · View API reference | $0.002 / billing credit | 0 | —successP50— |
- Pricing
- $0.002
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/game- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
include | URL query parametersquery | string | No | current_players: also the people playing it now and recent backlog adds (one extra page read). |
id | URL query parametersquery | string | No | Game id (`68151`) or a howlongtobeat.com/game link. |
url | URL query parametersquery | string | No | A howlongtobeat.com/game link instead of `id`. |
raw | URL query parametersquery | string | No | 0 leaves out the bulky `raw` source blocks (often 10-30x smaller). enum: "0", "1" |
fields | URL query parametersquery | string | No | Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included. |
fresh | URL query parametersquery | string | No | 1 skips the 24-hour cache and fetches live. enum: "1" |
output | URL query parametersquery | string | No | JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed. enum: "json" |
records | URL query parametersquery | string | No | Native CSV/NDJSON record selector; it has no effect on this JSON-only product. |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
age_ratingsobjectceronullesrbnullpeginull
aliasstringby_platform(object | string)[]completionist_hoursnumberfastest_hoursnumbermain_extra_hoursnull | numbermain_story_hoursnull | integerplatformstringpolledintegerslowest_hoursnumbertotalinteger
by_platform_group(object | string)[]all_styles_hoursnumbercompletionist_hoursnumbermain_extra_hoursnumbermain_story_hoursnumberplatformsstringpolledinteger
cachedbooleancoopbooleancredits_usedintegerdevelopersstring[]genresstring[]idintegerimagestringin_lists(object | string)[]authorstringfollowersintegeridintegernamestring
itch_idnullmultiplayerbooleannamestringparent_idnullplatformsstring[]playersobjectbacklogsintegercompletedintegerplayingintegerreplaysintegerretiredintegertotalinteger
publishersstring[]related_gamesobject[]all_styles_hoursnumberbacklogsintegercompletionist_hoursnumberidintegermain_extra_hoursnumbermain_story_hoursnumbernamestringpolledintegerreview_scoreintegertypestringurlstring
releaseobjecteustringjpstringnastringworldstring
review_countintegerreview_distributionobject5integer10integer15integer20integer25integer30integer35integer40integer45integer50integer55integer60integer65integer70integer75integer80integer85integer90integer95integer100integer
review_scoreintegersingle_playerbooleanstats_updatedstringsteam_app_idintegersummarystringtimesobjectall_stylesobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursintegerpolledintegerslowest_hoursnumber
completionistobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursintegerpolledintegerslowest_hoursnumber
coopobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursnumberpolledintegerslowest_hoursnumber
main_extraobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursnumberpolledintegerslowest_hoursnumber
main_storyobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursintegerpolledintegerslowest_hoursnumber
multiplayerobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursnumberpolledintegerslowest_hoursnumber
speedrun_100objectaverage_hoursnumberfastest_hoursnumbermedian_hoursnumberpolledintegerslowest_hoursnumber
speedrun_anyobjectaverage_hoursnumberfastest_hoursnumbermedian_hoursnumberpolledintegerslowest_hoursinteger
typestringurlstring
Composite rule pricing
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.
| Fee item | Price | Metering source | When | Quantity limit |
|---|---|---|---|---|
| Actual API.SH credits consumed | $0.002000 / billing credit | Response · /credits_used · Numeric value | Always | 1 billing credit · Decimal places: 0 |
Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.002000.
Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.
Pricing parameters and defaults
[]
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example · Official documentation response · Supplier-tr
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 8
Review these request fields before running. Keep the published provider and request method unchanged.
include- current_players: also the people playing it now and recent backlog adds (one extra page read).
id- Game id (`68151`) or a howlongtobeat.com/game link.
url- A howlongtobeat.com/game link instead of `id`.
raw- 0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
fields- Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
fresh- 1 skips the 24-hour cache and fetches live.
output- JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.
records- Native CSV/NDJSON record selector; it has no effect on this JSON-only product.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/game?id=68151&output=json' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "age_ratings": { "cero": null, "esrb": null, "pegi": null }, "alias": "Elden Ring Tarnished Edition", "by_platform": [ { "completionist_hours": 329.15, "fastest_hours": 329.15, "main_extra_hours": null, "main_story_hours": null, "platform": "Emulated", "polled": 1, "slowest_hours": 329.15, "total": 1 }, { "completionist_hours": 144, "fastest_hours": 38, "main_extra_hours": 51.86, "main_story_hours": 39, "platform": "Nintendo Switch 2", "polled": 5, "slowest_hours": 144, "total": 5 }, "… 5 more" ], "by_platform_group": [ { "all_styles_hours": 65.15, "completionist_hours": 144, "main_extra_hours": 51.86, "main_story_hours": 39, "platforms": "Nintendo Switch 2", "polled": 5 }, { "all_styles_hours": 110.56, "completionist_hours": 140.53, "main_extra_hours": 103.85, "main_story_hours": 59.75, "platforms": "PC, PlayStation 5", "polled": 9292 }, "… 2 more" ], "cached": false, "coop": true, "credits_used": 1, "developers": [ "FromSoftware" ], "genres": [ "Third-Person", "Action", "… 2 more" ], "id": 68151, "image": "https://howlongtobeat.com/games/68151_Elden_Ring.jpg", "in_lists": [ { "author": "tiamat911", "followers": 7, "id": 14586, "name": "IGN Playlist Team - GQ's Top 100 Video Games of All Time" }, { "author": "odylanido", "followers": 3, "id": 27056, "name": "Souls/ Soulslike" }, "… 2 more" ], "itch_id": null, "multiplayer": true, "name": "Elden Ring", "parent_id": null, "platforms": [ "Nintendo Switch 2", "PC", "… 4 more" ], "players": { "backlogs": 15459, "completed": 21745, "playing": 395, "replays": 1366, "retired": 1456, "total": 50091 }, "publishers": [ "Bandai Namco Entertainment" ], "related_games": [ { "all_styles_hours": 40.31, "backlogs": 985, "completionist_hours": 51.3, "id": 139385, "main_extra_hours": 39.3, "main_story_hours": 25.66, "name": "Shadow of the Erdtree", "polled": 1311, "review_score": 89, "type": "dlc", "url": "https://howlongtobeat.com/game/139385" } ], "release": { "eu": "2022-02-25", "jp": "2022-02-25", "na": "2022-02-25", "world": "2022-02-25" }, "review_count": 7588, "review_distribution": { "5": 5, "10": 1, "15": 0, "20": 9, "25": 0, "30": 14, "35": 2, "40": 18, "45": 0, "50": 41, "55": 10, "60": 88, "65": 25, "70": 206, "75": 75, "80": 566, "85": 300, "90": 1605, "95": 902, "100": 3949 }, "review_score": 93, "single_player": true, "stats_updated": "2026-11-05 09:25:05", "steam_app_id": 1245620, "summary": "The Golden Order has been broken. Rise, Tarnished, and be guided by grace to brandish the power of the Elden Ring and become an Elden Lord i…", "times": { "all_styles": { "average_hours": 111.19, "fastest_hours": 59.27, "median_hours": 100, "polled": 10715, "slowest_hours": 306.92 }, "completionist": { "average_hours": 142.4, "fastest_hours": 92.6, "median_hours": 130, "polled": 3934, "slowest_hours": 322.23 }, "coop": { "average_hours": 76.68, "fastest_hours": 30.14, "median_hours": 43.4, "polled": 73, "slowest_hours": 330.2 }, "main_extra": { "average_hours": 104.64, "fastest_hours": 65.19, "median_hours": 98.13, "polled": 5015, "slowest_hours": 239.55 }, "main_story": { "average_hours": 60.24, "fastest_hours": 36.53, "median_hours": 60, "polled": 1766, "slowest_hours": 87.06 }, "multiplayer": { "average_hours": 48.67, "fastest_hours": 15.56, "median_hours": 12.5, "polled": 30, "slowest_hours": 160.17 }, "speedrun_100": { "average_hours": 29.81, "fastest_hours": 29.81, "median_hours": 29.81, "polled": 1, "slowest_hours": 29.81 }, "speedrun_any": { "average_hours": 3.98, "fastest_hours": 0.92, "median_hours": 3.65, "polled": 20, "slowest_hours": 10 } }, "type": "game", "url": "https://howlongtobeat.com/game/68151" }