<p>Such tools would have to be developed, either by IOG or other third party entities. <a href="https://github.com/txpipe" rel="nofollow noreferrer">Txpipe</a> is working on such tools like <a href="https://github.com/txpipe/oura" rel="nofollow noreferrer">Oura</a> and <a href="https://github.com/txpipe/scrolls" rel="nofollow noreferrer">Scrolls</a>; both are still under development but are already a good step in the right direction. I'm sure there are others I am unaware of, but are mostly still WIP and lack a good UX.</p>

CC BY-SA 4.0
2022-06-18T15:54:10.007Z
2022-06-18T15:54:10.007Z
zhekson
<p>No it's not possible with the current implementation of <code>cardnao-node</code>.
<a href="https://github.com/input-output-hk/cardano-node/tree/master/cardano-api" rel="nofollow noreferrer">cardano-api</a> (haskell API for interacting with cardano-node) doesn't have any method to query block or transaction from <code>cardano-node</code></p>
<p>If you want to look at the queries that are possible, they are here.</p>
<p><a href="https://github.com/input-output-hk/cardano-node/blob/65422ff373f2f88a563afa746a9a16d211ffdc7c/cardano-api/src/Cardano/Api/Query.hs#L191" rel="nofollow noreferrer">cardano-api/src/Cardano/Api/Query.hs#L191</a></p>

CC BY-SA 4.0
2022-05-02T17:58:36.700Z
And if this is the case what type of data does PAB server/local cluster have access to from the local cardano-node? Is it best to setup PAB to access the local cardano node or would you recommend a different configuration for PAB during development and initial plutus script testing?
Deano
CC BY-SA 4.0
2022-05-03T12:51:09.537Z
so tools like `cardano-db-sync` don't get their data from the `cardano-node`?
Pedro Martins Timóteo da Costa
CC BY-SA 4.0
2022-07-19T23:13:23.337Z
`db-sync` does get data from the `node`, via the local chain sync protocol, however that protocol is written in Haskell and uses CBOR encoding. Writing something to talk that protocol is totally doable but not trivial.
Erik de Castro Lopo
CC BY-SA 4.0
2022-05-02T05:14:36.447Z
2022-05-02T05:14:36.447Z
Sudip Bhattarai
<p>I know there are some tools out there that help reading historical data from the Cardano blockchain, such as IOHK's <a href="https://github.com/input-output-hk/cardano-db-sync" rel="noreferrer">cardano-db-sync</a> and <a href="https://blockfrost.io/" rel="noreferrer">blockfrost.io</a>, but I would like to read directly from the a Cardano node I am running on my machine. I was trying to do this by using the cardano-cli, but it seems pretty limited, as it doesn't seem to have a way to get historical data from the blocks, like for example, <em><strong>what transactions got included into block X</strong></em>, or <em><strong>what are the inputs and outputs of transaction with the id 68f1f35323eada5601170011239c5e9b4dd15da559ceb9ad17cfd8eb7c317753</strong></em> (random example).</p>
<p>I am probably lacking some knowledge here, but it seems to me such queries should be possible given the fact that in theory, I have all data from the Cardano blockchain directly in my machine.</p>
<p>Note: my cardano node comes from the Daedalus wallet.</p>

<cardano-node><daedalus>
How to read data from a Cardano node directly?
# How to read data from a Cardano node directly?

(Asked by: username_0 on 2022-05-01)

I know there are some tools out there that help reading historical data from the Cardano blockchain, such as IOHK's [cardano-db-sync](https://github.com/input-output-hk/cardano-db-sync) and [blockfrost.io](https://blockfrost.io/), but I would like to read directly from the a Cardano node I am running on my machine. I was trying to do this by using the cardano-cli, but it seems pretty limited, as it doesn't seem to have a way to get historical data from the blocks, like for example, ***what transactions got included into block X***, or ***what are the inputs and outputs of transaction with the id 68f1f35323eada5601170011239c5e9b4dd15da559ceb9ad17cfd8eb7c317753*** (random example).

I am probably lacking some knowledge here, but it seems to me such queries should be possible given the fact that in theory, I have all data from the Cardano blockchain directly in my machine.

Note: my cardano node comes from the Daedalus wallet.

**Tags:** cardano-node, daedalus

---

## 2 answers

### Answer by username_2 on 2022-05-02. Score: 4

No it's not possible with the current implementation of `cardnao-node`.
[cardano-api](https://github.com/input-output-hk/cardano-node/tree/master/cardano-api) (haskell API for interacting with cardano-node) doesn't have any method to query block or transaction from `cardano-node`

If you want to look at the queries that are possible, they are here.

[cardano-api/src/Cardano/Api/Query.hs#L191](https://github.com/input-output-hk/cardano-node/blob/65422ff373f2f88a563afa746a9a16d211ffdc7c/cardano-api/src/Cardano/Api/Query.hs#L191)

> **Comments:**
> **username_3**: And if this is the case what type of data does PAB server/local cluster have access to from the local cardano-node? Is it best to setup PAB to access the local cardano node or would you recommend a different configuration for PAB during development and initial plutus script testing?  
> **username_0**: so tools like `cardano-db-sync` don't get their data from the `cardano-node`?  
> **username_4**: `db-sync` does get data from the `node`, via the local chain sync protocol, however that protocol is written in Haskell and uses CBOR encoding. Writing something to talk that protocol is totally doable but not trivial.  

---

### Answer by username_1 on 2022-06-18. Score: 2

Such tools would have to be developed, either by IOG or other third party entities. [Txpipe](https://github.com/txpipe) is working on such tools like [Oura](https://github.com/txpipe/oura) and [Scrolls](https://github.com/txpipe/scrolls); both are still under development but are already a good step in the right direction. I'm sure there are others I am unaware of, but are mostly still WIP and lack a good UX.


---

