user17080: 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?

user12983: 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

17080: <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>
 12983: <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>
