I'm looking for a way to query all transactions related to a particular bitcoin address - I periodically need to find all transactions for numerous addresses.

I've seen info about bitcoind searchrawtransactions, although it looks like this may no longer be supported?

Any recommendations?


2 Answers 2


To use getrawtransaction to lookup any transaction, you have to have the -txindex flag set, so that all transactions are indexed. But, you have to know the txid.

getrawtransaction "txid" ( verbose "blockhash" )

NOTE: By default this function only works for mempool transactions. If the -txindex option is
enabled, it also works for blockchain transactions. If the block which contains the transaction
is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is
provided, only that block will be searched and if the transaction is in the mempool or other
blocks, or if this node does not have the given block available, the transaction will not be found.

I would recommend using an api such as blockchain.info

Single Address

  • https://blockchain.info/rawaddr/$bitcoin_address
  • Address can be base58 or hash160

  • Optional limit parameter to show n transactions e.g. &limit=50 (Default: 50, Max: 50)

  • Optional offset parameter to skip the first n transactions e.g. &offset=100 (Page 2 for limit 50)

{ "hash160":"660d4ef3a743e3e696ad990364e555c271ad504b", "address":"1AJbsFZ64EpEfS5UAjAfcUG8pH8Jn3rn1F", "n_tx":17, "n_unredeemed":2, "total_received":1031350000, "total_sent":931250000, "final_balance":100100000, "txs":[--Array of Transactions--] }

What you want is in the txs property of the returned json object.

  • Thanks for the info, but i’d prefer not to rely on a third party, i’m looking to do this in-house. Also, I will have not have the txids, I’ll need to query with the address as the parameter Commented Aug 6, 2018 at 20:59
  • Then I think you'll have to write your own block parsing scripts to search the entire blockchain.
    – JBaczuk
    Commented Aug 6, 2018 at 22:06

This API works for me: https://chain.so/api/v2/address/BTC/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

Here is c++ code to get all utxos for an address:



  • 1
    This (like other APIs) is limited to 50 per address. Can you share how to get all of them?
    – Newskooler
    Commented Jun 19, 2020 at 22:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.