# Howlongtobeat Scraper (`bigibyte/howlongtobeat-scraper`) Actor

Extract clean HowLongToBeat game stats like completion counts, review scores, and aliases into JSON, CSV, or Excel by providing game IDs.

- **URL**: https://apify.com/bigibyte/howlongtobeat-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## HowLongToBeat Scraper

![HowLongToBeat Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/howlongtobeat-scraper-cover.png)

Collect game statistics from HowLongToBeat and turn individual game pages into structured datasets. Provide one or more game IDs to retrieve completion counts, player activity statistics, review scores, game aliases, and image filenames. Export your results in JSON, CSV, Excel, and other supported formats for gaming research, catalog enrichment, and data analysis.

### What It Does

HowLongToBeat Scraper collects publicly accessible information from individual game pages and organizes it into structured dataset records.

It supports multiple game IDs, extracts the available game information, preserves the original field names and collection timestamps. Duplicate records are skipped using a hash of the collected game fields.

### Available Mode

**Game Page**

Collects information from a specific HowLongToBeat game page using its numeric game ID. Each game is processed individually, and its available statistics are saved as a dataset record.

### Input Example

```json
{
  "mode": "game",
  "gameIds": ["68151"],
  "requestDelayMs": 1000
}
```

#### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `game` | Selects the game page collection mode. |
| `gameIds` | array | `["68151"]` | Numeric HowLongToBeat game IDs to collect. |
| `userAgent` | string | `ActorResearch/1.0` | User-Agent value used for requests. |
| `requestDelayMs` | integer | `1000` | Delay between requests, in milliseconds. |
| `timeoutSecs` | integer | `300` | Maximum overall run duration in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout for an individual request, in seconds. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. A proxy is not required for most runs. |

### Output Example

Each successfully processed game is saved as a separate dataset record.

```json
{
  "count_discussion": 2,
  "game_id": 68151,
  "game_name": "Elden Ring",
  "game_name_date": 0,
  "count_playing": 401,
  "count_backlog": 15339,
  "count_replay": 1359,
  "count_custom": 11,
  "count_comp": 21607,
  "count_retired": 1440,
  "count_review": 7544,
  "review_score": 93,
  "game_alias": "Elden Ring Tarnished Edition",
  "game_image": "68151_Elden_Ring.jpg",
  "scrapedAt": "2026-10-26T00:00:00+00:00"\
}
```

#### Output Fields

| Field | Description |
|---|---|
| `count_discussion` | Number of discussions associated with the game. |
| `game_id` | Unique HowLongToBeat game identifier. |
| `game_name` | Game title. |
| `game_name_date` | Date-related value associated with the game name. |
| `count_playing` | Number of users currently playing the game. |
| `count_backlog` | Number of users who have the game in their backlog. |
| `count_replay` | Number of users who have replayed or plan to replay the game. |
| `count_custom` | Number of custom entries associated with the game. |
| `count_comp` | Number of users who have completed the game. |
| `count_retired` | Number of users who have retired from playing the game. |
| `count_review` | Number of reviews recorded for the game. |
| `review_score` | Game review score displayed in the collected data. |
| `game_alias` | Alternative name associated with the game. |
| `game_image` | Game image filename. |
| `scrapedAt` | Timestamp indicating when the record was collected. |

### Use Cases

- **Game completion research:** Analyze playing, backlog, replay, and completion statistics across selected games.
- **Gaming catalog enrichment:** Add review scores, game aliases, and player activity counts to an existing game database.
- **Player interest analysis:** Compare engagement statistics across different games.
- **Gaming dataset building:** Create structured collections of game information for research and analytics projects.
- **Historical comparisons:** Run recurring collections for selected game IDs and compare changes in available statistics over time.

### Usage and Limits

- **Game ID input:** Provide one or more numeric IDs through `gameIds`.
- **Collection mode:** The actor currently supports the `game` mode.
- **Request pacing:** The default delay is 1,000 milliseconds between requests. Adjust `requestDelayMs` to control request frequency.
- **Duplicate handling:** Duplicate records are skipped using a hash of the collected game fields.
- **Error handling:** Failed requests are recorded as error rows so the run can continue where possible.
- **Export formats:** Export the resulting dataset in JSON, CSV, Excel, and other supported Apify formats.

### Frequently Asked Questions

**What does HowLongToBeat Scraper collect?**

It collects game identifiers, titles, player activity counts, completion statistics, review scores, aliases, and image filenames from individual game pages.

**Can I collect information for multiple games?**

Yes. Add multiple numeric game IDs to the `gameIds` array. Each successfully processed game is saved as an individual dataset record.

**Can I search for games by title?**

The current actor uses numeric HowLongToBeat game IDs rather than title-based searches. Provide the game IDs you want to collect.

**Can I export the results to Excel or CSV?**

Yes. The collected dataset supports JSON, CSV, Excel, and other available Apify export formats.

**Can I schedule recurring collections?**

Yes. Use Apify schedules to refresh selected game IDs automatically at your preferred intervals.

**What happens when a game page cannot be accessed?**

The scraper records an error row and continues processing other game IDs where possible.

**Why might a live collection return an error or incomplete data?**

HowLongToBeat may occasionally restrict automated requests or return pages without the expected game information. Page availability and access restrictions can affect individual results.

**Do I need a proxy to run this scraper?**

No. Proxy configuration is optional and disabled by default. However, some access restrictions may affect live collection results.

### Related Tools

Explore more data collection solutions from BigiByte:

- **JPL Asteroid Close Approach Scraper** – Collect information about asteroid close approaches for scientific research.
- **JPL Fireball Events Scraper** – Gather publicly available data about recorded fireball events.
- **AniList Anime Scraper** – Collect anime catalog information for entertainment research and dataset building.

Looking for a scraper tailored to your gaming platform, research, or business requirements? BigiByte can help you build custom web scrapers and data solutions.

Visit [BigiByte](https://bigibyte.com) to explore our services.

### Trademark Notice

HowLongToBeat and its associated names, logos, and trademarks are the property of their respective owners. They are mentioned only to identify the source and subject of the collected information. This actor is not affiliated with, sponsored by, or endorsed by HowLongToBeat or its owners.

### Disclaimer

This actor is an independent data collection tool. Users are responsible for reviewing applicable terms, respecting content ownership, and ensuring that their use of collected information complies with relevant laws and policies.

### Is Web Scraping Legal?

This actor extracts publicly accessible data without bypassing login screens, paywalls, or technical security layers. While collecting public web data is widely permitted, compliance depends on how data is gathered and used:

- **Personal data:** Follow applicable privacy laws, including GDPR and CCPA, when collecting or processing personal information. Avoid using personal identifiers in ways that violate privacy requirements.
- **Copyrighted content:** Game descriptions, images, and other creative materials may be protected by copyright. Avoid copying, redistributing, or republishing such content without the necessary permission.
- **Platform terms and rate limits:** Collect information responsibly, avoid excessive traffic, and respect applicable platform policies, terms, and request limits.

This information is provided for educational purposes only and does not constitute legal advice. For a more detailed explanation, read [Apify's guide to web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Game page parses **NEXT_DATA** for one game ID.

## `gameIds` (type: `array`):

HowLongToBeat game IDs (for example 68151 for Elden Ring).

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds (about 1 request per second by default).

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "game",
  "gameIds": [
    "68151"
  ],
  "userAgent": "ActorResearch/1.0",
  "requestDelayMs": 1000,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "gameIds": [
        "68151"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/howlongtobeat-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "gameIds": ["68151"] }

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/howlongtobeat-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "gameIds": [
    "68151"
  ]
}' |
apify call bigibyte/howlongtobeat-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/howlongtobeat-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LrPOeX0fBfVlMvz55/builds/H24v3rNSQ5uVq9wEO/openapi.json
