# HowLongToBeat search API

Search HowLongToBeat games by title, platform, genre and playtime range via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, q, and retrieve structured data including game identifier, main-story duration estimate, completionist duration estimate, and resolved search filters for game discovery, and catalogue browsing.

Documentation: https://openany.si/market/apis/howlongtobeat/howlongtobeat-search-api/?offering=cfbf788c-e3fa-42db-a70c-403ec2f25757
API ID: cfbf788c-e3fa-42db-a70c-403ec2f25757
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/search
Page update time: 2026-12-03T02:45:30.631Z
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.890Z. 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 search 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": {
        "q": {
          "type": "string",
          "description": "Search text (empty: all games, sorted)."
        },
        "sort": {
          "type": "string",
          "description": "Sort (default popular).",
          "enum": [
            "popular",
            "name",
            "main",
            "mainp",
            "comp",
            "averagea",
            "rating",
            "backlog",
            "usersp",
            "playing",
            "speedruns",
            "reviews",
            "release"
          ]
        },
        "reverse": {
          "type": "string",
          "description": "`true`: reverse the sort.",
          "enum": [
            "true",
            "false"
          ]
        },
        "platform": {
          "type": "string",
          "description": "Comma separated platform names as on the site (e.g. PC, PlayStation 5, Nintendo Switch)."
        },
        "platform_mode": {
          "type": "string",
          "description": "Include (default) or exclude the platforms.",
          "enum": [
            "include",
            "exclude"
          ]
        },
        "perspective": {
          "type": "string",
          "description": "Comma separated: First-Person, Isometric, Side, Text, Third-Person, Top-Down, Virtual Reality."
        },
        "perspective_mode": {
          "type": "string",
          "description": "Include or exclude.",
          "enum": [
            "include",
            "exclude"
          ]
        },
        "flow": {
          "type": "string",
          "description": "Comma separated: Incremental, Massively Multiplayer, Multidirectional, On-Rails, Point-and-Click, Real-Time, Scrolling, Turn-Based."
        },
        "flow_mode": {
          "type": "string",
          "description": "Include or exclude.",
          "enum": [
            "include",
            "exclude"
          ]
        },
        "genre": {
          "type": "string",
          "description": "Comma separated genres as on the site (e.g. Action, Role-Playing, Open World, Strategy/Tactical)."
        },
        "genre_mode": {
          "type": "string",
          "description": "Include or exclude.",
          "enum": [
            "include",
            "exclude"
          ]
        },
        "year": {
          "type": "string",
          "description": "Comma separated release years."
        },
        "year_mode": {
          "type": "string",
          "description": "Include or exclude.",
          "enum": [
            "include",
            "exclude"
          ]
        },
        "range": {
          "type": "string",
          "description": "Which time the hour range applies to (default main).",
          "enum": [
            "main",
            "mainp",
            "comp",
            "averagea"
          ]
        },
        "hours_min": {
          "type": "integer",
          "description": "Shortest length in hours."
        },
        "hours_max": {
          "type": "integer",
          "description": "Longest length in hours."
        },
        "modifier": {
          "type": "string",
          "description": "Hide or isolate DLC, mods, hacks.",
          "enum": [
            "hide_dlc",
            "only_dlc",
            "only_mods",
            "only_hacks"
          ]
        },
        "game_pass": {
          "type": "string",
          "description": "`true`: only Game Pass titles.",
          "enum": [
            "true",
            "false"
          ]
        },
        "page": {
          "type": "integer",
          "description": "Page number from 1 (20 per page)."
        },
        "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": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "gameplay": {
          "type": "object",
          "properties": {
            "flow": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {}
                }
              }
            },
            "genre": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {}
                }
              }
            },
            "perspective": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          }
        },
        "modifier": {
          "type": "string"
        },
        "platform": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string"
            },
            "values": {
              "type": "array",
              "items": {}
            }
          }
        },
        "range": {
          "type": "string"
        },
        "rangeTime": {
          "type": "object",
          "properties": {
            "max": {
              "type": "null"
            },
            "min": {
              "type": "null"
            }
          }
        },
        "sort": {
          "type": "string"
        },
        "year": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string"
            },
            "values": {
              "type": "array",
              "items": {}
            }
          }
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "alias": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "all_styles_count": {
                "type": "integer"
              },
              "all_styles_hours": {
                "type": "number"
              },
              "backlogs": {
                "type": "integer"
              },
              "completed": {
                "type": "integer"
              },
              "completionist_count": {
                "type": "integer"
              },
              "completionist_hours": {
                "type": "number"
              },
              "coop": {
                "type": "boolean"
              },
              "coop_hours": {
                "type": "number"
              },
              "id": {
                "type": "integer"
              },
              "image": {
                "type": "string"
              },
              "main_extra_count": {
                "type": "integer"
              },
              "main_extra_hours": {
                "type": "number"
              },
              "main_story_count": {
                "type": "integer"
              },
              "main_story_hours": {
                "type": "number"
              },
              "multiplayer": {
                "type": "boolean"
              },
              "multiplayer_hours": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "platforms": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "playing": {
                "type": "integer"
              },
              "popularity_rank": {
                "type": "integer"
              },
              "release_year": {
                "type": "integer"
              },
              "retired": {
                "type": "integer"
              },
              "review_score": {
                "type": "integer"
              },
              "reviews": {
                "type": "integer"
              },
              "single_player": {
                "type": "boolean"
              },
              "speedruns": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "next_page": {
      "type": "null"
    },
    "page": {
      "type": "integer"
    },
    "pages": {
      "type": "integer"
    },
    "query": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/howlongtobeat/v1/search?output=json&q=elden+ring' \
  -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
{
  "applied_filters": {
    "gameplay": {
      "flow": {
        "mode": "include",
        "values": []
      },
      "genre": {
        "mode": "include",
        "values": []
      },
      "perspective": {
        "mode": "include",
        "values": []
      }
    },
    "modifier": "",
    "platform": {
      "mode": "include",
      "values": []
    },
    "range": "main",
    "rangeTime": {
      "max": null,
      "min": null
    },
    "sort": "popular",
    "year": {
      "mode": "include",
      "values": []
    }
  },
  "cached": false,
  "count": 6,
  "credits_used": 1,
  "items": [
    {
      "alias": "Elden Ring Tarnished Edition",
      "all_styles_count": 10715,
      "all_styles_hours": 105.6,
      "backlogs": 15463,
      "completed": 21749,
      "completionist_count": 3934,
      "completionist_hours": 136.2,
      "coop": true,
      "coop_hours": 60.04,
      "id": 68151,
      "image": "https://howlongtobeat.com/games/68151_Elden_Ring.jpg",
      "main_extra_count": 5015,
      "main_extra_hours": 101.38,
      "main_story_count": 1766,
      "main_story_hours": 60.13,
      "multiplayer": true,
      "multiplayer_hours": 30.58,
      "name": "Elden Ring",
      "platforms": [
        "Nintendo Switch 2",
        "PC",
        "… 4 more"
      ],
      "playing": 392,
      "popularity_rank": 1014,
      "release_year": 2022,
      "retired": 1455,
      "review_score": 93,
      "reviews": 7590,
      "single_player": true,
      "speedruns": 21,
      "type": "game",
      "url": "https://howlongtobeat.com/game/68151"
    },
    {
      "alias": null,
      "all_styles_count": 577,
      "all_styles_hours": 45.15,
      "backlogs": 1043,
      "completed": 1224,
      "completionist_count": 208,
      "completionist_hours": 68.58,
      "coop": true,
      "coop_hours": 54.64,
      "id": 160589,
      "image": "https://howlongtobeat.com/games/160589_Elden_Ring_Nightreign.jpg",
      "main_extra_count": 179,
      "main_extra_hours": 40.96,
      "main_story_count": 190,
      "main_story_hours": 28.49,
      "multiplayer": false,
      "multiplayer_hours": null,
      "name": "Elden Ring: Nightreign",
      "platforms": [
        "PC",
        "PlayStation 4",
        "… 3 more"
      ],
      "playing": 80,
      "popularity_rank": 223,
      "release_year": 2025,
      "retired": 119,
      "review_score": 79,
      "reviews": 561,
      "single_player": true,
      "speedruns": 0,
      "type": "multi",
      "url": "https://howlongtobeat.com/game/160589"
    },
    "… 4 more"
  ],
  "next_page": null,
  "page": 1,
  "pages": 1,
  "query": "elden ring",
  "total": 6
}
```

## 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-search-api/?offering=cfbf788c-e3fa-42db-a70c-403ec2f25757

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