<p>There is no need to buy any data, and if someone is offering to sell you block headers, then you are being scammed.</p>
<p>The Bitcoin network protocol supports transmitting just block headers. So you can just use or create a software which can speak the Bitcoin network protocol and download just the block headers. The <a href="https://developer.bitcoin.org/reference/p2p_networking.html#getheaders" rel="nofollow noreferrer"><code>getheaders</code> message</a> is what you need in order to request the headers from a node, in addition to the <a href="https://developer.bitcoin.org/reference/p2p_networking.html" rel="nofollow noreferrer">normal network protocol stuff</a>. Since block headers are just 80 bytes, the entire download will be <code>80*506612 = 40528960 bytes = 40.528960 MB</code>.</p>
<p>Instead of writing such a software, you can also use Electrum. Electrum is a SPV wallet, but it downloads all of the block headers. If you create an Electrum wallet and let it sync (syncs very quickly), you will find a file in the Electrum data directory named <code>blockchain_headers</code>. This file contains all of the block headers in raw form (so just as bytes). You can then parse that as per the <a href="https://developer.bitcoin.org/reference/block_chain.html#block-headers" rel="nofollow noreferrer">block header format</a>.</p>

CC BY-SA 3.0
2018-01-29T13:47:48.750Z
Thank you Andrew for your excellent answer. 40MB download looks better than 500GB download.Just downloaded Electrum wallet from https://electrum.org/#download and installed another one by installer but it is not supported by Windows XP 32bit. What is an exact name of block headers file in blockchain_headers Electrum directory? Maybe there is an option to download this file from the Internet directly.
darius
CC BY-SA 3.0
2018-01-29T14:13:01.203Z
Just downloaded blockchain_headers from https://headers.electrum.org/blockchain_headers . Size of a file is 36.4 MB vs. 40.528950 MB not sure if the file is last updated.
darius
CC BY-SA 3.0
2018-01-29T15:29:55.870Z
The file you downloaded is probably out of date.
Ava Chow
CC BY-SA 3.0
2018-01-29T23:48:54.233Z
Thank you Andrew for your best answer. I would prefer Electrum wallet based solution due to limits set on getheaders: The getheaders message is nearly identical to the getblocks message, with one minor difference: the inv reply to the getblocks message will include no more than 500 block header hashes; the headers reply to the getheaders message will include as many as 2,000 block headers. BTW Could you put blockchain_headers file for download ?
darius
CC BY-SA 3.0
2018-01-30T00:03:17.117Z
Here's the file from my Electrum. It's up to block 506732. https://drive.google.com/file/d/160fTtPS1eIv1QVH4RL785sMCCkt3Crbx/view?usp=sharing
Ava Chow
CC BY-SA 3.0
2018-01-30T00:18:58.487Z
Thank you Andrew for your excellent help. Your answer and your comments are worth every bitcoin mined ever. My first download is 477637 block headers long. blochchain_headers file is excellent for parsing due to its clear format clocked every 80 bytes or 5 lines in Hex editor (I will try to parse it with JS) https://hexed.it/ thank you once again . I verified the file against nonce read from https://api.blockchair.com/bitcoin/blocks?q=id(3)
darius
CC BY-SA 4.0
2024-06-24T10:04:45.323Z
Nowadays, you must also clear the `checkpoint.json` file. See [here](https://bitcoin.stackexchange.com/a/123438/34190).
Lee
CC BY-SA 4.0
2018-01-29T05:22:06.530Z
2024-10-30T09:09:49.310Z
2024-10-30T09:09:49.310Z
Ava Chow
<p>How do I get Bitcoin block header data with nonce?</p>

<p>There are tens of so called blockchain explorer websites, tens more offering on-line Bitcoin blockchain parsing.</p>

<p>But all I need are historic Bitcoin blockchain header data only for off-line mode study.</p>

<p>In theory I can set up blockchain parser on my own but I need to download full blockchain first and set up parser.</p>

<p>Since I live on wireless Internet 3G, it's not feasible to download 500GB data, so I would prefer an option just to buy historic Bitcoin blockchain header only data, no overheads, no transaction data.</p>

<p>If you know such place or can offer such download, let me know your terms.</p>

CC BY-SA 3.0
2018-01-29T00:50:09.927Z
I believe that bitcoin-core will sync all the headers first before syncing the block chain. Perhaps it would be enough to pause/stop syncing after that point?
 mynt
<blockchain><nonce><blockexplorer>
How do I get Bitcoin block header data with nonce?
darius
# How do I get Bitcoin block header data with nonce?

(Asked by: username_0 on 2018-01-28)

How do I get Bitcoin block header data with nonce?

There are tens of so called blockchain explorer websites, tens more offering on-line Bitcoin blockchain parsing.

But all I need are historic Bitcoin blockchain header data only for off-line mode study.

In theory I can set up blockchain parser on my own but I need to download full blockchain first and set up parser.

Since I live on wireless Internet 3G, it's not feasible to download 500GB data, so I would prefer an option just to buy historic Bitcoin blockchain header only data, no overheads, no transaction data.

If you know such place or can offer such download, let me know your terms.

**Tags:** blockchain, nonce, blockexplorer

> **Comments:**
> **username_1**: I believe that bitcoin-core will sync all the headers first before syncing the block chain. Perhaps it would be enough to pause/stop syncing after that point?  

---

## 1 answers

### Answer by username_2 on 2018-01-29. Score: 4 | Accepted answer

There is no need to buy any data, and if someone is offering to sell you block headers, then you are being scammed.

The Bitcoin network protocol supports transmitting just block headers. So you can just use or create a software which can speak the Bitcoin network protocol and download just the block headers. The [`getheaders` message](https://developer.bitcoin.org/reference/p2p_networking.html#getheaders) is what you need in order to request the headers from a node, in addition to the [normal network protocol stuff](https://developer.bitcoin.org/reference/p2p_networking.html). Since block headers are just 80 bytes, the entire download will be `80*506612 = 40528960 bytes = 40.528960 MB`.

Instead of writing such a software, you can also use Electrum. Electrum is a SPV wallet, but it downloads all of the block headers. If you create an Electrum wallet and let it sync (syncs very quickly), you will find a file in the Electrum data directory named `blockchain_headers`. This file contains all of the block headers in raw form (so just as bytes). You can then parse that as per the [block header format](https://developer.bitcoin.org/reference/block_chain.html#block-headers).

> **Comments:**
> **username_0**: Thank you Andrew for your excellent answer. 40MB download looks better than 500GB download.Just downloaded Electrum wallet from https://electrum.org/#download and installed another one by installer but it is not supported by Windows XP 32bit. What is an exact name of block headers file in blockchain_headers Electrum directory? Maybe there is an option to download this file from the Internet directly.  
> **username_0**: Just downloaded blockchain_headers from https://headers.electrum.org/blockchain_headers . Size of a file is 36.4 MB vs. 40.528950 MB not sure if the file is last updated.  
> **username_2**: The file you downloaded is probably out of date.  
> **username_0**: Thank you Andrew for your best answer. I would prefer Electrum wallet based solution due to limits set on getheaders: The getheaders message is nearly identical to the getblocks message, with one minor difference: the inv reply to the getblocks message will include no more than 500 block header hashes; the headers reply to the getheaders message will include as many as 2,000 block headers. BTW Could you put blockchain_headers file for download ?  
> **username_2**: Here's the file from my Electrum. It's up to block 506732. https://drive.google.com/file/d/160fTtPS1eIv1QVH4RL785sMCCkt3Crbx/view?usp=sharing  
> **username_0**: Thank you Andrew for your excellent help. Your answer and your comments are worth every bitcoin mined ever. My first download is 477637 block headers long. blochchain_headers file is excellent for parsing due to its clear format clocked every 80 bytes or 5 lines in Hex editor (I will try to parse it with JS) https://hexed.it/ thank you once again . I verified the file against nonce read from https://api.blockchair.com/bitcoin/blocks?q=id(3)  
> **username_3**: Nowadays, you must also clear the `checkpoint.json` file. See [here](https://bitcoin.stackexchange.com/a/123438/34190).  

---

