Request a demo

Public dataset · Economy, finance and crypto

Bitcoin Blockchain (crypto_bitcoin) in BigQuery

The full Bitcoin blockchain as four views: blocks, transactions (with nested inputs and outputs), inputs and outputs. A SELECT * on transactions scans 2.39 TiB, more than two months of free tier, while a one-month query on a few columns costs about 0.3 GiB because time filters prune partitions.

bigquery-public-data.crypto_bitcoin · Google · US · Sizes measured November 23, 2026

4tables
5.5 TiBlogical size
Viewssizes are dry-run scan estimates
$34.15to scan every column once, on-demand

The dataset description calls it a comprehensive dataset of Bitcoin blockchain data, maintained by Google, and links to the Bitcoin Blockchain listing in BigQuery sharing (Analytics Hub). All four objects are views, so BigQuery shows no row counts or storage size for them; the sizes below are dry-run estimates of a SELECT *.

blocks has one row per block (hash, number, timestamp, timestamp_month, size, weight, transaction_count). transactions has one row per transaction with fee, input_value, output_value, is_coinbase, block_timestamp, block_timestamp_month and the nested repeated records inputs and outputs. inputs and outputs are the same data flattened to one row per input or output, with addresses and value.

Note that hash is a reserved keyword in GoogleSQL, so write it with backticks in queries (` hash `) or you get a syntax error.

Tables and sizes

TableRowsSizeFull scanLayout
transactions
One row per transaction with nested inputs and outputs. View: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *.
View2.4 TiB$14.94None
inputs
One row per transaction input. View: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *.
View1.8 TiB$11.17None
outputs
One row per transaction output. View: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *.
View1.3 TiB$8.03None
blocks
One row per block. View: BigQuery reports no row count for views; size is the dry-run estimate for SELECT *.
View316 MiBunder $0.01None

Full scan = every column of the table at the on-demand list price of $6.25 per TiB, before your free TiB each month. Selecting fewer columns costs proportionally less. See BigQuery pricing.

Example queries

Every transaction with SELECT * (very expensive)

Scans 2.4 TiB · $14.94 on-demand

Dry run: 2.39 TiB, about $14.94 at on-demand list price on top of using up the whole free tier. Never run this.

SELECT *
FROM `bigquery-public-data.crypto_bitcoin.transactions`;

Daily transactions and fees, full history (expensive)

Scans 33.2 GiB · $0.20 on-demand

Three small columns, no time filter: 33.20 GiB as an upper bound.

SELECT
  DATE(block_timestamp) AS day,
  COUNT(*) AS transactions,
  SUM(fee) AS total_fee
FROM `bigquery-public-data.crypto_bitcoin.transactions`
GROUP BY day
ORDER BY day;

Daily transactions and fees for one month (cheap)

Scans 337 MiB · under $0.01 on-demand

The same query restricted to April 2024 with a block_timestamp range: 337 MiB, about 100 times less. Time filters prune the underlying partitions.

SELECT
  DATE(block_timestamp) AS day,
  COUNT(*) AS transactions,
  SUM(fee) AS total_fee
FROM `bigquery-public-data.crypto_bitcoin.transactions`
WHERE block_timestamp >= '2024-04-01'
  AND block_timestamp < '2024-05-01'
GROUP BY day
ORDER BY day;

Largest transactions by output value in a month

Scans 1.2 GiB · under $0.01 on-demand

hash is a reserved word, hence the backticks.

SELECT
  `hash`,
  block_timestamp,
  output_value
FROM `bigquery-public-data.crypto_bitcoin.transactions`
WHERE block_timestamp >= '2024-04-01'
  AND block_timestamp < '2024-05-01'
ORDER BY output_value DESC
LIMIT 10;

Blocks, transactions and average block size per month

Scans 22.4 MiB · under $0.01 on-demand

The blocks view is only 316 MiB in total.

SELECT
  timestamp_month,
  COUNT(*) AS blocks,
  SUM(transaction_count) AS transactions,
  ROUND(AVG(size) / 1e6, 2) AS avg_block_mb
FROM `bigquery-public-data.crypto_bitcoin.blocks`
WHERE timestamp_month >= '2024-01-01'
GROUP BY timestamp_month
ORDER BY timestamp_month;

Querying it cheaply

  • Never run SELECT * on transactions (2.39 TiB), inputs (1.79 TiB) or outputs (1.28 TiB). In a dry run the nested inputs and outputs arrays alone are 2.05 TiB of the transactions view.
  • Always filter on block_timestamp (or block_timestamp_month). In dry runs, April 2024 on transactions cost 337 MiB with a block_timestamp range and 449 MiB with block_timestamp_month = '2024-04-01' (one more column read), against 33.20 GiB for the full history.
  • These are views, so dry runs report an upper bound (UPPER_BOUND accuracy). The bytes billed can be lower but will not be higher.
  • Leave out script_asm and script_hex unless you analyse scripts: in the inputs view those two columns alone are 0.75 TiB of 1.79 TiB.
  • Set a maximum bytes billed on every query against this dataset.

FAQ

How much does it cost to query Bitcoin data in BigQuery?

A one-month query on a few columns of transactions scans about 0.3 to 0.5 GiB. Full-history aggregates scan tens of GiB. SELECT * on transactions scans 2.39 TiB, about $8.69 beyond the 1 TiB free tier if nothing else used it that month.

Is the crypto_bitcoin dataset free?

Google pays for storing public datasets, so you never pay storage for them. You pay only for the bytes your queries scan, billed to your own project at the on-demand rate, and the first 1 TiB scanned each month is free. See BigQuery pricing.

Why does my query fail with a syntax error near HASH?

HASH is a reserved keyword in GoogleSQL. Quote the column with backticks: ` SELECT hash FROM ... `. See unexpected keyword errors.

Why does the dataset show 0 rows and 0 bytes?

All four tables are views over Google-managed storage, and BigQuery reports no row count or size for views. Use a dry run to see how many bytes a query will scan.

All public datasets · BigQuery cost queries · Pricing calculator

Cut BigQuery spend without guessing

Masthead attributes compute and storage cost to every project, user, pipeline and table, finds unused and dead-end tables, and shows where editions or on-demand pricing is cheaper. Mnemonic cut its BigQuery compute cost by 20% within 24 hours of onboarding.