# Bitcoin Mempool Fees Scraper (`zerobreak/bitcoin-mempool-fees-scraper`) Actor

Bitcoin Mempool Fees Scraper is a Python tool designed to extract real-time mempool transaction fee rates, priority estimates (low, medium, high), and unconfirmed transaction counts from blockchain data providers. It exports structured cryptocurrency network fee datasets into clean  format

- **URL**: https://apify.com/zerobreak/bitcoin-mempool-fees-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### Bitcoin Mempool & Fees Scraper — Bitcoin Fees, Blocks, and Mempool Statistics

### Overview

Bitcoin Mempool & Fees Scraper collects publicly available Bitcoin network data, including recommended transaction fees, mempool statistics, recent blocks, and Bitcoin address activity.

Choose which data categories to collect, then review the results in an Apify dataset. Export the collected data as JSON, CSV, or Excel for analysis, reporting, and monitoring.

By default, the actor collects recommended transaction fees and mempool statistics.

### Features

- **Recommended transaction fees:** Collect fastest, half-hour, hourly, economy, and minimum fee rates in sat/vB.
- **Mempool monitoring:** Retrieve pending transaction counts, virtual size, total fees, and fee-rate histogram data.
- **Recent block information:** Collect block hashes, heights, transaction counts, rewards, and mining pool details when available.
- **Bitcoin address lookups:** Retrieve confirmed and unconfirmed activity statistics for specified addresses.
- **Configurable collection:** Select one or more data modes and configure the number of recent blocks to include.
- **Structured datasets:** Store results in a format suitable for spreadsheets, dashboards, and data analysis.
- **Duplicate reduction:** Skip duplicate block hashes and repeated addresses during collection.

### Use Cases

- **Fee monitoring:** Compare recommended Bitcoin transaction fee rates over time.
- **Mempool analysis:** Track pending transactions and changes in network congestion.
- **Block monitoring:** Review recent block heights, transaction counts, rewards, and mining pool information.
- **Address analysis:** Examine confirmed and unconfirmed activity statistics for a Bitcoin address.
- **Spreadsheet reporting:** Export fee snapshots and network statistics for further analysis.
- **Monitoring workflows:** Use collected data to support alerts and reports when fee rates or mempool size change significantly.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `modes` | Array | `["fees", "mempool"]` | Data categories to collect: `fees`, `mempool`, `blocks`, and `address`. |
| `addresses` | Array | `[]` | Bitcoin addresses to look up when `address` mode is enabled. |
| `blockCount` | Integer | `15` | Maximum number of recent blocks to retain from the available latest-block results. |
| `maxItems` | Integer | `100` | Maximum number of dataset rows to collect. Maximum: `1000`. |

### Example Input

```json
{
  "modes": ["fees", "mempool"],
  "addresses": [],
  "blockCount": 15,
  "maxItems": 100
}
```

To include recent blocks, add `blocks` to the `modes` array.

To look up a Bitcoin address, enable `address` mode and provide one or more addresses:

```json
{
  "modes": ["fees", "mempool", "address"],
  "addresses": [
    "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  ],
  "blockCount": 15,
  "maxItems": 100
}
```

### What Data Does This Actor Extract?

The actor produces structured dataset rows for each selected collection mode. Available fields depend on the mode and the data returned during collection.

#### Extracted Data Fields

| Field | Type | Description |
|---|---|---|
| `mode` | String | Collection category: `fees`, `mempool`, `blocks`, or `address`. |
| `scraped_at` | String | Timestamp indicating when the row was created, in UTC. |
| `fastestFee` | Integer | Recommended fee rate for faster confirmation, in sat/vB. |
| `halfHourFee` | Integer | Recommended fee rate for an approximate 30-minute confirmation target, in sat/vB. |
| `hourFee` | Integer | Recommended fee rate for an approximate one-hour confirmation target, in sat/vB. |
| `economyFee` | Integer | Lower recommended fee rate for transactions that can wait longer, in sat/vB. |
| `minimumFee` | Integer | Reported minimum recommended fee rate, in sat/vB. |
| `count` | Integer | Number of transactions waiting in the mempool. |
| `vsize` | Integer | Mempool virtual size. |
| `total_fee` | Integer | Aggregate mempool transaction fees, expressed in satoshis when supplied by the source. |
| `fee_histogram` | Array | Fee-rate histogram data describing the mempool. |
| `id` | String | Block identifier or hash. |
| `height` | Integer | Block height. |
| `tx_count` | Integer | Number of transactions in a block. |
| `size` | Integer | Block size. |
| `weight` | Integer | Block weight. |
| `difficulty` | Number | Reported mining difficulty. |
| `reward` | Number | Block reward value, as returned by the source. |
| `medianFee` | Number | Reported median transaction fee rate for a block. |
| `totalFees` | Number | Total transaction fees reported for a block. |
| `poolName` | String | Mining pool name, when available. |
| `address` | String | Bitcoin address being examined. |
| `chain_stats` fields | Object fields | Confirmed transaction and value statistics, flattened into columns where available. |
| `mempool_stats` fields | Object fields | Unconfirmed transaction and value statistics, flattened into columns where available. |

Block rows can also include additional transaction counters and block statistics when available. Large raw hexadecimal values, such as coinbase transaction data and block header hex, are excluded from the standard tabular output.

### Example Output

A fee-mode dataset row may look like this:

```json
{
  "fastestFee": 1,
  "halfHourFee": 1,
  "hourFee": 1,
  "economyFee": 1,
  "minimumFee": 1,
  "mode": "fees",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}
```

The numeric values above are illustrative examples, not live fee recommendations.

### Data by Mode

| Mode | Data collected |
|---|---|
| `fees` | Recommended Bitcoin transaction fee rates. |
| `mempool` | Pending transaction totals, virtual size, fee totals, and fee histogram. |
| `blocks` | Recent block information, including height, hash, transaction counts, rewards, and mining pool details when available. |
| `address` | Confirmed and unconfirmed activity statistics for each supplied Bitcoin address. |

### Working with Your Dataset

After the actor finishes running:

1. Open the actor's dataset.
2. Review the collected rows and fields.
3. Export the results as JSON, CSV, or Excel.
4. Use the exported data for reporting, historical comparisons, or your own analysis workflows.

### Important Notes

- Fee rates and mempool statistics change as Bitcoin network conditions evolve. Each run represents data available at collection time.
- The recent-block collection uses the latest available block results. It does not provide comprehensive historical block pagination.
- The configured `blockCount` controls how many of the available recent blocks are retained; it does not retrieve an unlimited block history.
- Address lookups require valid Bitcoin addresses.
- The fields returned for blocks and addresses can vary depending on the available data.
- The actor does not provide transaction-ID lookups.

### FAQ

**How often should I collect fee data?**

That depends on your monitoring needs. Run the actor periodically to build a history of fee rates and mempool conditions.

**Can I collect only block data?**

Yes. Set `modes` to `["blocks"]` to focus on recent blocks.

**Can I look up multiple Bitcoin addresses?**

Yes. Enable `address` mode and provide the addresses in the `addresses` array.

**Why does the actor return only a limited number of recent blocks?**

The collection uses the latest available block results rather than traversing older block heights. The `blockCount` parameter controls how many of those recent results are retained.

**Can I export the results for analysis?**

Yes. The Apify dataset can be exported as JSON, CSV, or Excel.

### Disclaimer

This actor is an independent data collection tool and is not affiliated with or endorsed by mempool.space or Bitcoin. Data availability and accuracy depend on the publicly available information at collection time. Verify important figures independently before using them for financial or operational decisions.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. Scraping is not the same thing as hacking, and there is no single law that bans it. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `modes` (type: `array`):

Which pulls to run. Allowed values: fees (recommended sat/vB), mempool (queue size and fee histogram), blocks (latest blocks page), address (one row per address). One mode per line.

## `addresses` (type: `array`):

Bitcoin addresses to look up when address mode is selected. One address per line. Ignored for fees, mempool, and blocks. Example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.

## `blockCount` (type: `integer`):

How many recent blocks to keep from the latest blocks response. That endpoint returns one page, usually 15 blocks.

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

Maximum dataset rows per run, including error rows. Free cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between HTTP calls. Minimum 0.5 so the public API is not hammered.

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

Overall time limit for the run, in seconds. The actor stops fetching when this elapses and keeps rows already collected.

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

Per-request HTTP timeout in seconds.

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

Optional proxy for requests. Leave useApifyProxy false to call mempool.space directly. Turn on Apify Proxy only if your IP is blocked.

## Actor input object example

```json
{
  "modes": [
    "fees",
    "mempool"
  ],
  "addresses": [
    "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  ],
  "blockCount": 15,
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset with fee, mempool, block, and address rows.

## `datasetItems` (type: `string`):

JSON items from the default dataset.

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

Table view of the default dataset.

# 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 = {
    "modes": [
        "fees",
        "mempool"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/bitcoin-mempool-fees-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 = {
    "modes": [
        "fees",
        "mempool",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/bitcoin-mempool-fees-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 '{
  "modes": [
    "fees",
    "mempool"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call zerobreak/bitcoin-mempool-fees-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/bitcoin-mempool-fees-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/3gez2QONUSOIKkJzg/builds/LAcD5LYW6EE0i9Jsy/openapi.json
