Querying the Bitcoin Blockchain: A Practical Guide | by Anže Kravanja | The Capital | Mar, 2025
The Bitcoin blockchain isn’t just a buzzword; it’s a publicly accessible ledger full of valuable data, just waiting to be explored. Because it’s open to all, we have the unique ability to directly tap into and query the very heart of the Bitcoin network.
There are many different ways to do it, however, my preferred way is using a public dataset in Google BigQuery.
SELECT
COUNT(*) as transactions
FROM `bigquery-public-data.crypto_bitcoin.transactions`
There’s a little catch though, BigQuery is only free up to 1TB of data read, and the current size of the transactions table is 2TB (as of Feb. 25th, 2025). Consider this fair warning as some caution is needed to avoid incurring costs one might not expect.
Now, BigQuery’s pricing can be a little scary when dealing with such a large dataset. To avoid any unexpected bills, here’s a trick I’ve used: I export the entire transactions
table from BigQuery to Google Cloud Storage (GCS). The beauty of this is that exporting out of BigQuery is completely free! Plus, I save it as…