<p>See <a href="https://developer.bitcoin.org/reference/rpc/getrawtransaction.html" rel="nofollow noreferrer">https://developer.bitcoin.org/reference/rpc/getrawtransaction.html</a> and note the comment about <code>-txindex</code></p>
<p>The description of the verbose result shows the unlocking script (scriptsig) for each input.</p>
<p>There's a different RPC call noted for wallet transactions .</p>

CC BY-SA 4.0
2024-02-05T13:48:28.157Z
2024-02-05T13:53:40.903Z
2024-02-05T13:53:40.903Z
RedGrittyBrick
<p>I wanted to try talking to my bitcoin node to get the input scripts and put them into a database. Does anyone have good resources on where I can look to get started?</p>

CC BY-SA 4.0
2024-02-08T05:35:59.313Z
So what I want to get access to is tap scripts. Like the one in mempool where they have:

OP_PUSHBYTES_32 526cfd93ec81e49633486ba01d9c8c3954e6fd755836539b9441f66a32f3beb5
OP_CHECKSIG
OP_0
OP_IF
OP_PUSHBYTES_3 6f7264
OP_PUSHBYTES_1 01
OP_PUSHBYTES_9 696d6167652f706e67
OP_0
OP_PUSHDATA2 89504e470d0a1a0a0000000d4948...(there's more I left out for the sake of space)
OP_ENDIF

Is there a way to get this from the RPC API?
hana
<api><database><input-script>
Bitcoin API for getting an input script?
hana
# Bitcoin API for getting an input script?

(Asked by: username_0 on 2024-02-05)

I wanted to try talking to my bitcoin node to get the input scripts and put them into a database. Does anyone have good resources on where I can look to get started?

**Tags:** api, database, input-script

> **Comments:**
> **username_0**: So what I want to get access to is tap scripts. Like the one in mempool where they have:  OP_PUSHBYTES_32 526cfd93ec81e49633486ba01d9c8c3954e6fd755836539b9441f66a32f3beb5 OP_CHECKSIG OP_0 OP_IF OP_PUSHBYTES_3 6f7264 OP_PUSHBYTES_1 01 OP_PUSHBYTES_9 696d6167652f706e67 OP_0 OP_PUSHDATA2 89504e470d0a1a0a0000000d4948...(there's more I left out for the sake of space) OP_ENDIF  Is there a way to get this from the RPC API?  

---

## 1 answers

### Answer by username_1 on 2024-02-05. Score: 1 | Accepted answer

See <https://developer.bitcoin.org/reference/rpc/getrawtransaction.html> and note the comment about `-txindex`

The description of the verbose result shows the unlocking script (scriptsig) for each input.

There's a different RPC call noted for wallet transactions .


---

