# 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.

Documentation: https://openany.si/market/apis/howlongtobeat/howlongtobeat-game-api/?offering=25fc7a9d-e3af-4551-9e7d-adf587fbd787
API ID: 25fc7a9d-e3af-4551-9e7d-adf587fbd787
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/game
Page update time: 2026-12-03T02:45:30.607Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:45:29.728Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "HowLongToBeat game API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "include": {
          "type": "string",
          "description": "current_players: also the people playing it now and recent backlog adds (one extra page read)."
        },
        "id": {
          "type": "string",
          "description": "Game id (`68151`) or a howlongtobeat.com/game link."
        },
        "url": {
          "type": "string",
          "description": "A howlongtobeat.com/game link instead of `id`."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "age_ratings": {
      "type": "object",
      "properties": {
        "cero": {
          "type": "null"
        },
        "esrb": {
          "type": "null"
        },
        "pegi": {
          "type": "null"
        }
      }
    },
    "alias": {
      "type": "string"
    },
    "by_platform": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "completionist_hours": {
                "type": "number"
              },
              "fastest_hours": {
                "type": "number"
              },
              "main_extra_hours": {
                "anyOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "main_story_hours": {
                "anyOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "platform": {
                "type": "string"
              },
              "polled": {
                "type": "integer"
              },
              "slowest_hours": {
                "type": "number"
              },
              "total": {
                "type": "integer"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "by_platform_group": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "all_styles_hours": {
                "type": "number"
              },
              "completionist_hours": {
                "type": "number"
              },
              "main_extra_hours": {
                "type": "number"
              },
              "main_story_hours": {
                "type": "number"
              },
              "platforms": {
                "type": "string"
              },
              "polled": {
                "type": "integer"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "cached": {
      "type": "boolean"
    },
    "coop": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "developers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "genres": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "id": {
      "type": "integer"
    },
    "image": {
      "type": "string"
    },
    "in_lists": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "author": {
                "type": "string"
              },
              "followers": {
                "type": "integer"
              },
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "itch_id": {
      "type": "null"
    },
    "multiplayer": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "parent_id": {
      "type": "null"
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "players": {
      "type": "object",
      "properties": {
        "backlogs": {
          "type": "integer"
        },
        "completed": {
          "type": "integer"
        },
        "playing": {
          "type": "integer"
        },
        "replays": {
          "type": "integer"
        },
        "retired": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "publishers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "related_games": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "all_styles_hours": {
            "type": "number"
          },
          "backlogs": {
            "type": "integer"
          },
          "completionist_hours": {
            "type": "number"
          },
          "id": {
            "type": "integer"
          },
          "main_extra_hours": {
            "type": "number"
          },
          "main_story_hours": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "polled": {
            "type": "integer"
          },
          "review_score": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    },
    "release": {
      "type": "object",
      "properties": {
        "eu": {
          "type": "string"
        },
        "jp": {
          "type": "string"
        },
        "na": {
          "type": "string"
        },
        "world": {
          "type": "string"
        }
      }
    },
    "review_count": {
      "type": "integer"
    },
    "review_distribution": {
      "type": "object",
      "properties": {
        "5": {
          "type": "integer"
        },
        "10": {
          "type": "integer"
        },
        "15": {
          "type": "integer"
        },
        "20": {
          "type": "integer"
        },
        "25": {
          "type": "integer"
        },
        "30": {
          "type": "integer"
        },
        "35": {
          "type": "integer"
        },
        "40": {
          "type": "integer"
        },
        "45": {
          "type": "integer"
        },
        "50": {
          "type": "integer"
        },
        "55": {
          "type": "integer"
        },
        "60": {
          "type": "integer"
        },
        "65": {
          "type": "integer"
        },
        "70": {
          "type": "integer"
        },
        "75": {
          "type": "integer"
        },
        "80": {
          "type": "integer"
        },
        "85": {
          "type": "integer"
        },
        "90": {
          "type": "integer"
        },
        "95": {
          "type": "integer"
        },
        "100": {
          "type": "integer"
        }
      }
    },
    "review_score": {
      "type": "integer"
    },
    "single_player": {
      "type": "boolean"
    },
    "stats_updated": {
      "type": "string"
    },
    "steam_app_id": {
      "type": "integer"
    },
    "summary": {
      "type": "string"
    },
    "times": {
      "type": "object",
      "properties": {
        "all_styles": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "integer"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "completionist": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "integer"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "coop": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "number"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "main_extra": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "number"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "main_story": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "integer"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "multiplayer": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "number"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "speedrun_100": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "number"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "number"
            }
          }
        },
        "speedrun_any": {
          "type": "object",
          "properties": {
            "average_hours": {
              "type": "number"
            },
            "fastest_hours": {
              "type": "number"
            },
            "median_hours": {
              "type": "number"
            },
            "polled": {
              "type": "integer"
            },
            "slowest_hours": {
              "type": "integer"
            }
          }
        }
      }
    },
    "type": {
      "type": "string"
    },
    "url": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  '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'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "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"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/howlongtobeat/howlongtobeat-game-api/?offering=25fc7a9d-e3af-4551-9e7d-adf587fbd787

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
