# BC Game Crash Dataset (`geocrawler/bc-game-crash-dataset`) Actor

Fetch historical BC Game Crash rounds via the publisher read-only dataset API. No browser login. Output: game_id, result, color, hash, date.

- **URL**: https://apify.com/geocrawler/bc-game-crash-dataset.md
- **Developed by:** [Geo Crawler](https://apify.com/geocrawler) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 12.9% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

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

## BC Crash Rounds Dataset (Historical)

Export structured **historical BC Crash rounds** in a single Actor run. Each row is one crash round with multiplier, color bucket, provably fair hash, and timestamp. No BC.Game login or browser automation is required on your side.

Results are saved to the run **Dataset** tab (JSON, CSV, Excel, or Apify API).

***

### Pricing (Apify Store)

You pay for **exported rounds** (each row pushed to the run dataset). Typical Store pricing:

- **About $2 per 1,000 results** (pay-per-result event on the default dataset).
- **No separate start fee** when configured that way on the Store listing.
- Default **maxItems** is **1,000** (~$2 per run at that rate if the window has enough data). Raise **maxItems** only when you need more rows (e.g. 5,000 rows ≈ $10).

Apify platform fees and your account plan may apply on top of the Actor’s listed unit price.

***

### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `game_id` | integer | Unique round identifier |
| `result` | number | Crash multiplier (e.g. `2.23` means 2.23×) |
| `color` | string | `orange` (< 2×), `green` (2×–10×), or `yellow` (≥ 10×) |
| `hash` | string | Provably fair hash string |
| `date` | string | Round time in **ISO 8601 UTC** (from provider ingest) |

#### Example record

```json
{
  "game_id": 9723117,
  "result": 2.23,
  "color": "green",
  "hash": "a1b2c3…",
  "date": "2026-10-22T06:28:02.123Z"
}
```

***

### Input parameters

Configure these in the **Input** tab before starting a run.

#### `baseUrl` (string)

- **What it does:** Root URL of the publisher API (no trailing slash).
- **The Actor calls:** `{baseUrl}/api/v1/dataset/rounds`
- **Example:** `https://api.crashgamemonitor.com`
- **Notes:** Use **HTTPS** if the host redirects HTTP → HTTPS. Do not include `/api/v1/...` in this field.

#### `rangeHours` (select) — default `24`

- **What it does:** Fetches rounds whose ingest time falls in the **last N hours** (rolling window from run start).
- **Allowed values:** `1`, `6`, `12`, or `24` (dropdown in Apify Console).
- **When to use:** Quick presets (last hour, last day, etc.).
- **Do not combine** with `from` / `to` in the same run (API rejects both).

#### `from` / `to` (string, optional)

- **What they do:** Fixed **custom time window** instead of `rangeHours`.
- **Format:** ISO 8601, e.g. `2026-10-22T00:00:00.000Z` or `2026-10-22T13:00:00+07:00`
- **Rules:**
  - Both must be set together.
  - `from` must be ≤ `to`.
  - Maximum span: **48 hours** (provider limit).
- **Example input:**

```json
{
  "from": "2026-10-21T12:00:00.000Z",
  "to": "2026-10-22T12:00:00.000Z",
  "maxItems": 2000
}
```

#### `maxItems` (integer) — default `1000`

- **What it does:** Hard cap on how many rows are written to **this run’s** Apify dataset.
- **Range:** `1` … `50000`
- **Behavior:** The Actor paginates until it reaches `maxItems` or runs out of data in the selected window.
- **Tip:** Lower values = faster runs and lower Store cost (~$2 per 1,000 rows at typical listing price).

#### `pageSize` (integer) — default `100`

- **What it does:** Number of rounds requested **per HTTP call** to the publisher API (`page` 1, 2, 3, …).
- **Range:** `1` … `500` (provider maximum).
- **When to change:**
  - Keep `100` for balanced speed.
  - Use `500` for fewer API requests when pulling large `maxItems` (respect provider rate limits).

***

### Example inputs

**Last 24 hours (typical):**

```json
{
  "baseUrl": "https://api.crashgamemonitor.com",
  "rangeHours": 24,
  "maxItems": 1000,
  "pageSize": 100
}
```

**Last 6 hours, small sample:**

```json
{
  "baseUrl": "https://api.crashgamemonitor.com",
  "rangeHours": 6,
  "maxItems": 500,
  "pageSize": 100
}
```

**Custom 12-hour window:**

```json
{
  "baseUrl": "https://api.crashgamemonitor.com",
  "from": "2026-10-22T00:00:00.000Z",
  "to": "2026-10-22T12:00:00.000Z",
  "maxItems": 3000,
  "pageSize": 200
}
```

***

### How to run

1. Open the Actor and click **Start**.
2. In **Input**, set **Dataset API key** (secret field from the publisher). Alternatively, the publisher can store the same value as `DATASET_API_KEY` under **Source → Code → Environment variables** (not the Settings tab).
3. Set other **Input** fields (or use defaults / saved task input).
4. Wait for the run to finish (**Succeeded**).
5. Open **Dataset** → preview, download, or connect via [Apify API](https://docs.apify.com/api/v2).

Runs may log pagination progress (page N, items pushed). On HTTP **429**, the Actor retries with backoff automatically.

***

### Good to know

- Data is **historical** from the provider’s maintained database, not a live scrape from your BC.Game account.
- Freshness depends on the provider’s ingest pipeline; updates are periodic, not guaranteed every second.
- During provider maintenance, you may get fewer rows or older timestamps.
- Color buckets follow the provider’s classification rules (aligned with their analytics product).

***

### Disclaimer

This Actor is **not** officially affiliated with, sponsored by, or endorsed by BC.Game. Use the data responsibly and in compliance with applicable laws and terms of service.

# Actor input Schema

## `datasetApiKey` (type: `string`):

Bearer token from the publisher (same value as DATASET_API_KEY on the server). Optional if you set the DATASET_API_KEY environment variable under Source → Code → Environment variables.

## `baseUrl` (type: `string`):

Publisher API root without trailing slash. The Actor requests GET {baseUrl}/api/v1/dataset/rounds. Example: https://api.crashgamemonitor.com

## `rangeHours` (type: `string`):

Last N hours of data. Leave unset if you use from+to instead — do not set both.

## `from` (type: `string`):

Optional. Start of custom range, e.g. 2026-10-22T00:00:00.000Z. Must be used with to. Max span 48 hours.

## `to` (type: `string`):

Optional. End of custom range. Must be used with from.

## `maxItems` (type: `integer`):

Maximum rounds written to this run’s Apify dataset (1–50000). Stops when cap is reached or no more data. On Apify Store, billing is per dataset item (~$2 per 1,000 rows); lower maxItems = lower cost per run.

## `pageSize` (type: `integer`):

Rounds per HTTP request when paginating (1–500). Higher = fewer requests; default 100 is usually best.

## Actor input object example

```json
{
  "baseUrl": "https://api.crashgamemonitor.com",
  "rangeHours": "24",
  "maxItems": 1000,
  "pageSize": 100
}
```

# Actor output Schema

## `rounds` (type: `string`):

One dataset item per round: game_id, result (multiplier), color, hash, date (ISO 8601 UTC).

## `summary` (type: `string`):

JSON object with totalItems, baseUrl, rangeHours or from/to, and apiVersion.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("geocrawler/bc-game-crash-dataset").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("geocrawler/bc-game-crash-dataset").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 '{}' |
apify call geocrawler/bc-game-crash-dataset --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,geocrawler/bc-game-crash-dataset"
        }
    }
}
```

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/u8GfqcHBQCWM0KUL6/builds/YJhDXXzvZObUXZTjU/openapi.json
