<p>I think that this value is an internal <strong>unique</strong> index in bc.i database.</p>

<p>It is not possible to use txid as an index because of 2x2 duplicate transactions in blockchain</p>

<p><a href="https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599" rel="nofollow">https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599</a>
<a href="https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468" rel="nofollow">https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468</a></p>

<p>occurred in the early stage of bitcoin</p>

<p>see BIP-30 <a href="https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki" rel="nofollow">https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki</a></p>

<p>UPD: ok, you are asking about <strong>block</strong> index, but my answer is for <strong>tx</strong> index. May be using straight autoincrement int64 value for database is better than int256</p>

CC BY-SA 3.0
2014-07-18T06:56:48.313Z
2014-07-18T07:23:58.330Z
2014-07-18T07:23:58.330Z
amaclin
<p>It is the index of the block in blockchain.info</p>

<p>This would be the latest block for now: 
<a href="https://blockchain.info/block-index/311271?format=json" rel="nofollow">https://blockchain.info/block-index/311271?format=json</a></p>

CC BY-SA 3.0
2014-07-18T05:59:33.203Z
This answer is very poor, as you are repeating my question back to me. Also did you even follow your own link? That API call returns information about block 248899, which is not even close to the latest block as a quick check to the blockchain homepage shows we are beyond block height 300000. Please explain what point you were trying to make.
almel
CC BY-SA 3.0
2014-07-19T07:27:06.410Z
My bad, the link is for a block that was back in 28 Jul 2013 14:57:27 GMT.
Basically my take is that block height is the block id in the main block chain, but block index is the index number in blockchain.info database, as amaclin mentioned they might be two different transaction ids (or also double spends) that one of them would end up in the main blockchain, so the block-index is always higher than the height (maybe the same in the first few blocks, haven't checked)
Shayan
CC BY-SA 3.0
2014-07-18T04:33:35.900Z
2014-07-18T04:33:35.900Z
Shayan
<p>It's an information about where it is stored in the block DB.
(more info - <a href="https://bitcoindev.network/understanding-the-data/" rel="nofollow noreferrer">https://bitcoindev.network/understanding-the-data/</a> )</p>

CC BY-SA 4.0
2021-11-17T08:35:59.110Z
2021-11-17T08:35:59.110Z
J.Valášek
<p>On blockchain's blockchain api documentation, located here</p>

<pre><code>https://blockchain.info/api/blockchain_api
</code></pre>

<p>There is an api call that uses a parameter called block_index. What is this value, and how does it differ from block_height? From playing around with changing the block_index value in the following api call:</p>

<pre><code>https://blockchain.info/block-index/$block_index?format=json
</code></pre>

<p>It seems like (imo quite arbitrarily, which adds to my confusion) that block_index 14849 corresponds to the genesis block. Finally, on the api page listed at the top the first example output they show gives a block whose index is 818044, yet when I enter the following api call into my browser's address bar:</p>

<pre><code>https://blockchain.info/block-index/818044?format=json
</code></pre>

<p>I get "Block Not Found". Is this just a bug in blockchain.info that the example output they provide doesn't actually work, or am I using block_index incorrectly?</p>

<blockchain.info>
What is a block index in blockchain.info?
almel
# What is a block index in blockchain.info?

(Asked by: username_0 on 2014-07-17)

On blockchain's blockchain api documentation, located here
https://blockchain.info/api/blockchain_api

There is an api call that uses a parameter called block_index. What is this value, and how does it differ from block_height? From playing around with changing the block_index value in the following api call:
https://blockchain.info/block-index/$block_index?format=json

It seems like (imo quite arbitrarily, which adds to my confusion) that block_index 14849 corresponds to the genesis block. Finally, on the api page listed at the top the first example output they show gives a block whose index is 818044, yet when I enter the following api call into my browser's address bar:
https://blockchain.info/block-index/818044?format=json

I get "Block Not Found". Is this just a bug in blockchain.info that the example output they provide doesn't actually work, or am I using block_index incorrectly?

**Tags:** blockchain.info


---

## 3 answers

### Answer by username_1 on 2014-07-18. Score: 1

I think that this value is an internal **unique** index in bc.i database.

It is not possible to use txid as an index because of 2x2 duplicate transactions in blockchain

<https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599>
<https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468>

occurred in the early stage of bitcoin

see BIP-30 <https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki>

UPD: ok, you are asking about **block** index, but my answer is for **tx** index. May be using straight autoincrement int64 value for database is better than int256


---

### Answer by username_2 on 2014-07-18. Score: 0

It is the index of the block in blockchain.info

This would be the latest block for now:
<https://blockchain.info/block-index/311271?format=json>

> **Comments:**
> **username_0**: This answer is very poor, as you are repeating my question back to me. Also did you even follow your own link? That API call returns information about block 248899, which is not even close to the latest block as a quick check to the blockchain homepage shows we are beyond block height 300000. Please explain what point you were trying to make.  
> **username_2**: My bad, the link is for a block that was back in 28 Jul 2013 14:57:27 GMT. Basically my take is that block height is the block id in the main block chain, but block index is the index number in blockchain.info database, as username_1 mentioned they might be two different transaction ids (or also double spends) that one of them would end up in the main blockchain, so the block-index is always higher than the height (maybe the same in the first few blocks, haven't checked)  

---

### Answer by username_3 on 2021-11-17. Score: 0

It's an information about where it is stored in the block DB.
(more info - <https://bitcoindev.network/understanding-the-data/> )


---

